linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: q6afe-dai: add dummy register read function
@ 2020-08-11 10:25 Srinivas Kandagatla
  2020-08-11 10:25 ` [PATCH 2/2] ASoC: q6routing: " Srinivas Kandagatla
  2020-08-11 11:04 ` [PATCH 1/2] ASoC: q6afe-dai: " Stephan Gerhold
  0 siblings, 2 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2020-08-11 10:25 UTC (permalink / raw)
  To: broonie
  Cc: tiwai, alsa-devel, linux-kernel, lgirdwood, john.stultz,
	Srinivas Kandagatla

Most of the DAPM widgets for DSP ASoC components reuse reg field
of the widgets for its internal calculations, however these are not
real registers. So read/writes to these numbers are not really
valid. However ASoC core will read these registers to get default
state during startup.

With recent changes to ASoC core, every register read/write
failures are reported very verbosely. Prior to this fails to reads
are totally ignored, so we never saw any error messages.

To fix this add dummy read function to return default value.

Reported-by: John Stultz <john.stultz@linaro.org>
Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 sound/soc/qcom/qdsp6/q6afe-dai.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c
index 2a5302f1db98..492bdbaf13c4 100644
--- a/sound/soc/qcom/qdsp6/q6afe-dai.c
+++ b/sound/soc/qcom/qdsp6/q6afe-dai.c
@@ -1352,6 +1352,13 @@ static const struct snd_soc_dapm_widget q6afe_dai_widgets[] = {
 	SND_SOC_DAPM_AIF_OUT("DISPLAY_PORT_RX", "NULL", 0, 0, 0, 0),
 };
 
+static unsigned int q6afe_reg_read(struct snd_soc_component *component,
+				   unsigned int reg)
+{
+	/* default value */
+	return 0;
+}
+
 static const struct snd_soc_component_driver q6afe_dai_component = {
 	.name		= "q6afe-dai-component",
 	.dapm_widgets = q6afe_dai_widgets,
@@ -1359,7 +1366,7 @@ static const struct snd_soc_component_driver q6afe_dai_component = {
 	.dapm_routes = q6afe_dapm_routes,
 	.num_dapm_routes = ARRAY_SIZE(q6afe_dapm_routes),
 	.of_xlate_dai_name = q6afe_of_xlate_dai_name,
-
+	.read = q6afe_reg_read,
 };
 
 static void of_q6afe_parse_dai_data(struct device *dev,
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-11 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 10:25 [PATCH 1/2] ASoC: q6afe-dai: add dummy register read function Srinivas Kandagatla
2020-08-11 10:25 ` [PATCH 2/2] ASoC: q6routing: " Srinivas Kandagatla
2020-08-11 11:04 ` [PATCH 1/2] ASoC: q6afe-dai: " Stephan Gerhold
2020-08-11 11:16   ` Srinivas Kandagatla
2020-08-11 11:36   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).