From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9B46C433EF for ; Fri, 17 Jun 2022 20:03:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 86E881A75; Fri, 17 Jun 2022 22:02:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 86E881A75 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655496189; bh=bIOPDztJcbgiHuxrPZa6CZEtsLYHu/u1qnz0FsmldL4=; h=Date:Subject:To:References:From:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qCNhMPK783eqzFetQCgqRGCtgf7oZ8OgunjQ+/8hop6kseOxBdLlTRt2OJAewxxFd +aps/iUd3xmqoM4Ewe1aVmJWTqhqXx/K9DuEMLvgQh5kC0JM5eXZJyTZK8fkc8UKrs DMwgrYMDTBNK5DEBzEEP1dteIIhEh1wgEwnAMPM8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 14684F8051F; Fri, 17 Jun 2022 22:02:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C33DF80527; Fri, 17 Jun 2022 22:02:17 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 359C1F8028B for ; Fri, 17 Jun 2022 22:02:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 359C1F8028B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="U4CnNCJW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655496132; x=1687032132; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=bIOPDztJcbgiHuxrPZa6CZEtsLYHu/u1qnz0FsmldL4=; b=U4CnNCJWoAGBE8Ui8E8uMexmjEFFLFnEcurWeL5hXsJwCm5xFCpFBZ5C IToRoHA0l2CmUmtb/GBqTxd/+XhqQq2Pp50D3ZTSVQy31mLhnHqbSAeny o4u4OW8VzAI8lV7Ad+vY+qc5EjHn+5Qvv1xVqu2OfNPvFepl66OW1ljo9 X/cQP1mNG4SDxWEUyhptgTN8KsFlfMx1UVdWVkeztfV10fcqcK9m+tEHs RBFSqGkPu4bKqHAhgtpAolsVo3H792/bfUJgwapQVGX3xqJg6Th2/inD/ vc10+f6+VtYLotagTfmzrGkl7zZGkQcu6aCta5cKAb7Bo5DjyuXeYZlFd A==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="365901198" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="365901198" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 13:02:06 -0700 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="642167729" Received: from patelman-mobl1.amr.corp.intel.com (HELO [10.212.115.29]) ([10.212.115.29]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2022 13:02:05 -0700 Message-ID: Date: Fri, 17 Jun 2022 15:02:05 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH] ASoC: ops: Fix multiple value control type Content-Language: en-US To: Sameer Pujar , broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com References: <1655492828-5471-1-git-send-email-spujar@nvidia.com> From: Pierre-Louis Bossart In-Reply-To: <1655492828-5471-1-git-send-email-spujar@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, jonathanh@nvidia.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 Tested-by: Pierre-Louis Bossart 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;