Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp206385lfn; Tue, 22 Feb 2022 15:17:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYghWH03rMAHt0j0qsMUIc3qnC97Thg+rlRDLb1MVlErCcfazvO1mtY1hfh51HtVMmtmp7 X-Received: by 2002:a63:a1a:0:b0:34d:a4a9:a8b9 with SMTP id 26-20020a630a1a000000b0034da4a9a8b9mr21592188pgk.176.1645571841122; Tue, 22 Feb 2022 15:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645571841; cv=none; d=google.com; s=arc-20160816; b=freHuzY7yL9PlbWIQq9Hvama9bIDzSz7YbYpcKQKL+F8r4stoqqwja/0TyYFvivYdc R/wMb90XMbAP1ifWD4UWuV/WlWkyGo63DlXNV0JlxHEgMtrqS2RBIiHnB7PN9wxNqR8m 9Ff2nLZvLL1pa9w49EvQHKNI2YhNyDqbAhLddEl4IfrAS3WlBwrs2QrzAJyr9+w6LbYO xkh4kFYVo2WKu12eNt8eJCcV0M2HRU78+e+iaF/BkyPv17p3vj0PnkWrt+kKApIfgfpk 2z69Nlo74MoGbuL8bNvrbe9SnpdXthcRBJF+36vsuUclDh306gNW4s2iKZxp+Ji/2cJn GpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IBpEyJOiq3BbaHeDsxyd59qHeW0nK0/RhTh/SH6Jmos=; b=prwHZWA7hwShZsEYrKiW+XHulR6vv/8lKxAfu140gSyVQpW61GPeOXfUqehw9bEYJA 8ZxdWF+G0CKiM2HktkYRBtOyYCfOjgQj3SeeUvxvwjpypaXjWMFI7gax7k4kR/TOy44J MM90rUkR2umBrBS6cn7RQr1xiPIMTH5NTgNX9iJTVjOwH35oY5S10kwLvzPCuIkPGnOM fRikbQWyyIGkrXSG1Kf5FiU4K5euMdI38SAV1HuVvPUafQLwOmm//rd3UxLslEn/RQBP bKyng/zIQT0Fwx0mHRzmahtWLPw11JcQOVap6swLHTmq4TcdTzFGa95fg6JPHJ9iw7BF N8QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HM7ygPwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2si12265666pfd.356.2022.02.22.15.16.51; Tue, 22 Feb 2022 15:17:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HM7ygPwg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234840AbiBVSF2 (ORCPT + 99 others); Tue, 22 Feb 2022 13:05:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234581AbiBVSF1 (ORCPT ); Tue, 22 Feb 2022 13:05:27 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 196C217288D for ; Tue, 22 Feb 2022 10:05:02 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 82B83CE1801 for ; Tue, 22 Feb 2022 18:05:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08619C340E8; Tue, 22 Feb 2022 18:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645553098; bh=4rGunFeowv1Q7DwwOPcd8Fc+MZiAHpzWeM0Krnzv4VM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HM7ygPwgt7MgTBoq2EwQ9W8wWn2YcRDZepg0PMGUEB5XnA/zV2IhUp8hVtJxxL1u2 o648rmQHhU/CZX2bNh1McSd7PgMs6cjeJoeBIQY8xPn3fWyOnnFZ3ZKiBzM9JMRmFi 7eR6mFk5zWq6luOdz58sjZNZ3PlVCIu3XY8/ZXMBdn1FLE3ABYXi45ZgDI5xpTkW/k 4RACbVXMF6OpDgQRlMEEJ83ZiKpOtQGnOFRek8geYZutCY/ii88o6xzUNWaxbT7KMI fxSEpzZTDIKMN3qpWcK3bX8jlwUdmoSNdsIRMK57ddxoThA7Ul1zf3MFaVrPvxPRvG sclUXAwb9/W6A== Date: Tue, 22 Feb 2022 18:04:53 +0000 From: Mark Brown To: Srinivas Kandagatla Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com Subject: Re: [PATCH 10/16] ASoC: codecs: rx-macro: fix tlv min max range Message-ID: References: <20220222115933.9114-1-srinivas.kandagatla@linaro.org> <20220222115933.9114-11-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4fuKPQSv5bl+QP9H" Content-Disposition: inline In-Reply-To: <20220222115933.9114-11-srinivas.kandagatla@linaro.org> X-Cookie: I smell a wumpus. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4fuKPQSv5bl+QP9H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 22, 2022 at 11:59:27AM +0000, Srinivas Kandagatla wrote: > on Qualcomm codecs gain tlv control specifies min max range as both > negative to positive numbers like >=20 > SOC_SINGLE_S8_TLV("... Volume", .., -84, 40, gain) >=20 > However with recent boundary checks added in commit 817f7c9335ec0 > ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()) > setting a value above 40 gain will fail. >=20 > So fix this min max range correctly to > SOC_SINGLE_S8_TLV("... Volume", .., 0, 124, gain) > so that users can now set gain correctly Are you sure this isn't a bug in the core? -84..40 should be a valid range for a signed control. See Marek's fix in 9bdd10d57a ("ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min") though that only kicks in for systems with a platform_max. I can't immediately spot any other issues for S8 but I could be missing something. --4fuKPQSv5bl+QP9H Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIVJcUACgkQJNaLcl1U h9DDlQf/f2Ci6r9z/pr5qr0/dF0MmFwhyBNnZ33/mSONg5YGjV+uQQnjoVsAfTPT 30EXf2rI5VaRs6J2SrQIExE/fUhMJLkydyG4loHwr212AM4preDD9P00c0Mn8UkX q/eVLRLvFDLg08uBD2+xz0EzaqgF9bPcJ0Cxir+UWJG87Ai6W4k+5xy6TG5K5C5S QVuQZXuh2OKMRnlH+naPv6jjYhlHSRfIX3PwPdDvUluH/4fxJDhmZch71ogzkHsc sVxjDB2Rt73k/YT+74BzMLzn/cWVNYN18ZbQud2Q+WedRzbnH/uEoSsJWUX4bGbU tmv3Xzsr4xHQd9jeJcpZs5BCD13Qlg== =y7ad -----END PGP SIGNATURE----- --4fuKPQSv5bl+QP9H--