Skip to content

Commit 0593d46

Browse files
kopolibroonie
authored andcommitted
sgtl5000: add Lineout volume control
This controls the volume for the line out pins of SGTL5000. Signed-off-by: Fabien Lahoudere <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 8419caa commit 0593d46

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/soc/codecs/sgtl5000.c

+10
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ static const DECLARE_TLV_DB_RANGE(mic_gain_tlv,
385385
/* tlv for hp volume, -51.5db to 12.0db, step .5db */
386386
static const DECLARE_TLV_DB_SCALE(headphone_volume, -5150, 50, 0);
387387

388+
/* tlv for lineout volume, 31 steps of .5db each */
389+
static const DECLARE_TLV_DB_SCALE(lineout_volume, -1550, 50, 0);
390+
388391
static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
389392
/* SOC_DOUBLE_S8_TLV with invert */
390393
{
@@ -413,6 +416,13 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = {
413416

414417
SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL,
415418
0, 3, 0, mic_gain_tlv),
419+
420+
SOC_DOUBLE_TLV("Lineout Playback Volume",
421+
SGTL5000_CHIP_LINE_OUT_VOL,
422+
SGTL5000_LINE_OUT_VOL_LEFT_SHIFT,
423+
SGTL5000_LINE_OUT_VOL_RIGHT_SHIFT,
424+
0x1f, 1,
425+
lineout_volume),
416426
};
417427

418428
/* mute the codec used by alsa core */

0 commit comments

Comments
 (0)