.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Texas Instruments TLV320AIC26 low power audio CODEC |
---|
3 | 4 | * ALSA SoC CODEC driver |
---|
.. | .. |
---|
130 | 131 | return 0; |
---|
131 | 132 | } |
---|
132 | 133 | |
---|
133 | | -/** |
---|
| 134 | +/* |
---|
134 | 135 | * aic26_mute - Mute control to reduce noise when changing audio format |
---|
135 | 136 | */ |
---|
136 | | -static int aic26_mute(struct snd_soc_dai *dai, int mute) |
---|
| 137 | +static int aic26_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
137 | 138 | { |
---|
138 | 139 | struct snd_soc_component *component = dai->component; |
---|
139 | 140 | struct aic26 *aic26 = snd_soc_component_get_drvdata(component); |
---|
.. | .. |
---|
210 | 211 | |
---|
211 | 212 | static const struct snd_soc_dai_ops aic26_dai_ops = { |
---|
212 | 213 | .hw_params = aic26_hw_params, |
---|
213 | | - .digital_mute = aic26_mute, |
---|
| 214 | + .mute_stream = aic26_mute, |
---|
214 | 215 | .set_sysclk = aic26_set_sysclk, |
---|
215 | 216 | .set_fmt = aic26_set_fmt, |
---|
| 217 | + .no_capture_mute = 1, |
---|
216 | 218 | }; |
---|
217 | 219 | |
---|
218 | 220 | static struct snd_soc_dai_driver aic26_dai = { |
---|
.. | .. |
---|
265 | 267 | struct aic26 *aic26 = dev_get_drvdata(dev); |
---|
266 | 268 | int val, amp, freq, len; |
---|
267 | 269 | |
---|
268 | | - val = snd_soc_component_read32(aic26->component, AIC26_REG_AUDIO_CTRL2); |
---|
| 270 | + val = snd_soc_component_read(aic26->component, AIC26_REG_AUDIO_CTRL2); |
---|
269 | 271 | amp = (val >> 12) & 0x7; |
---|
270 | 272 | freq = (125 << ((val >> 8) & 0x7)) >> 1; |
---|
271 | 273 | len = 2 * (1 + ((val >> 4) & 0xf)); |
---|
.. | .. |
---|
305 | 307 | snd_soc_component_write(component, AIC26_REG_POWER_CTRL, 0); |
---|
306 | 308 | |
---|
307 | 309 | /* Audio Control 3 (master mode, fsref rate) */ |
---|
308 | | - reg = snd_soc_component_read32(component, AIC26_REG_AUDIO_CTRL3); |
---|
| 310 | + reg = snd_soc_component_read(component, AIC26_REG_AUDIO_CTRL3); |
---|
309 | 311 | reg &= ~0xf800; |
---|
310 | 312 | reg |= 0x0800; /* set master mode */ |
---|
311 | 313 | snd_soc_component_write(component, AIC26_REG_AUDIO_CTRL3, reg); |
---|