Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1023872pxb; Fri, 15 Apr 2022 18:42:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRLBCWceAOkTsRqsXKSVAieas2lupnixmq31uDnwhMlr3jKYCgVxSO95Gi/t7eXRjVk2Si X-Received: by 2002:a17:903:2292:b0:158:ec37:14b9 with SMTP id b18-20020a170903229200b00158ec3714b9mr62841plh.13.1650073363596; Fri, 15 Apr 2022 18:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650073363; cv=none; d=google.com; s=arc-20160816; b=kMRoBE8EISH3WRkK5jRubnMTlZxQrh0hjDD1oYg43FPrcDH1hCpUxvN0xda9f6ucwZ ojxlLsDP7njvwMmecDCh2yGS8IVhO2hogYKreiyTJtvreCTSRrAWhkGIqAiSURMnEs18 kwR4ZU4Mpr9aujPdi8Jtqg1kqCG9jZ/rcRiWBpt0SfLnzpcHcjvr0dELadDhihKBFvMM SgGDNiCkJD/4gdOWxcDJquqLiJ0aV7lmDemdEUNjL8ItelBA2qd9lY/dm18RuSg7zoI3 YZ0wYz9MzIPwjn9fYO6310RZYrZNORbw05cxSpQXqu5UAAzixqKIq5lMBOjAQIXdV+pB GQ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qy4t80tKvIEx6yk86/b0FyqrQQWJdfQJR7QgyR2X3n0=; b=FKMFqD8874zX6EorR4/i2LsVZuX4GfXo2uWX2fEjRfh+AUhrcSIAcnh2A9XldzPwhu u6x83gxTRzw/dV+B/BWp02bze+18jxDTBTTOaVSKDH8M0TBn8YHDjGzZ3NnzYZLLoPkH B9oJIvTF4ahY1Blrl9nu3RLPo7/WGtam57FK6IVGK05PWh7ubQUXvA+NIsXL4XSM2BL3 5vk0VOx1Kmkmtrrl3eB3Un9+HK6Tfwe+537B4fnuHy0ff7A99uWR31yFG6cXCmw/ySGr /O7fYzUs9EmCH7VgJCP8GKbwwSm1PwPOFtMC70TqqYmwlftd2uAp9n4mNVy7Ply5HOas Sg7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hq7Z2c4C; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n17-20020a637211000000b003816043f099si3000064pgc.654.2022.04.15.18.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:42:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Hq7Z2c4C; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F80CFFB45; Fri, 15 Apr 2022 18:07:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343664AbiDNNtD (ORCPT + 99 others); Thu, 14 Apr 2022 09:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344003AbiDNNaN (ORCPT ); Thu, 14 Apr 2022 09:30:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BEA0986ED; Thu, 14 Apr 2022 06:25:55 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id EB9E460BAF; Thu, 14 Apr 2022 13:25:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 070E4C385A5; Thu, 14 Apr 2022 13:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649942754; bh=o5371cJE9stQoyXeQEwyQlAvFQA7wqNjxzsAWeT8ShA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hq7Z2c4CiyZ7UJDn4n575i+Ay3rxA5OTe/JALXdLBf6i3fOvzMVpowS9ZI35xzqLs u5usvu6d5XkiCehIb83urR9+i/veJ19nrL9d9OtPnsARz4E4EpdOt6BL5BepNTCMTL hTB7VGpNy4b4fTF7spvEyqGVjgwpMW0kGoKd/FGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski , Pierre-Louis Bossart , Mark Brown Subject: [PATCH 4.19 250/338] ASoC: topology: Allow TLV control to be either read or write Date: Thu, 14 Apr 2022 15:12:33 +0200 Message-Id: <20220414110846.006922586@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110838.883074566@linuxfoundation.org> References: <20220414110838.883074566@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Amadeusz Sławiński commit feb00b736af64875560f371fe7f58b0b7f239046 upstream. There is no reason to force readwrite access on TLV controls. It can be either read, write or both. This is further evidenced in code where it performs following checks: if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ) && !sbe->get) return -EINVAL; if ((k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) && !sbe->put) return -EINVAL; Fixes: 1a3232d2f61d ("ASoC: topology: Add support for TLV bytes controls") Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220112170030.569712-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -547,7 +547,8 @@ static int soc_tplg_kcontrol_bind_io(str if (hdr->ops.info == SND_SOC_TPLG_CTL_BYTES && k->iface & SNDRV_CTL_ELEM_IFACE_MIXER - && k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE + && (k->access & SNDRV_CTL_ELEM_ACCESS_TLV_READ + || k->access & SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) && k->access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK) { struct soc_bytes_ext *sbe; struct snd_soc_tplg_bytes_control *be;