From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Sameer Pujar <spujar@nvidia.com>,
broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com
Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, jonathanh@nvidia.com
Subject: Re: [PATCH] ASoC: ops: Fix multiple value control type
Date: Fri, 17 Jun 2022 15:02:05 -0500 [thread overview]
Message-ID: <ad76d0d9-22f9-5e35-8575-bf7a78bd1568@linux.intel.com> (raw)
In-Reply-To: <1655492828-5471-1-git-send-email-spujar@nvidia.com>
On 6/17/22 14:07, Sameer Pujar wrote:
> The commit aa2a4b897132("ASoC: ops: Fix boolean/integer detection for
> simple controls") fixes false positives with controls not ending in
> " Volume" string. But it now forces boolean type for the multi value
> controls. Fix this by adding a max check before assigning types.
>
> Fixes: aa2a4b897132("ASoC: ops: Fix boolean/integer detection for simple controls")
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This fixes the second regression we noticed today, with mixer values
such as:
numid=5,iface=MIXER,name='PGA4.0 4 Master Capture Volume'
; type=BOOLEAN,access=rw---R--,values=2
: values=on,on
| dBscale-min=-50.00dB,step=1.00dB,mute=1
This caused an across-the-board fail with alsa-bat tests
https://github.com/thesofproject/linux/pull/3702
Thanks Sameer!
> ---
> sound/soc/soc-ops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
> index 0267e39..21be8e8 100644
> --- a/sound/soc/soc-ops.c
> +++ b/sound/soc/soc-ops.c
> @@ -190,7 +190,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
> vol_string = NULL;
> }
>
> - if (!vol_string)
> + if (!vol_string && max == 1)
> uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
> else
> uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
next prev parent reply other threads:[~2022-06-17 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 19:07 [PATCH] ASoC: ops: Fix multiple value control type Sameer Pujar
2022-06-17 20:02 ` Pierre-Louis Bossart [this message]
2022-06-17 23:15 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad76d0d9-22f9-5e35-8575-bf7a78bd1568@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=perex@perex.cz \
--cc=spujar@nvidia.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox