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 :)
------=_Part_104608_4345427.1227184976448
Content-Type: application/octet-stream; name=kcontrols-patch
Content-Transfer-Encoding: base64
X-Attachment-Id: f_fnrem0fl0
Content-Disposition: attachment; filename=kcontrols-patch
RnJvbSAyMjhiOTEyYmVmNzRjNGYyMmY0YWZhYTAzMWFjMGNlMGZlZjY1MmYxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBjaG5hdmVlbmtyaXNobmEgPGNobmF2ZWVuQGNobmF2ZWVuLm1p
c3RyYWwuaW4+CkRhdGU6IFRodSwgMjAgTm92IDIwMDggMTg6MTE6NDUgKzA1MzAKU3ViamVjdDog
W1BBVENIXSBLY29udHJvbHMgZm9yIGdhaW4gc2VsZWN0aW9uIGFuZCBlbmFibGluZywgZGlzYWJs
aW5nIHRoZSBBREMsIERBQy0yCgotLS0KIHNvdW5kL3NvYy9jb2RlY3MvdHdsNDAzMC5jIHwgICA2
MSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKys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W5lIEdhaW4iLAorICAg
ICAgICAgICAgICAgIFRXTDQwMzBfUkVHX0FSWEwyUEdBLCBUV0w0MDMwX1JFR19BUlhSMlBHQSwK
KyAgICAgICAgICAgICAgICAwLCA2MywgMCksCisKKyAgICAgICAgLyogTWFzdGVyIENhcHR1cmUg
R2FpbiBjb250cm9scyAqLworICAgICAgICBTT0NfRE9VQkxFX1IoIk1hc3RlciBDYXB0dXJlIEdh
aW4iLAorICAgICAgICAgICAgICAgIFRXTDQwMzBfUkVHX0FUWEwxUEdBLCBUV0w0MDMwX1JFR19B
VFhSMVBHQSwKKyAgICAgICAgICAgICAgICAwLCAzMSwgMCksCisKKyAgICAgICAgLyogSGVhZHNl
dCB2b2x1bWUgY29udHJvbHMgKi8KKyAgICAgICAgU09DX0RPVUJMRSgiSGVhZHNldCBWb2x1bWUi
LAorICAgICAgICAgICAgICAgIFRXTDQwMzBfUkVHX0hTX0dBSU5fU0VULCAyLCAwLCAzLCAwKSwK
KworICAgICAgICAvKiBFYXIgUGllY2Ugdm9sdW1lIGNvbnRyb2xzICovCisgICAgICAgIFNPQ19T
SU5HTEUoIkVhcnBpZWNlIFZvbHVtZSIsCisgICAgICAgICAgICAgICAgVFdMNDAzMF9SRUdfRUFS
X0NUTCwgNCwgMywgMCksCisKKyAgICAgICAgLyogSW50ZXJuYWwgQ2xhc3MgRCBTcGVha2VyIHZv
bHVtZSBjb250cm9scyAqLworICAgICAgICBTT0NfRE9VQkxFX1IoIkludGVybmFsIFNwZWFrZXIg
Vm9sdW1lIiwKKyAgICAgICAgICAgICAgICBUV0w0MDMwX1JFR19BUlhMMl9BUEdBX0NUTCwgVFdM
NDAzMF9SRUdfQVJYUjJfQVBHQV9DVEwsCisgICAgICAgICAgICAgICAgIDMsIDE3LCAwKSwKKwor
ICAgICAgICAvKiBFeHRlcm5hbCBDbGFzcyBEIFNwZWFrZXIgdm9sdW1lIGNvbnRyb2xzICovCisg
ICAgICAgIFNPQ19ET1VCTEVfUigiRXh0ZX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gVFdMNDAzMF9SRUdfQVZEQUNfQ1RMLCAyLCAxLCAwKSwKKwogfTsKIAogLyogYWRkIG5vbiBk
YXBtIGNvbnRyb2xzICovCi0tIAoxLjUuMy40Cgo=
------=_Part_104608_4345427.1227184976448--