OSDN Git Service

ASoC: wm8994: Do not register inapplicable controls for WM1811
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 20 Sep 2019 13:02:10 +0000 (15:02 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 23 Sep 2019 21:15:26 +0000 (14:15 -0700)
commitca2347190adb5e4eece73a2b16e96e651c46246b
treeb2cd960eb67e435d626a8622a5fa5ef7d47507f6
parentfb629fa2587d0c150792d87e3053664bfc8dc78c
ASoC: wm8994: Do not register inapplicable controls for WM1811

In case of WM1811 device there are currently being registered controls
referring to registers not existing on that device.
It has been noticed when getting values of "AIF1ADC2 Volume", "AIF1DAC2
Volume" controls was failing during ALSA state restoring at boot time:
 "amixer: Mixer hw:0 load error: Device or resource busy"

Reading some registers through I2C was failing with EBUSY error and
indeed these registers were not available according to the datasheet.

To fix this controls not available on WM1811 are moved to a separate
array and registered only for WM8994 and WM8958.

There are some further differences between WM8994 and WM1811,
e.g. registers 603h, 604h, 605h, which are not covered in this patch.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20190920130218.32690-2-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8994.c