diff options
| author | Peter Ujfalusi <peter.ujfalusi@nokia.com> | 2010-10-13 04:56:28 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-10-13 06:40:47 -0400 |
| commit | cf4bb69884c8f6a5791e0e251f0b9dc5d32fc256 (patch) | |
| tree | ad40bf2f51ae7353edd6cb6ae3bbe66951996ea7 | |
| parent | ec588ae6c21ae20a22ce13a287728a220935b8ee (diff) | |
ASoC: tlv320dac33: Control for line output gain
New control to select the line output gain.
This gain control affects the linein-to-lineout and
dac-to-loneout gain differently.
Use enum type to select the desired gain combination.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| -rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index bf6d01f4a45a..58349dcd1a6e 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
| @@ -524,6 +524,22 @@ static const struct soc_enum dac33_fifo_mode_enum = | |||
| 524 | SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(dac33_fifo_mode_texts), | 524 | SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(dac33_fifo_mode_texts), |
| 525 | dac33_fifo_mode_texts); | 525 | dac33_fifo_mode_texts); |
| 526 | 526 | ||
| 527 | /* L/R Line Output Gain */ | ||
| 528 | static const char *lr_lineout_gain_texts[] = { | ||
| 529 | "Line -12dB DAC 0dB", "Line -6dB DAC 6dB", | ||
| 530 | "Line 0dB DAC 12dB", "Line 6dB DAC 18dB", | ||
| 531 | }; | ||
| 532 | |||
| 533 | static const struct soc_enum l_lineout_gain_enum = | ||
| 534 | SOC_ENUM_SINGLE(DAC33_LDAC_PWR_CTRL, 0, | ||
| 535 | ARRAY_SIZE(lr_lineout_gain_texts), | ||
| 536 | lr_lineout_gain_texts); | ||
| 537 | |||
| 538 | static const struct soc_enum r_lineout_gain_enum = | ||
| 539 | SOC_ENUM_SINGLE(DAC33_RDAC_PWR_CTRL, 0, | ||
| 540 | ARRAY_SIZE(lr_lineout_gain_texts), | ||
| 541 | lr_lineout_gain_texts); | ||
| 542 | |||
| 527 | /* | 543 | /* |
| 528 | * DACL/R digital volume control: | 544 | * DACL/R digital volume control: |
| 529 | * from 0 dB to -63.5 in 0.5 dB steps | 545 | * from 0 dB to -63.5 in 0.5 dB steps |
| @@ -541,6 +557,8 @@ static const struct snd_kcontrol_new dac33_snd_controls[] = { | |||
| 541 | DAC33_LDAC_DIG_VOL_CTRL, DAC33_RDAC_DIG_VOL_CTRL, 7, 1, 1), | 557 | DAC33_LDAC_DIG_VOL_CTRL, DAC33_RDAC_DIG_VOL_CTRL, 7, 1, 1), |
| 542 | SOC_DOUBLE_R("Line to Line Out Volume", | 558 | SOC_DOUBLE_R("Line to Line Out Volume", |
| 543 | DAC33_LINEL_TO_LLO_VOL, DAC33_LINER_TO_RLO_VOL, 0, 127, 1), | 559 | DAC33_LINEL_TO_LLO_VOL, DAC33_LINER_TO_RLO_VOL, 0, 127, 1), |
| 560 | SOC_ENUM("Left Line Output Gain", l_lineout_gain_enum), | ||
| 561 | SOC_ENUM("Right Line Output Gain", r_lineout_gain_enum), | ||
| 544 | }; | 562 | }; |
| 545 | 563 | ||
| 546 | static const struct snd_kcontrol_new dac33_mode_snd_controls[] = { | 564 | static const struct snd_kcontrol_new dac33_mode_snd_controls[] = { |
