--- vanilla-3.1/sound/pci/hda/alc662_quirks.c 2011-10-24 09:10:05.000000000 +0200 +++ linux-3.1.x86_64/sound/pci/hda/alc662_quirks.c 2011-11-24 08:29:00.443842837 +0100 @@ -29,15 +29,16 @@ ALC272_DELL, ALC272_DELL_ZM1, ALC272_SAMSUNG_NC10, + ALC892_CLEVO_P170HM, ALC662_MODEL_LAST, }; #define ALC662_DIGOUT_NID 0x06 #define ALC662_DIGIN_NID 0x0a -static const hda_nid_t alc662_dac_nids[3] = { - /* front, rear, clfe */ - 0x02, 0x03, 0x04 +static const hda_nid_t alc662_dac_nids[4] = { + /* front, rear, clfe, side */ + 0x02, 0x03, 0x04, 0x05 }; static const hda_nid_t alc272_dac_nids[2] = { @@ -172,6 +173,39 @@ { 6, alc662_sixstack_ch8_init }, }; +/* + * 6ch mode + */ +static const struct hda_verb alc892_clevo_p170hm_ch6_init[] = { + { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, + { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, + { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { } /* end */ +}; + +/* + * 8ch mode + */ +static const struct hda_verb alc892_clevo_p170hm_ch8_init[] = { + { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 }, + { 0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { 0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, + { } /* end */ +}; + +static const struct hda_channel_mode alc892_clevo_p170hm_modes[2] = { + { 6, alc892_clevo_p170hm_ch6_init }, + { 8, alc892_clevo_p170hm_ch8_init }, +}; + /* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17 * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b */ @@ -547,6 +581,12 @@ {} }; +static const struct hda_verb alc892_clevo_p170hm_init_verbs[] = { + {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT}, + {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, + {} +}; + /* Set Unsolicited Event*/ static const struct hda_verb alc662_eeepc_ep20_sue_init_verbs[] = { {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, @@ -987,6 +1027,7 @@ [ALC272_DELL] = "dell", [ALC272_DELL_ZM1] = "dell-zm1", [ALC272_SAMSUNG_NC10] = "samsung-nc10", + [ALC892_CLEVO_P170HM] = "clevo-p170hm", [ALC662_AUTO] = "auto", }; @@ -1403,6 +1444,18 @@ .setup = alc663_mode4_setup, .init_hook = alc_inithook, }, + [ALC892_CLEVO_P170HM] = { + .mixers = { alc662_base_mixer, alc662_chmode_mixer }, + .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs, alc892_clevo_p170hm_init_verbs }, + .num_dacs = ARRAY_SIZE(alc662_dac_nids), + .dac_nids = alc662_dac_nids, + .dig_out_nid = ALC662_DIGOUT_NID, + .dig_in_nid = ALC662_DIGIN_NID, + .num_channel_mode = ARRAY_SIZE(alc892_clevo_p170hm_modes), + .channel_mode = alc892_clevo_p170hm_modes, + .input_mux = &alc662_capture_source, + .init_hook = alc_inithook, + }, };