Here i submit the patch for the kcontrols for ASoC TWL4030 CODEC. This patch comes next to my first patch. There seems some MUA issue so i attached the patch. >From 228b912bef74c4f22f4afaa031ac0ce0fef652f1 Mon Sep 17 00:00:00 2001 From: chnaveenkrishna <chnaveen@xxxxxxxxxxxxxxxxxxx> Date: Thu, 20 Nov 2008 18:11:45 +0530 Subject: [PATCH] Kcontrols for gain selection and enabling, disabling the ADC, DAC-2 --- sound/soc/codecs/twl4030.c | 61 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 55 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 3bc42b3..f258ea2 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -190,12 +190,61 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) } static const struct snd_kcontrol_new twl4030_snd_controls[] = { - SOC_DOUBLE_R("Master Playback Volume", - TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, - 0, 127, 0), - SOC_DOUBLE_R("Capture Volume", - TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA, - 0, 127, 0), + + /* Master Playback Volume Controls */ + SOC_DOUBLE_R("Master PLayback Course Gain", + TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, + 6, 3, 0), + + SOC_DOUBLE_R("Master Playback Fine Gain", + TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA, + 0, 63, 0), + + /* Master Capture Gain controls */ + SOC_DOUBLE_R("Master Capture Gain", + TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA, + 0, 31, 0), + + /* Headset volume controls */ + SOC_DOUBLE("Headset Volume", + TWL4030_REG_HS_GAIN_SET, 2, 0, 3, 0), + + /* Ear Piece volume controls */ + SOC_SINGLE("Earpiece Volume", + TWL4030_REG_EAR_CTL, 4, 3, 0), + + /* Internal Class D Speaker volume controls */ + SOC_DOUBLE_R("Internal Speaker Volume", + TWL4030_REG_ARXL2_APGA_CTL, TWL4030_REG_ARXR2_APGA_CTL, + 3, 17, 0), + + /* External Class D Speaker volume controls */ + SOC_DOUBLE_R("External Speaker Volume", + TWL4030_REG_PREDL_CTL, TWL4030_REG_PREDR_CTL, + 4, 3, 0), + + /* Predriver Carkit volume controls */ + SOC_DOUBLE_R("Pre Car-Kit Volume", + TWL4030_REG_PRECKL_CTL, TWL4030_REG_PRECKR_CTL, + 4, 3, 0), + + SOC_DOUBLE("Main + Sub Mic Capture Gain", + TWL4030_REG_ANAMIC_GAIN, 3 , 0, 5, 0), + + /* Loop gain controls*/ + SOC_DOUBLE("Loop Gain", TWL4030_REG_ATX2ARXPGA, + 3 , 0, 7, 0), + + /* Left and Right ADC Switches */ + SOC_SINGLE("ADCL", TWL4030_REG_AVADC_CTL, 3, 1, 0), + + SOC_SINGLE("ADCR", TWL4030_REG_AVADC_CTL, 1, 1, 0), + + /* Left and Right DAC-2 Switches */ + SOC_SINGLE("DACL2", TWL4030_REG_AVDAC_CTL, 3, 1, 0), + + SOC_SINGLE("DACR2", TWL4030_REG_AVDAC_CTL, 2, 1, 0), + }; /* add non dapm controls */ -- 1.5.3.4 -- Thanks, (: Naveen Krishna Ch :)
Attachment:
kcontrols-patch
Description: Binary data
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel