From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <broonie@kernel.org>, <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: [PATCH 1/5] ASoC: soc.h: Add SOC_SINGLE_S_TLV() macro
Date: Fri, 18 Mar 2022 16:29:39 +0000 [thread overview]
Message-ID: <20220318162943.1578102-2-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20220318162943.1578102-1-rf@opensource.cirrus.com>
Add a convenience macro for defining a single (mono) TLV control
with a signed value. This can already be done by using
SOC_DOUBLE_R_S_TLV() with the same address for left and right
registers, but a dedicated macro is more readable.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
include/sound/soc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 7a1650b303f1..e063b1ea9634 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -176,6 +176,8 @@
.get = snd_soc_get_volsw, .put = snd_soc_put_volsw, \
.private_value = SOC_DOUBLE_R_S_VALUE(reg_left, reg_right, xshift, \
xmin, xmax, xsign_bit, xinvert) }
+#define SOC_SINGLE_S_TLV(xname, xreg, xshift, xmin, xmax, xsign_bit, xinvert, tlv_array) \
+ SOC_DOUBLE_R_S_TLV(xname, xreg, xreg, xshift, xmin, xmax, xsign_bit, xinvert, tlv_array)
#define SOC_SINGLE_S8_TLV(xname, xreg, xmin, xmax, tlv_array) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
--
2.30.2
next prev parent reply other threads:[~2022-03-18 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 16:29 [PATCH 0/5] ASoC: Add a driver for the Cirrus Logic CS35L45 Smart Amplifier Richard Fitzgerald
2022-03-18 16:29 ` Richard Fitzgerald [this message]
2022-03-18 16:29 ` [PATCH 2/5] ASoC: soc-utils: Add helper to calculate BCLK from TDM info Richard Fitzgerald
2022-03-18 16:29 ` [PATCH 3/5] ASoC: soc-utils: Add kunit test for snd_soc_tdm_params_to_bclk() Richard Fitzgerald
2022-03-18 16:29 ` [PATCH 4/5] ASoC: dt-bindings: cs35l45: Cirrus Logic CS35L45 Smart Amp Richard Fitzgerald
2022-03-28 23:35 ` Rob Herring
2022-03-18 16:29 ` [PATCH 5/5] ASoC: cs35l45: Add driver for " Richard Fitzgerald
2022-04-05 13:51 ` Richard Fitzgerald
2022-04-06 13:28 ` [PATCH 0/5] ASoC: Add a driver for the Cirrus Logic CS35L45 Smart Amplifier Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220318162943.1578102-2-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox