ASoC: tlv320aic3x: Add support for high power analog output
Subsystems (3)
PATCH 1/1 ASoC: tlv320aic3x: Add support for high power analog output
Add support to power and output level control for the analog high power output drivers HPOUT and HPCOM.
--- sound/soc/codecs/tlv320aic3x.c | 6 ++++++ 1 file changed, 6 insertions(+)
sound/soc/codecs/tlv320aic3x.c +6 -0
@@ -419,6 +419,12 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {/* Pop reduction */ SOC_ENUM ("Output Driver Power-On time" , aic3x_poweron_time_enum),SOC_ENUM ("Output Driver Ramp-up step" , aic3x_rampup_step_enum), + +/* Analog HPOUT, HPCOM power and output level controls */ +SOC_DOUBLE_R ("Analog output power control" ,HPROUT_CTRL , +HPRCOM_CTRL ,0 ,1 ,0 ), +SOC_DOUBLE_R ("Analog output level control" ,HPROUT_CTRL , + HPRCOM_CTRL, 4, 9, 0), };/* For other than tlv320aic3104 */
Signature · 1 line
2.17.1
Hi,
Quoted 13 lines · Saravanan Sekar
Add support to power and output level control for the analog high power output drivers HPOUT and HPCOM.
Signed-off-by Saravanan Sekar <[email protected]>--- sound/soc/codecs/tlv320aic3x.c | 6 ++++++ 1 file changed, 6 insertions(+)sound/soc/codecs/tlv320aic3x.c +0
-0
sound/soc/codecs/tlv320aic3x.c static const struct snd_kcontrol_new aic3x_snd_controls[] = { · line 425
Quoted 7 lines
sound/soc/codecs/tlv320aic3x.c +4
-0@@ -419,6 +419,12 @@ static const struct snd_kcontrol_new aic3x_snd_controls[] = {/* Pop reduction */ SOC_ENUM ("Output Driver Power-On time" , aic3x_poweron_time_enum),SOC_ENUM ("Output Driver Ramp-up step" , aic3x_rampup_step_enum), + +/* Analog HPOUT, HPCOM power and output level controls */ +SOC_DOUBLE_R ("Analog output power control" ,HPROUT_CTRL , + HPRCOM_CTRL, 0, 1, 0),
bit 0 of HPROUT_CTRL and HPRCOM_CTRL is handled by DAPM:
"Right HP Out"
"Right HP Com"
sound/soc/codecs/tlv320aic3x.c static const struct snd_kcontrol_new aic3x_snd_controls[] = { · line 427
Quoted 2 lines
sound/soc/codecs/tlv320aic3x.c +2
-0+SOC_DOUBLE_R ("Analog output level control" ,HPROUT_CTRL , + HPRCOM_CTRL, 4, 9, 0),
and this will modify the HPR and HPRCOM (right channels) only.
You should add two controls:
/* HP/HPCOM volumes. From 0 to 9 dB in 1 dB steps */ static DECLARE_TLV_DB_SCALE(hp_tlv, 0, 100, 0);
SOC_DOUBLE_R_TLV("HP Playback Volume", HPLOUT_CTRL, HPROUT_CTRL, 4, 9, 0, hp_tlv);
SOC_DOUBLE_R_TLV("HPCOM Playback Volume", HPLCOM_CTRL, HPRCOM_CTRL, 4, 9, 0, hp_tlv);
sound/soc/codecs/tlv320aic3x.c static const struct snd_kcontrol_new aic3x_snd_controls[] = { · line 430
Quoted 4 lines
sound/soc/codecs/tlv320aic3x.c +0
-0};/* For other than tlv320aic3104 */
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki