.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * wm8728.c -- WM8728 ALSA SoC Audio driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright 2008 Wolfson Microelectronics plc |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/module.h> |
---|
.. | .. |
---|
72 | 69 | {"VOUTR", NULL, "DAC"}, |
---|
73 | 70 | }; |
---|
74 | 71 | |
---|
75 | | -static int wm8728_mute(struct snd_soc_dai *dai, int mute) |
---|
| 72 | +static int wm8728_mute(struct snd_soc_dai *dai, int mute, int direction) |
---|
76 | 73 | { |
---|
77 | 74 | struct snd_soc_component *component = dai->component; |
---|
78 | | - u16 mute_reg = snd_soc_component_read32(component, WM8728_DACCTL); |
---|
| 75 | + u16 mute_reg = snd_soc_component_read(component, WM8728_DACCTL); |
---|
79 | 76 | |
---|
80 | 77 | if (mute) |
---|
81 | 78 | snd_soc_component_write(component, WM8728_DACCTL, mute_reg | 1); |
---|
.. | .. |
---|
90 | 87 | struct snd_soc_dai *dai) |
---|
91 | 88 | { |
---|
92 | 89 | struct snd_soc_component *component = dai->component; |
---|
93 | | - u16 dac = snd_soc_component_read32(component, WM8728_DACCTL); |
---|
| 90 | + u16 dac = snd_soc_component_read(component, WM8728_DACCTL); |
---|
94 | 91 | |
---|
95 | 92 | dac &= ~0x18; |
---|
96 | 93 | |
---|
.. | .. |
---|
116 | 113 | unsigned int fmt) |
---|
117 | 114 | { |
---|
118 | 115 | struct snd_soc_component *component = codec_dai->component; |
---|
119 | | - u16 iface = snd_soc_component_read32(component, WM8728_IFCTL); |
---|
| 116 | + u16 iface = snd_soc_component_read(component, WM8728_IFCTL); |
---|
120 | 117 | |
---|
121 | 118 | /* Currently only I2S is supported by the driver, though the |
---|
122 | 119 | * hardware is more flexible. |
---|
.. | .. |
---|
172 | 169 | case SND_SOC_BIAS_STANDBY: |
---|
173 | 170 | if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { |
---|
174 | 171 | /* Power everything up... */ |
---|
175 | | - reg = snd_soc_component_read32(component, WM8728_DACCTL); |
---|
| 172 | + reg = snd_soc_component_read(component, WM8728_DACCTL); |
---|
176 | 173 | snd_soc_component_write(component, WM8728_DACCTL, reg & ~0x4); |
---|
177 | 174 | |
---|
178 | 175 | /* ..then sync in the register cache. */ |
---|
.. | .. |
---|
181 | 178 | break; |
---|
182 | 179 | |
---|
183 | 180 | case SND_SOC_BIAS_OFF: |
---|
184 | | - reg = snd_soc_component_read32(component, WM8728_DACCTL); |
---|
| 181 | + reg = snd_soc_component_read(component, WM8728_DACCTL); |
---|
185 | 182 | snd_soc_component_write(component, WM8728_DACCTL, reg | 0x4); |
---|
186 | 183 | break; |
---|
187 | 184 | } |
---|
.. | .. |
---|
195 | 192 | |
---|
196 | 193 | static const struct snd_soc_dai_ops wm8728_dai_ops = { |
---|
197 | 194 | .hw_params = wm8728_hw_params, |
---|
198 | | - .digital_mute = wm8728_mute, |
---|
| 195 | + .mute_stream = wm8728_mute, |
---|
199 | 196 | .set_fmt = wm8728_set_dai_fmt, |
---|
| 197 | + .no_capture_mute = 1, |
---|
200 | 198 | }; |
---|
201 | 199 | |
---|
202 | 200 | static struct snd_soc_dai_driver wm8728_dai = { |
---|