[alsa-devel] [PATCH 18/19] ASoC: upd9976: add capture volume for analog inputs
Lu Guanqun
guanqun.lu at intel.com
Wed May 4 15:46:24 CEST 2011
Signed-off-by: Lu Guanqun <guanqun.lu at intel.com>
---
sound/soc/codecs/upd9976.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/upd9976.c b/sound/soc/codecs/upd9976.c
index f345db1..6fc9902 100644
--- a/sound/soc/codecs/upd9976.c
+++ b/sound/soc/codecs/upd9976.c
@@ -110,6 +110,11 @@ static int upd9976_mic2_bias_event(struct snd_soc_dapm_widget *widget,
*/
static DECLARE_TLV_DB_SCALE(mixer_tlv, -2500, 100, 0);
+/*
+ * Analog Volume: from -25 dB to 6 dB in 1 dB steps.
+ */
+static DECLARE_TLV_DB_SCALE(analog_tlv, -2500, 100, 0);
+
static const struct snd_kcontrol_new upd9976_snd_controls[] = {
SOC_DOUBLE_R_TLV("Headphone & Speaker Volume",
UPD9976_HPSPRLVOL, UPD9976_HPSPRRVOL,
@@ -117,6 +122,9 @@ static const struct snd_kcontrol_new upd9976_snd_controls[] = {
SOC_SINGLE("Internal Mic Switch", UPD9976_DMICCTRL1, 6, 1, 0),
SOC_DOUBLE_R("Analog Mic Switch", UPD9976_LILSEL, UPD9976_LIRSEL,
6, 1, 0),
+ SOC_DOUBLE_R_TLV("Analog Capture Volume",
+ UPD9976_LILSEL, UPD9976_LILSEL,
+ 0, 0x1f, 1, analog_tlv),
};
static const struct snd_kcontrol_new upd9976_hp_spkr_mixer_left_controls[] = {
More information about the Alsa-devel
mailing list