* [PATCH 1/1] ASoC: rsnd: allow to register kctrl with different cfg
@ 2019-02-01 3:02 Jiada Wang
2019-02-01 7:39 ` Kuninori Morimoto
0 siblings, 1 reply; 2+ messages in thread
From: Jiada Wang @ 2019-02-01 3:02 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai, kuninori.morimoto.gx
Cc: jiada_wang, twischer, alsa-devel, linux-kernel
Currently kctrl with same name can only be created once,
but in "MIX Playback Volume" case, same kctrl is used to
control different MIX volume for different dai-link.
this patch by check kctrl's cfg, allow to create kctrl
with same name but different cfg.
Fixes: commit 9c698e8481a1 ("ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()")
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
sound/soc/sh/rcar/core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 79659f7b32b9..909ee0948da1 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1526,14 +1526,15 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
int ret;
/*
- * 1) Avoid duplicate register (ex. MIXer case)
+ * 1) Avoid duplicate register (ex. DVC case)
* 2) re-register if card was rebinded
*/
list_for_each_entry(kctrl, &card->controls, list) {
struct rsnd_kctrl_cfg *c = kctrl->private_data;
if (strcmp(kctrl->id.name, name) == 0 &&
- c->mod == mod)
+ c->mod == mod &&
+ &c->val == &cfg->val)
return 0;
}
--
2.19.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] ASoC: rsnd: allow to register kctrl with different cfg
2019-02-01 3:02 [PATCH 1/1] ASoC: rsnd: allow to register kctrl with different cfg Jiada Wang
@ 2019-02-01 7:39 ` Kuninori Morimoto
0 siblings, 0 replies; 2+ messages in thread
From: Kuninori Morimoto @ 2019-02-01 7:39 UTC (permalink / raw)
To: Jiada Wang
Cc: lgirdwood, broonie, perex, tiwai, twischer, alsa-devel, linux-kernel
Hi Mark
> Currently kctrl with same name can only be created once,
> but in "MIX Playback Volume" case, same kctrl is used to
> control different MIX volume for different dai-link.
>
> this patch by check kctrl's cfg, allow to create kctrl
> with same name but different cfg.
>
> Fixes: commit 9c698e8481a1 ("ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()")
>
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> ---
I and Jiada discussed about this issue locally,
and agreed we can use my patch instead of this.
I will post it soon, so, please drop this patch.
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-01 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-01 3:02 [PATCH 1/1] ASoC: rsnd: allow to register kctrl with different cfg Jiada Wang
2019-02-01 7:39 ` Kuninori Morimoto
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).