From patchwork Mon Mar 3 17:14:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13999254 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1E6425F791; Mon, 3 Mar 2025 17:14:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741022097; cv=none; b=PNDMixCfN5IyD58cL6FRY9Mz5tp5DHTaEag4COIfkgTF9IVEg3rP2R2Vxz/Vp+t2+G1qSy+DYa9ztSoscj9u5f3QrGXmzUTlUf6viu7XmQNFjEbpymR384sIItIZylBKlbrDHyf/fC6KnpW2h6hHEurj5LMhnoBZ/I7+8RBfpRI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741022097; c=relaxed/simple; bh=wG8RmxGE/9cd6ErL0xuSKrXtwYenrbnnBnS0smbNxwU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Vpv+S7utkFacG+BCC7XHpP4ZNH7KWOAGvN1nVdO+miazbe/jV2ZkIgmuN7KIiqLe6/mR4w/ZXBSGfBCJALviBJd/AlGZxlq+rfh4Sc3XhC5ArnKf1YLvmbLCg7cmoZ64AC2I4tTLvOaaHyDI2PPNfr+/GZnHLrIXTaG2dyOX7Hs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=KnYgLKYR; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="KnYgLKYR" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5236w7Xc006077; Mon, 3 Mar 2025 11:14:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=elpnGFKd2sMkgfwPUllkF4/ZpBdRW6NIyueefzyTUK8=; b= KnYgLKYRR7JLLuvHTJ7pjmqKqP6oTZQUnJKIb7YrVyqEjHmOKzsdTIpVYePk2GD3 wAXH97eWw6uTeuFL+fMuzFeyXlXisVRxLCslGp/CxnZLSuHdTHdhHmIJ9uKs0PPK 596muw6ty2X5sVLIhbacF/0nUQUksFG7GbeGiA4vLzrNUwz4TDrqLhC8GGoNjvPg 1pKY/bBERf9fLV3ZlG7toLhey7ecxfLxngGguljJ2voFEA/BDNAe0ZRX/jU5YKaM BCXhZVnLFxdv3/5kkbcDaacscsu5Xmsy7AX7AS87glOv5aiP844oWDAx0r3jB2dz MYwlfDtSy+5Ml0C+FIfaHQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 453yhmdame-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Mar 2025 11:14:35 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.14; Mon, 3 Mar 2025 17:14:24 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.14 via Frontend Transport; Mon, 3 Mar 2025 17:14:24 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 8085882026B; Mon, 3 Mar 2025 17:14:24 +0000 (UTC) From: Charles Keepax To: CC: , , , , , , , , , , , , , Subject: [PATCH v2 05/13] ASoC: wcd938x: Use SOC_SINGLE_EXT_TLV() helper macro Date: Mon, 3 Mar 2025 17:14:16 +0000 Message-ID: <20250303171424.444556-6-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250303171424.444556-1-ckeepax@opensource.cirrus.com> References: <20250303171424.444556-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 731vuGkETL9xZlDTgXUq51Hy4TZ5_qAO X-Authority-Analysis: v=2.4 cv=UeirSLSN c=1 sm=1 tr=0 ts=67c5e37b cx=c_pps a=uGhh+3tQvKmCLpEUO+DX4w==:117 a=uGhh+3tQvKmCLpEUO+DX4w==:17 a=Vs1iUdzkB0EA:10 a=w1d2syhTAAAA:8 a=NENWR2pWs0l2DgI0U44A:9 a=YXXWInSmI4Sqt1AkVdoW:22 X-Proofpoint-GUID: 731vuGkETL9xZlDTgXUq51Hy4TZ5_qAO X-Proofpoint-Spam-Reason: safe Rather than open coding use the helper macro provided by the ASoC core. Signed-off-by: Charles Keepax --- No changes since v1. sound/soc/codecs/wcd938x.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c index f2a4f3262bdbc..b536e8bdc5a74 100644 --- a/sound/soc/codecs/wcd938x.c +++ b/sound/soc/codecs/wcd938x.c @@ -70,13 +70,8 @@ #define WCD_MBHC_HS_V_MAX 1600 #define WCD938X_EAR_PA_GAIN_TLV(xname, reg, shift, max, invert, tlv_array) \ -{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\ - SNDRV_CTL_ELEM_ACCESS_READWRITE,\ - .tlv.p = (tlv_array), \ - .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\ - .put = wcd938x_ear_pa_put_gain, \ - .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) } + SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, snd_soc_get_volsw, \ + wcd938x_ear_pa_put_gain, tlv_array) enum { WCD9380 = 0,