alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw
@ 2021-01-15 20:11 James Schulman
  2021-01-17 13:27 ` Charles Keepax
  2021-01-18 16:02 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: James Schulman @ 2021-01-15 20:11 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, James Schulman, ckeepax, david.rhodes

When switching between firmware types, the wrong control
can be selected when requesting control in kernel API.
Use the currently selected DSP firwmare type to select
the proper mixer control.

Signed-off-by: James Schulman <james.schulman@cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 1fc7bc1970ea..262c2db4f81c 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -2033,11 +2033,14 @@ static struct wm_coeff_ctl *wm_adsp_get_ctl(struct wm_adsp *dsp,
 					     unsigned int alg)
 {
 	struct wm_coeff_ctl *pos, *rslt = NULL;
+	const char *fw_txt = wm_adsp_fw_text[dsp->fw];
 
 	list_for_each_entry(pos, &dsp->ctl_list, list) {
 		if (!pos->subname)
 			continue;
 		if (strncmp(pos->subname, name, pos->subname_len) == 0 &&
+		    strncmp(pos->fw_name, fw_txt,
+			    SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0 &&
 				pos->alg_region.alg == alg &&
 				pos->alg_region.type == type) {
 			rslt = pos;
-- 
2.17.1


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

* Re: [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw
  2021-01-15 20:11 [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw James Schulman
@ 2021-01-17 13:27 ` Charles Keepax
  2021-01-18 16:02 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2021-01-17 13:27 UTC (permalink / raw)
  To: James Schulman; +Cc: alsa-devel, broonie, david.rhodes

On Fri, Jan 15, 2021 at 02:11:05PM -0600, James Schulman wrote:
> When switching between firmware types, the wrong control
> can be selected when requesting control in kernel API.
> Use the currently selected DSP firwmare type to select
> the proper mixer control.
> 
> Signed-off-by: James Schulman <james.schulman@cirrus.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

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

* Re: [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw
  2021-01-15 20:11 [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw James Schulman
  2021-01-17 13:27 ` Charles Keepax
@ 2021-01-18 16:02 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-01-18 16:02 UTC (permalink / raw)
  To: James Schulman; +Cc: alsa-devel, ckeepax, david.rhodes

On Fri, 15 Jan 2021 14:11:05 -0600, James Schulman wrote:
> When switching between firmware types, the wrong control
> can be selected when requesting control in kernel API.
> Use the currently selected DSP firwmare type to select
> the proper mixer control.

Applied to

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

Thanks!

[1/1] ASoC: wm_adsp: Fix control name parsing for multi-fw
      commit: a8939f2e138e418c2b059056ff5b501eaf2eae54

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] 3+ messages in thread

end of thread, other threads:[~2021-01-18 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 20:11 [PATCH] ASoC: wm_adsp: Fix control name parsing for multi-fw James Schulman
2021-01-17 13:27 ` Charles Keepax
2021-01-18 16:02 ` 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).