17 Aug
2020
17 Aug
'20
11:45 a.m.
On Tue, Aug 04, 2020 at 04:10:43PM +0200, Sylwester Nawrocki wrote:
The ADC2 and DAC2 are not available on WM1811 device. This patch moves the ADC2, DAC2 VU bitfields to a separate array so we can skip accessing them and avoid unreadable register access on WM1811.
This allows to get rid of warnings during boot like: wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5
Signed-off-by: Sylwester Nawrocki s.nawrocki@samsung.com
+static void wm8994_update_vu_bits(struct snd_soc_component *component) +{
- struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component);
- struct wm8994 *control = wm8994->wm8994;
- int i;
- for (i = 0; i < ARRAY_SIZE(wm8994_vu_bits); i++)
snd_soc_component_write(component, wm8994_vu_bits[i].reg,
snd_soc_component_read(component,
wm8994_vu_bits[i].reg));
Is there a reason to not be using snd_soc_component_update_bits here?
I think otherwise this looks ok.
Thanks, Charles