Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp784939pxb; Tue, 5 Apr 2022 23:13:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq4mMEFfjeQ1l1WLYUHmpN1xeeJoSu6F3OsipI74FEJRPqYbfn48BBqROUe5yAntM3pQt1 X-Received: by 2002:a17:903:2d0:b0:14d:8a8d:cb1 with SMTP id s16-20020a17090302d000b0014d8a8d0cb1mr7082496plk.50.1649225596762; Tue, 05 Apr 2022 23:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649225596; cv=none; d=google.com; s=arc-20160816; b=ED3KDgLWHneaphyH7rJqDBDIMjRdr0IY6H7gpgL78xbU3LjXr/deHTMUQjJQntDiyN w4+5wwFrHRXQAoOCKvmgfrVmlB05lNsniTQlArRxCqd2wK6BM/c84uTdT9ZSkZKseyEc Iabv05pbS79LJCYyncCDlS9E+odfemSIxrlD33wiiMUEU/ABvwo/zvFx7ef5XctMlaM8 Pcvi6nMOtBd5Amr+UC8TcOL1KNkAYhhtXQdCsky/Q/TXiEMfOigV+UtQtrZOH04G/J0P VgGScIZAgZhLs4ANF1YE2m0mI4TqpP1H4MWs2dubFCiEM/G1+osJWkvSVJNd7xTzb8tb JS6A== 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=13KMNtqia7e4ERvoLlHLwY/o1znGqJgbYF7Beesrqwo=; b=quGQMuZxfiUG87z16SvarkzRwBBOQaSqt30xcZ4LxrRWorT9/aCaS4iskTEAOi9BH9 fSa4h2vhRnHPMJ8xb8s3SHf2HNeuieXCc9nxPNwE5mkI5o6PynS3P0ZTioXF7Cq+VoJI HHfw2xD5WpwPgOEI5lWywlwdq5AaqeQIo+ZsXL43gIrBySbsN+IRjuNhri1ads7h4GkI LII4hA7L2PFjd416GCMhN3ct32xwhbKf0oPJt4Gnj1XGsOveRqN+86yQA0Teg8uXGBH0 64gYzoJfEcgXz5Rb07Ptj1E0SLMYT8jACCCj3Cb/DXEgDZzg8oZyRarrPIzyRbDIQz2L nnjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GDhb8N5K; 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 u16-20020a170903125000b00153b2d1650dsi16388290plh.277.2022.04.05.23.13.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:13:16 -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=GDhb8N5K; 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 2A15548D033; Tue, 5 Apr 2022 23:02:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1583687AbiDEX4F (ORCPT + 99 others); Tue, 5 Apr 2022 19:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354222AbiDEKMT (ORCPT ); Tue, 5 Apr 2022 06:12:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E90CA5A174; Tue, 5 Apr 2022 02:59:09 -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 ams.source.kernel.org (Postfix) with ESMTPS id 99A54B81B96; Tue, 5 Apr 2022 09:59:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4D5AC385A2; Tue, 5 Apr 2022 09:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152747; bh=LFr0ow7C1etuOPjQBf0ZmzB4Uc20TLoYVUb1YhhgUic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GDhb8N5KrPk6grrYk1yMMZOelUdTBYpF0PFrJHPUS189hR3YMmTQU73rlWiaJW3cA ODWpz4+5FcdBRl5KZFVOpeAf43QVdyeZfaa1Lf7kq5fTucLzwpU3vIPt1ZhzrfFtA1 TUa21ti27TGHiH3ZIbbhTw+gmst9EyIptOq3wMhI= 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 5.15 888/913] ASoC: topology: Allow TLV control to be either read or write Date: Tue, 5 Apr 2022 09:32:30 +0200 Message-Id: <20220405070406.437875240@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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 @@ -510,7 +510,8 @@ static int soc_tplg_kcontrol_bind_io(str if (le32_to_cpu(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;