From patchwork Wed Feb 26 15:31:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13992697 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 4D89C223330; Wed, 26 Feb 2025 15:32:01 +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=1740583923; cv=none; b=KgOvKU1t5iKBcg0RW7IKawVxnlQDf/9P7dZ8/QEv0dUERSN6oWHcA+RRaFB+sV7OFCL7T4lUbnGPDC8cZn0xh4rJajfuoFsvP/Q8ETYGDKjJBmSAd7NqBRY5Myt3XlVtq8ULZ+roQ8nYy8iYh+qknDuwGtyoS3OpY9cFSb6A6sI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740583923; c=relaxed/simple; bh=7PL2a0pYqpxGj7m/8jbTANtV4BrQojfidbqo01qr87I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BwierJ8q88NDM5ZGUkIjZ/KxCngC8AMpAwJJp7Ca9JqOaJPjvASuGEyp938B9+4ganrYWM9fjnD4RJklrS867Mioca6Wb+/Y9nlvxc+QSo4RXs+aaHR4kclpMvIO0st7OxJzaSunhW0TLNkVAfUXzV6DNDM4/sjaSBZ9ibUip68= 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=gnlLf5SD; 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="gnlLf5SD" 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 51QFIYLi001993; Wed, 26 Feb 2025 09:31:39 -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=SO29ZLy3GoMLj2RoXmT3DmjFyoNiaUd94wC0PfaHtC8=; b= gnlLf5SD4AzMbT/pOsdHsE+g6iI+yZxJ3JaRDlziB1Nor9zlRMMxq7zsGiWyCdSY Bqem92h4y9Y1YMSogD7ZEKvGgqIqFo/4Sp6RVZoKDF7qZprF1IAXXKWN/YRKZlMo HZA66aUEESSUgq3zME7IlS1u/FMpV9DIBzB8lr32h+bpSMqJM9IZMREn+or2qTcQ mQuzOZv/UWnCbcxjmIAypZuuPvDAy0r2GZa62V8cl8nE8oj72iC+aZkhTmnh+uBh RPKVROJFziUNBT0/K8M+dd9tS4uSV6IszlbRl2Kjhs8UKSsn4+EokK5DhEDxyC6e Up5rogPT5JUeuVwPd1mRBQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 451pspsr13-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Feb 2025 09:31:39 -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; Wed, 26 Feb 2025 15:31:37 +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; Wed, 26 Feb 2025 15:31:37 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id A6D1082255D; Wed, 26 Feb 2025 15:31:37 +0000 (UTC) From: Charles Keepax To: CC: , , , , , , , , , , , , , Subject: [PATCH 04/12] ASoC: wcd938x: Use SOC_SINGLE_EXT_TLV() helper macro Date: Wed, 26 Feb 2025 15:31:29 +0000 Message-ID: <20250226153137.2791938-5-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250226153137.2791938-1-ckeepax@opensource.cirrus.com> References: <20250226153137.2791938-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-GUID: QnqpcPlTYlyNX6ja4c7eifiDVuGeIiNw X-Proofpoint-ORIG-GUID: QnqpcPlTYlyNX6ja4c7eifiDVuGeIiNw X-Authority-Analysis: v=2.4 cv=U8ZoDfru c=1 sm=1 tr=0 ts=67bf33db cx=c_pps a=uGhh+3tQvKmCLpEUO+DX4w==:117 a=uGhh+3tQvKmCLpEUO+DX4w==:17 a=T2h4t0Lz3GQA:10 a=w1d2syhTAAAA:8 a=NENWR2pWs0l2DgI0U44A:9 a=YXXWInSmI4Sqt1AkVdoW:22 X-Proofpoint-Spam-Reason: safe Rather than open coding use the helper macro provided by the ASoC core. Signed-off-by: Charles Keepax --- 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,