]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ASoC: wm8994: Avoid attempts to read unreadable registers
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 31 Jul 2020 17:38:34 +0000 (19:38 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 16 Sep 2020 09:15:01 +0000 (05:15 -0400)
commitd63d066d9bf45c77ad49f37872f160b96f6cfb5b
treebd245aed1b815873fb9656c9a0a61e8643d7cf89
parent713670caca6154fbc9fba7daf64af8e87318640e
ASoC: wm8994: Avoid attempts to read unreadable registers

BugLink: https://bugs.launchpad.net/bugs/1895174
[ Upstream commit f082bb59b72039a2326ec1a44496899fb8aa6d0e ]

The driver supports WM1811, WM8994, WM8958 devices but according to
documentation and the regmap definitions the WM8958_DSP2_* registers
are only available on WM8958. In current code these registers are
being accessed as if they were available on all the three chips.

When starting playback on WM1811 CODEC multiple errors like:
"wm8994-codec wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5"
can be seen, which is caused by attempts to read an unavailable
WM8958_DSP2_PROGRAM register. The issue has been uncovered by recent
commit "e2329ee ASoC: soc-component: add soc_component_err()".

This patch adds a check in wm8958_aif_ev() callback so the DSP2 handling
is only done for WM8958.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200731173834.23832-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/codecs/wm8958-dsp2.c