aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMatthew Ranostay <mranostay@embeddedalley.com>2008-06-13 12:04:33 -0400
committerJaroslav Kysela <perex@perex.cz>2008-06-16 03:32:22 -0400
commitaafc4412be31306e5c38bd4e4581066507503adc (patch)
treee632e09180a74d4ab33d5fef542b5e5bb89a4618 /sound
parentd3bd67cdbb5d12f30dfd1b627fd95bd6dcc7ff1e (diff)
ALSA: hda: Add support for 92HD73xxx codecs
Added support for new family of IDT codecs. 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')
-rw-r--r--sound/pci/hda/patch_sigmatel.c47
1 files changed, 35 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 1ef3dd6e8a64..c4f3489376c5 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -636,21 +636,28 @@ static struct hda_verb stac92hd71bxx_core_init[] = {
636 { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 636 { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
637}; 637};
638 638
639#define HD_DISABLE_PORTF 3
639static struct hda_verb stac92hd71bxx_analog_core_init[] = { 640static struct hda_verb stac92hd71bxx_analog_core_init[] = {
641 /* start of config #1 */
642
643 /* connect port 0f to audio mixer */
644 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
645 { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */
646 /* unmute right and left channels for node 0x0f */
647 { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
648 /* start of config #2 */
649
640 /* set master volume and direct control */ 650 /* set master volume and direct control */
641 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, 651 { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
642 /* connect headphone jack to dac1 */ 652 /* connect headphone jack to dac1 */
643 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, 653 { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01},
644 /* connect ports 0d and 0f to audio mixer */ 654 /* connect port 0d to audio mixer */
645 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2}, 655 { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2},
646 { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
647 { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */
648 /* unmute dac0 input in audio mixer */ 656 /* unmute dac0 input in audio mixer */
649 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f}, 657 { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f},
650 /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ 658 /* unmute right and left channels for nodes 0x0a, 0xd */
651 { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 659 { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
652 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, 660 { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
653 { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
654 {} 661 {}
655}; 662};
656 663
@@ -1317,13 +1324,13 @@ static unsigned int ref92hd71bxx_pin_configs[10] = {
1317 0x90a000f0, 0x01452050, 1324 0x90a000f0, 0x01452050,
1318}; 1325};
1319 1326
1320static unsigned int dell_m4_1_pin_configs[13] = { 1327static unsigned int dell_m4_1_pin_configs[10] = {
1321 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110, 1328 0x0421101f, 0x04a11221, 0x40f000f0, 0x90170110,
1322 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0, 1329 0x23a1902e, 0x23014250, 0x40f000f0, 0x90a000f0,
1323 0x40f000f0, 0x4f0000f0, 1330 0x40f000f0, 0x4f0000f0,
1324}; 1331};
1325 1332
1326static unsigned int dell_m4_2_pin_configs[13] = { 1333static unsigned int dell_m4_2_pin_configs[10] = {
1327 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110, 1334 0x0421101f, 0x04a11221, 0x90a70330, 0x90170110,
1328 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0, 1335 0x23a1902e, 0x23014250, 0x40f000f0, 0x40f000f0,
1329 0x40f000f0, 0x044413b0, 1336 0x40f000f0, 0x044413b0,
@@ -3095,13 +3102,16 @@ static int stac92xx_init(struct hda_codec *codec)
3095 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 3102 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
3096 int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i], 3103 int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i],
3097 0, AC_VERB_GET_CONFIG_DEFAULT, 0); 3104 0, AC_VERB_GET_CONFIG_DEFAULT, 0);
3105 def_conf = get_defcfg_connect(def_conf);
3098 /* outputs are only ports capable of power management 3106 /* outputs are only ports capable of power management
3099 * any attempts on powering down a input port cause the 3107 * any attempts on powering down a input port cause the
3100 * referenced VREF to act quirky. 3108 * referenced VREF to act quirky.
3101 */ 3109 */
3102 if (pinctl & AC_PINCTL_IN_EN) 3110 if (pinctl & AC_PINCTL_IN_EN)
3103 continue; 3111 continue;
3104 if (get_defcfg_connect(def_conf) != AC_JACK_PORT_FIXED) 3112 /* skip any ports that don't have jacks since presence
3113 * detection is useless */
3114 if (def_conf && def_conf != AC_JACK_PORT_FIXED)
3105 continue; 3115 continue;
3106 enable_pin_detect(codec, spec->pwr_nids[i], event | i); 3116 enable_pin_detect(codec, spec->pwr_nids[i], event | i);
3107 codec->patch_ops.unsol_event(codec, (event | i) << 26); 3117 codec->patch_ops.unsol_event(codec, (event | i) << 26);
@@ -3606,6 +3616,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
3606 3616
3607 codec->spec = spec; 3617 codec->spec = spec;
3608 spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); 3618 spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids);
3619 spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids);
3609 spec->pin_nids = stac92hd71bxx_pin_nids; 3620 spec->pin_nids = stac92hd71bxx_pin_nids;
3610 spec->board_config = snd_hda_check_board_config(codec, 3621 spec->board_config = snd_hda_check_board_config(codec,
3611 STAC_92HD71BXX_MODELS, 3622 STAC_92HD71BXX_MODELS,
@@ -3634,6 +3645,19 @@ again:
3634 spec->mixer = stac92hd71bxx_mixer; 3645 spec->mixer = stac92hd71bxx_mixer;
3635 spec->init = stac92hd71bxx_core_init; 3646 spec->init = stac92hd71bxx_core_init;
3636 break; 3647 break;
3648 case 0x111d7608: /* 5 Port with Analog Mixer */
3649 /* no output amps */
3650 spec->num_pwrs = 0;
3651 spec->mixer = stac92hd71bxx_analog_mixer;
3652
3653 /* disable VSW */
3654 spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
3655 stac92xx_set_config_reg(codec, 0xf, 0x40f000f0);
3656 break;
3657 case 0x111d7603: /* 6 Port with Analog Mixer */
3658 /* no output amps */
3659 spec->num_pwrs = 0;
3660 /* fallthru */
3637 default: 3661 default:
3638 spec->mixer = stac92hd71bxx_analog_mixer; 3662 spec->mixer = stac92hd71bxx_analog_mixer;
3639 spec->init = stac92hd71bxx_analog_core_init; 3663 spec->init = stac92hd71bxx_analog_core_init;
@@ -3652,15 +3676,13 @@ again:
3652 spec->adc_nids = stac92hd71bxx_adc_nids; 3676 spec->adc_nids = stac92hd71bxx_adc_nids;
3653 spec->dmic_nids = stac92hd71bxx_dmic_nids; 3677 spec->dmic_nids = stac92hd71bxx_dmic_nids;
3654 spec->dmux_nids = stac92hd71bxx_dmux_nids; 3678 spec->dmux_nids = stac92hd71bxx_dmux_nids;
3679 spec->pwr_nids = stac92hd71bxx_pwr_nids;
3655 3680
3656 spec->num_muxes = ARRAY_SIZE(stac92hd71bxx_mux_nids); 3681 spec->num_muxes = ARRAY_SIZE(stac92hd71bxx_mux_nids);
3657 spec->num_adcs = ARRAY_SIZE(stac92hd71bxx_adc_nids); 3682 spec->num_adcs = ARRAY_SIZE(stac92hd71bxx_adc_nids);
3658 spec->num_dmics = STAC92HD71BXX_NUM_DMICS; 3683 spec->num_dmics = STAC92HD71BXX_NUM_DMICS;
3659 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids); 3684 spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
3660 3685
3661 spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids);
3662 spec->pwr_nids = stac92hd71bxx_pwr_nids;
3663
3664 spec->multiout.num_dacs = 1; 3686 spec->multiout.num_dacs = 1;
3665 spec->multiout.hp_nid = 0x11; 3687 spec->multiout.hp_nid = 0x11;
3666 spec->multiout.dac_nids = stac92hd71bxx_dac_nids; 3688 spec->multiout.dac_nids = stac92hd71bxx_dac_nids;
@@ -4298,10 +4320,11 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = {
4298 { .id = 0x838476a5, .name = "STAC9255D", .patch = patch_stac9205 }, 4320 { .id = 0x838476a5, .name = "STAC9255D", .patch = patch_stac9205 },
4299 { .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 }, 4321 { .id = 0x838476a6, .name = "STAC9254", .patch = patch_stac9205 },
4300 { .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 }, 4322 { .id = 0x838476a7, .name = "STAC9254D", .patch = patch_stac9205 },
4323 { .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
4324 { .id = 0x111d7608, .name = "92HD75B2X5", .patch = patch_stac92hd71bxx},
4301 { .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx }, 4325 { .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
4302 { .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx }, 4326 { .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
4303 { .id = 0x111d7676, .name = "92HD73E1X5", .patch = patch_stac92hd73xx }, 4327 { .id = 0x111d7676, .name = "92HD73E1X5", .patch = patch_stac92hd73xx },
4304 { .id = 0x111d7608, .name = "92HD71BXX", .patch = patch_stac92hd71bxx },
4305 { .id = 0x111d76b0, .name = "92HD71B8X", .patch = patch_stac92hd71bxx }, 4328 { .id = 0x111d76b0, .name = "92HD71B8X", .patch = patch_stac92hd71bxx },
4306 { .id = 0x111d76b1, .name = "92HD71B8X", .patch = patch_stac92hd71bxx }, 4329 { .id = 0x111d76b1, .name = "92HD71B8X", .patch = patch_stac92hd71bxx },
4307 { .id = 0x111d76b2, .name = "92HD71B7X", .patch = patch_stac92hd71bxx }, 4330 { .id = 0x111d76b2, .name = "92HD71B7X", .patch = patch_stac92hd71bxx },