aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2007-11-07 07:03:12 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:18 -0500
commit9b35947fcd697001332d0bb2adf6fbc419f5dd4f (patch)
tree4c02e5b659153593db260c1c513aedfe2a309bbd /sound/pci/hda/patch_sigmatel.c
parent690eceb58ca900a55ae0cec5e8770ac166a881d8 (diff)
[ALSA] hda: STAC92HD71 codec mixer
Added analog loopback support and missing ADC capture mixer for the STAC92HD71 codec family. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f6e00c4ff325..d498ce12362b 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -391,6 +391,11 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
391 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 391 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
392 /* connect headphone jack to dac1 */ 392 /* connect headphone jack to dac1 */
393 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, 393 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
394 /* connect ports 0d and 0f to audio mixer */
395 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2},
396 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
397 /* unmute dac0 input in audio mixer */
398 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f},
394 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ 399 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
395 { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 400 { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
396 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 401 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
@@ -465,6 +470,17 @@ static struct hda_verb stac9205_core_init[] = {
465 .private_value = verb_read | (verb_write << 16), \ 470 .private_value = verb_read | (verb_write << 16), \
466 } 471 }
467 472
473#define STAC_VOLKNOB(knob_nid) \
474 { \
475 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
476 .name = "Master Playback Volume", \
477 .count = 1, \
478 .info = stac92xx_volknob_info, \
479 .get = stac92xx_volknob_get, \
480 .put = stac92xx_volknob_put, \
481 .private_value = 127 | (knob_nid << 16), \
482 }
483
468static struct snd_kcontrol_new stac9200_mixer[] = { 484static struct snd_kcontrol_new stac9200_mixer[] = {
469 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), 485 HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT),
470 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), 486 HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT),
@@ -481,12 +497,19 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
481 STAC_VOLKNOB(0x28), 497 STAC_VOLKNOB(0x28),
482 498
483 /* hardware gain controls */ 499 /* hardware gain controls */
484 HDA_CODEC_VOLUME("Digital Mic 1 Volume", 0x18, 0, HDA_OUTPUT), 500 HDA_CODEC_VOLUME_IDX("Digital Mic Volume", 0x0, 0x18, 0x0, HDA_OUTPUT),
485 HDA_CODEC_VOLUME("Digital Mic 2 Volume", 0x19, 0, HDA_OUTPUT), 501 HDA_CODEC_VOLUME_IDX("Digital Mic Volume", 0x1, 0x19, 0x0, HDA_OUTPUT),
502
503 HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT),
504 HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT),
505 HDA_CODEC_VOLUME_IDX("Capture Mux Volume", 0x0, 0x1a, 0x0, HDA_OUTPUT),
506
507 HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x1d, 0x0, HDA_OUTPUT),
508 HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x1d, 0x0, HDA_OUTPUT),
509 HDA_CODEC_VOLUME_IDX("Capture Mux Volume", 0x1, 0x1b, 0x0, HDA_OUTPUT),
486 510
487 HDA_CODEC_VOLUME("Capture Volume", 0x1c, 0, HDA_OUTPUT), 511 HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
488 HDA_CODEC_MUTE("Capture Switch", 0x1c, 0, HDA_OUTPUT), 512 HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
489 HDA_CODEC_VOLUME("Capture Mux Volume", 0x1a, 0, HDA_OUTPUT),
490 { } /* end */ 513 { } /* end */
491}; 514};
492 515