aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2007-12-14 06:08:04 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:34 -0500
commit541eee8768b60ffc233f5ca0796a4cef54df699b (patch)
tree26b9f2a6fe7e037797e063cd8045003663e05ab5 /sound/pci/hda/patch_sigmatel.c
parent71685b90d2efab9ff3c94b7b1169e83449ab3a1f (diff)
[ALSA] hda: Added more 92HD71 codecs
Added more codecs to the 92HD71 family, as well as support for several that don't have an analog mixer. 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.c68
1 files changed, 62 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4bca790e045c..8598951005d8 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -532,9 +532,24 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
532 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 532 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
533 /* connect headphone jack to dac1 */ 533 /* connect headphone jack to dac1 */
534 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, 534 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
535 { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */
536 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
537 { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
538 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
539 { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
540 /* unmute mono out node */
541 { 0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
542};
543
544static struct hda_verb stac92hd71bxx_analog_core_init[] = {
545 /* set master volume and direct control */
546 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
547 /* connect headphone jack to dac1 */
548 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
535 /* connect ports 0d and 0f to audio mixer */ 549 /* connect ports 0d and 0f to audio mixer */
536 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2}, 550 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2},
537 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, 551 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
552 { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
538 /* unmute dac0 input in audio mixer */ 553 /* unmute dac0 input in audio mixer */
539 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f}, 554 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f},
540 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ 555 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
@@ -714,7 +729,7 @@ static struct snd_kcontrol_new stac92hd73xx_10ch_mixer[] = {
714 { } /* end */ 729 { } /* end */
715}; 730};
716 731
717static struct snd_kcontrol_new stac92hd71bxx_mixer[] = { 732static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
718 STAC_DIGITAL_INPUT_SOURCE(1), 733 STAC_DIGITAL_INPUT_SOURCE(1),
719 STAC_INPUT_SOURCE(2), 734 STAC_INPUT_SOURCE(2),
720 735
@@ -735,6 +750,25 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
735 { } /* end */ 750 { } /* end */
736}; 751};
737 752
753static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
754 STAC_DIGITAL_INPUT_SOURCE(1),
755 STAC_INPUT_SOURCE(2),
756 STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2),
757
758 /* hardware gain controls */
759 HDA_CODEC_VOLUME_IDX("Digital Mic Volume", 0x0, 0x18, 0x0, HDA_OUTPUT),
760 HDA_CODEC_VOLUME_IDX("Digital Mic Volume", 0x1, 0x19, 0x0, HDA_OUTPUT),
761
762 HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT),
763 HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT),
764 HDA_CODEC_VOLUME_IDX("Capture Mux Volume", 0x0, 0x1a, 0x0, HDA_OUTPUT),
765
766 HDA_CODEC_VOLUME_IDX("Capture Volume", 0x1, 0x1d, 0x0, HDA_OUTPUT),
767 HDA_CODEC_MUTE_IDX("Capture Switch", 0x1, 0x1d, 0x0, HDA_OUTPUT),
768 HDA_CODEC_VOLUME_IDX("Capture Mux Volume", 0x1, 0x1b, 0x0, HDA_OUTPUT),
769 { } /* end */
770};
771
738static struct snd_kcontrol_new stac925x_mixer[] = { 772static struct snd_kcontrol_new stac925x_mixer[] = {
739 STAC_INPUT_SOURCE(1), 773 STAC_INPUT_SOURCE(1),
740 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), 774 HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
@@ -3088,12 +3122,25 @@ again:
3088 stac92xx_set_config_regs(codec); 3122 stac92xx_set_config_regs(codec);
3089 } 3123 }
3090 3124
3125 switch (codec->vendor_id) {
3126 case 0x111d76b6: /* 4 Port without Analog Mixer */
3127 case 0x111d76b7:
3128 case 0x111d76b4: /* 6 Port without Analog Mixer */
3129 case 0x111d76b5:
3130 spec->mixer = stac92hd71bxx_mixer;
3131 spec->init = stac92hd71bxx_core_init;
3132 break;
3133 default:
3134 spec->mixer = stac92hd71bxx_analog_mixer;
3135 spec->init = stac92hd71bxx_analog_core_init;
3136 }
3137
3138 spec->aloopback_mask = 0x20;
3139 spec->aloopback_shift = 0;
3140
3091 spec->gpio_mask = spec->gpio_data = 0x00000001; /* GPIO0 High = EAPD */ 3141 spec->gpio_mask = spec->gpio_data = 0x00000001; /* GPIO0 High = EAPD */
3092 stac92xx_enable_gpio_mask(codec); 3142 stac92xx_enable_gpio_mask(codec);
3093 3143
3094 spec->init = stac92hd71bxx_core_init;
3095 spec->mixer = stac92hd71bxx_mixer;
3096
3097 spec->mux_nids = stac92hd71bxx_mux_nids; 3144 spec->mux_nids = stac92hd71bxx_mux_nids;
3098 spec->adc_nids = stac92hd71bxx_adc_nids; 3145 spec->adc_nids = stac92hd71bxx_adc_nids;
3099 spec->dmic_nids = stac92hd71bxx_dmic_nids; 3146 spec->dmic_nids = stac92hd71bxx_dmic_nids;
@@ -3702,8 +3749,17 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
3702 { .id = 0x838476a5, .name = "STAC9255D", .patch = patch_stac9205 }, 3749 { .id = 0x838476a5, .name = "STAC9255D", .patch = patch_stac9205 },
3703 { .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 }, 3750 { .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 },
3704 { .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 }, 3751 { .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 },
3752 { .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
3753 { .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
3705 { .id = 0x111d7676, .name = "92HD73E1X5", .patch = patch_stac92hd73xx }, 3754 { .id = 0x111d7676, .name = "92HD73E1X5", .patch = patch_stac92hd73xx },
3706 { .id = 0x111d7675, .name = "92HD73D1X5", .patch = patch_stac92hd73xx }, 3755 { .id = 0x111d7608, .name = "92HD71BXX", .patch = patch_stac92hd71bxx },
3707 { .id = 0x111d76b0, .name = "92HD71BXX", .patch = patch_stac92hd71bxx }, 3756 { .id = 0x111d76b0, .name = "92HD71B8X", .patch = patch_stac92hd71bxx },
3757 { .id = 0x111d76b1, .name = "92HD71B8X", .patch = patch_stac92hd71bxx },
3758 { .id = 0x111d76b2, .name = "92HD71B7X", .patch = patch_stac92hd71bxx },
3759 { .id = 0x111d76b3, .name = "92HD71B7X", .patch = patch_stac92hd71bxx },
3760 { .id = 0x111d76b4, .name = "92HD71B6X", .patch = patch_stac92hd71bxx },
3761 { .id = 0x111d76b5, .name = "92HD71B6X", .patch = patch_stac92hd71bxx },
3762 { .id = 0x111d76b6, .name = "92HD71B5X", .patch = patch_stac92hd71bxx },
3763 { .id = 0x111d76b7, .name = "92HD71B5X", .patch = patch_stac92hd71bxx },
3708 {} /* terminator */ 3764 {} /* terminator */
3709}; 3765};