All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: simple-mux: add read function
@ 2022-10-28 19:13 ` Maarten Zanders
  0 siblings, 0 replies; 4+ messages in thread
From: Maarten Zanders @ 2022-10-28 19:13 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: Maarten Zanders, alexandre.belloni, Kuninori Morimoto,
	alsa-devel, linux-kernel

During initialisation DAPM tries to read the state of the MUX
being connected, resulting in this error log:
input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5

Provide a read function which allows DAPM to read the state of the
MUX.

Signed-off-by: Maarten Zanders <maarten.zanders@mind.be>
---
 sound/soc/codecs/simple-mux.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/simple-mux.c b/sound/soc/codecs/simple-mux.c
index d30c0d24d90a..bf67de12d20b 100644
--- a/sound/soc/codecs/simple-mux.c
+++ b/sound/soc/codecs/simple-mux.c
@@ -55,6 +55,14 @@ static int simple_mux_control_put(struct snd_kcontrol *kcontrol,
 					     e, NULL);
 }
 
+static unsigned int simple_mux_read(struct snd_soc_component *component,
+				    unsigned int reg)
+{
+	struct simple_mux *priv = snd_soc_component_get_drvdata(component);
+
+	return priv->mux;
+}
+
 static const struct snd_kcontrol_new simple_mux_mux =
 	SOC_DAPM_ENUM_EXT("Muxer", simple_mux_enum, simple_mux_control_get, simple_mux_control_put);
 
@@ -76,6 +84,7 @@ static const struct snd_soc_component_driver simple_mux_component_driver = {
 	.num_dapm_widgets	= ARRAY_SIZE(simple_mux_dapm_widgets),
 	.dapm_routes		= simple_mux_dapm_routes,
 	.num_dapm_routes	= ARRAY_SIZE(simple_mux_dapm_routes),
+	.read			= simple_mux_read,
 };
 
 static int simple_mux_probe(struct platform_device *pdev)
-- 
2.37.3


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

* [PATCH] ASoC: simple-mux: add read function
@ 2022-10-28 19:13 ` Maarten Zanders
  0 siblings, 0 replies; 4+ messages in thread
From: Maarten Zanders @ 2022-10-28 19:13 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: alexandre.belloni, Maarten Zanders, alsa-devel,
	Kuninori Morimoto, linux-kernel

During initialisation DAPM tries to read the state of the MUX
being connected, resulting in this error log:
input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5

Provide a read function which allows DAPM to read the state of the
MUX.

Signed-off-by: Maarten Zanders <maarten.zanders@mind.be>
---
 sound/soc/codecs/simple-mux.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/simple-mux.c b/sound/soc/codecs/simple-mux.c
index d30c0d24d90a..bf67de12d20b 100644
--- a/sound/soc/codecs/simple-mux.c
+++ b/sound/soc/codecs/simple-mux.c
@@ -55,6 +55,14 @@ static int simple_mux_control_put(struct snd_kcontrol *kcontrol,
 					     e, NULL);
 }
 
+static unsigned int simple_mux_read(struct snd_soc_component *component,
+				    unsigned int reg)
+{
+	struct simple_mux *priv = snd_soc_component_get_drvdata(component);
+
+	return priv->mux;
+}
+
 static const struct snd_kcontrol_new simple_mux_mux =
 	SOC_DAPM_ENUM_EXT("Muxer", simple_mux_enum, simple_mux_control_get, simple_mux_control_put);
 
@@ -76,6 +84,7 @@ static const struct snd_soc_component_driver simple_mux_component_driver = {
 	.num_dapm_widgets	= ARRAY_SIZE(simple_mux_dapm_widgets),
 	.dapm_routes		= simple_mux_dapm_routes,
 	.num_dapm_routes	= ARRAY_SIZE(simple_mux_dapm_routes),
+	.read			= simple_mux_read,
 };
 
 static int simple_mux_probe(struct platform_device *pdev)
-- 
2.37.3


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

* Re: [PATCH] ASoC: simple-mux: add read function
  2022-10-28 19:13 ` Maarten Zanders
@ 2022-11-03 16:34   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: Liam Girdwood, Jaroslav Kysela, Maarten Zanders, Takashi Iwai
  Cc: alexandre.belloni, alsa-devel, Kuninori Morimoto, linux-kernel

On Fri, 28 Oct 2022 21:13:01 +0200, Maarten Zanders wrote:
> During initialisation DAPM tries to read the state of the MUX
> being connected, resulting in this error log:
> input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5
> 
> Provide a read function which allows DAPM to read the state of the
> MUX.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: simple-mux: add read function
      commit: f7d97cb564a2ac5517ee7cc933de729e533d659a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [PATCH] ASoC: simple-mux: add read function
@ 2022-11-03 16:34   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-11-03 16:34 UTC (permalink / raw)
  To: Liam Girdwood, Jaroslav Kysela, Maarten Zanders, Takashi Iwai
  Cc: alexandre.belloni, Kuninori Morimoto, alsa-devel, linux-kernel

On Fri, 28 Oct 2022 21:13:01 +0200, Maarten Zanders wrote:
> During initialisation DAPM tries to read the state of the MUX
> being connected, resulting in this error log:
> input-mux: ASoC: error at soc_component_read_no_lock on input-mux: -5
> 
> Provide a read function which allows DAPM to read the state of the
> MUX.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: simple-mux: add read function
      commit: f7d97cb564a2ac5517ee7cc933de729e533d659a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2022-11-03 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 19:13 [PATCH] ASoC: simple-mux: add read function Maarten Zanders
2022-10-28 19:13 ` Maarten Zanders
2022-11-03 16:34 ` Mark Brown
2022-11-03 16:34   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.