From: Siarhei Volkau <lis8215@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Siarhei Volkau <lis8215@gmail.com>,
Paul Cercueil <paul@crapouillou.net>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
linux-mips@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3 7/7] ASoC: codecs: jz4725b: add missed microphone widgets
Date: Sun, 16 Oct 2022 16:26:48 +0300 [thread overview]
Message-ID: <20221016132648.3011729-8-lis8215@gmail.com> (raw)
In-Reply-To: <20221016132648.3011729-1-lis8215@gmail.com>
Microphone input can be single ended or differential, although
known SoCs with that codec expose MIC1P only.
Also there is 20dB mic boost in the Mic1 path.
Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
---
sound/soc/codecs/jz4725b.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c
index 52b2bb95b..685ba1d3a 100644
--- a/sound/soc/codecs/jz4725b.c
+++ b/sound/soc/codecs/jz4725b.c
@@ -175,6 +175,15 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(jz4725b_out_tlv,
12, 23, TLV_DB_SCALE_ITEM(-1050, 100, 0),
24, 31, TLV_DB_SCALE_ITEM( 100, 50, 0),
);
+static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_mic_boost_tlv, 0, 2000, 0);
+
+static const char * const jz4725b_mic_mode_texts[] = {
+ "Single Ended", "Differential",
+};
+
+static const struct soc_enum jz4725b_mic_mode_enum =
+ SOC_ENUM_SINGLE(JZ4725B_CODEC_REG_CR3, REG_CR3_MICDIFF_OFFSET,
+ 2, jz4725b_mic_mode_texts);
static const struct snd_kcontrol_new jz4725b_codec_controls[] = {
SOC_DOUBLE_TLV("DAC Playback Volume",
@@ -219,6 +228,13 @@ static const struct snd_kcontrol_new jz4725b_codec_controls[] = {
SOC_SINGLE("High-Pass Filter Capture Switch",
JZ4725B_CODEC_REG_CR2,
REG_CR2_ADC_HPF_OFFSET, 1, 0),
+
+ SOC_ENUM("Mic Mode Capture Switch", jz4725b_mic_mode_enum),
+
+ SOC_SINGLE_TLV("Mic1 Boost Capture Volume",
+ JZ4725B_CODEC_REG_PMR2,
+ REG_PMR2_GIM_OFFSET,
+ 1, 0, jz4725b_mic_boost_tlv),
};
static const char * const jz4725b_codec_adc_src_texts[] = {
--
2.36.1
next prev parent reply other threads:[~2022-10-16 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-16 13:26 [PATCH v3 0/7] ASoC: codecs: jz4725b: Various improvements and fixes Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 1/7] ASoC: codecs: jz4725b: add missed Line In power control bit Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 2/7] ASoC: codecs: jz4725b: fix reported volume for Master ctl Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 3/7] ASoC: codecs: jz4725b: use right control for Capture Volume Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 4/7] ASoC: codecs: jz4725b: fix capture selector naming Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 5/7] ASoC: codecs: jz4725b: use right control for Master Playback Siarhei Volkau
2022-10-16 13:26 ` [PATCH v3 6/7] ASoC: codecs: jz4725b: add missed Mixer inputs Siarhei Volkau
2022-10-16 13:26 ` Siarhei Volkau [this message]
2022-10-18 11:28 ` [PATCH v3 0/7] ASoC: codecs: jz4725b: Various improvements and fixes Mark Brown
2022-10-20 11:58 ` Siarhei Volkau
2022-10-20 12:01 ` Paul Cercueil
2022-10-20 12:14 ` Mark Brown
2022-10-20 12:29 ` Siarhei Volkau
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=20221016132648.3011729-8-lis8215@gmail.com \
--to=lis8215@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).