13473
13477
static struct snd_pci_quirk alc269_cfg_tbl[] = {
13474
13478
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_QUANTA_FL1),
13475
13479
SND_PCI_QUIRK(0x1043, 0x8330, "ASUS Eeepc P703 P900A",
13476
ALC269_ASUS_EEEPC_P703),
13477
SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_ASUS_EEEPC_P703),
13478
SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_ASUS_EEEPC_P703),
13479
SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_ASUS_EEEPC_P703),
13480
SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_ASUS_EEEPC_P703),
13481
SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_ASUS_EEEPC_P703),
13482
SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_ASUS_EEEPC_P703),
13481
SND_PCI_QUIRK(0x1043, 0x1133, "ASUS UJ20ft", ALC269_ASUS_AMIC),
13482
SND_PCI_QUIRK(0x1043, 0x1273, "ASUS UL80JT", ALC269_ASUS_AMIC),
13483
SND_PCI_QUIRK(0x1043, 0x1283, "ASUS U53Jc", ALC269_ASUS_AMIC),
13484
SND_PCI_QUIRK(0x1043, 0x12b3, "ASUS N82Jv", ALC269_ASUS_AMIC),
13485
SND_PCI_QUIRK(0x1043, 0x13a3, "ASUS UL30Vt", ALC269_ASUS_AMIC),
13486
SND_PCI_QUIRK(0x1043, 0x1373, "ASUS G73JX", ALC269_ASUS_AMIC),
13487
SND_PCI_QUIRK(0x1043, 0x1383, "ASUS UJ30Jc", ALC269_ASUS_AMIC),
13488
SND_PCI_QUIRK(0x1043, 0x13d3, "ASUS N61JA", ALC269_ASUS_AMIC),
13489
SND_PCI_QUIRK(0x1043, 0x1413, "ASUS UL50", ALC269_ASUS_AMIC),
13490
SND_PCI_QUIRK(0x1043, 0x1443, "ASUS UL30", ALC269_ASUS_AMIC),
13491
SND_PCI_QUIRK(0x1043, 0x1453, "ASUS M60Jv", ALC269_ASUS_AMIC),
13492
SND_PCI_QUIRK(0x1043, 0x1483, "ASUS UL80", ALC269_ASUS_AMIC),
13493
SND_PCI_QUIRK(0x1043, 0x14f3, "ASUS F83Vf", ALC269_ASUS_AMIC),
13494
SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS UL20", ALC269_ASUS_AMIC),
13495
SND_PCI_QUIRK(0x1043, 0x1513, "ASUS UX30", ALC269_ASUS_AMIC),
13496
SND_PCI_QUIRK(0x1043, 0x15a3, "ASUS N60Jv", ALC269_ASUS_AMIC),
13497
SND_PCI_QUIRK(0x1043, 0x15b3, "ASUS N60Dp", ALC269_ASUS_AMIC),
13498
SND_PCI_QUIRK(0x1043, 0x15c3, "ASUS N70De", ALC269_ASUS_AMIC),
13499
SND_PCI_QUIRK(0x1043, 0x15e3, "ASUS F83T", ALC269_ASUS_AMIC),
13500
SND_PCI_QUIRK(0x1043, 0x1643, "ASUS M60J", ALC269_ASUS_AMIC),
13501
SND_PCI_QUIRK(0x1043, 0x1653, "ASUS U50", ALC269_ASUS_AMIC),
13502
SND_PCI_QUIRK(0x1043, 0x1693, "ASUS F50N", ALC269_ASUS_AMIC),
13503
SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS F5Q", ALC269_ASUS_AMIC),
13504
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ASUS_DMIC),
13505
SND_PCI_QUIRK(0x1043, 0x1723, "ASUS P80", ALC269_ASUS_AMIC),
13506
SND_PCI_QUIRK(0x1043, 0x1743, "ASUS U80", ALC269_ASUS_AMIC),
13507
SND_PCI_QUIRK(0x1043, 0x1773, "ASUS U20A", ALC269_ASUS_AMIC),
13508
SND_PCI_QUIRK(0x1043, 0x1883, "ASUS F81Se", ALC269_ASUS_AMIC),
13483
13509
SND_PCI_QUIRK(0x1043, 0x831a, "ASUS Eeepc P901",
13484
ALC269_ASUS_EEEPC_P901),
13485
13511
SND_PCI_QUIRK(0x1043, 0x834a, "ASUS Eeepc S101",
13486
ALC269_ASUS_EEEPC_P901),
13487
SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_ASUS_EEEPC_P901),
13513
SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005HA", ALC269_ASUS_DMIC),
13514
SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005HA", ALC269_ASUS_DMIC),
13488
13515
SND_PCI_QUIRK(0x1734, 0x115d, "FSC Amilo", ALC269_FUJITSU),
13489
13516
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook ICH9M-based", ALC269_LIFEBOOK),
16144
16194
{ } /* end */
16197
static struct hda_bind_ctls alc663_asus_mode7_8_all_bind_switch = {
16198
.ops = &snd_hda_bind_sw,
16200
HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
16201
HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
16202
HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT),
16203
HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
16204
HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT),
16209
static struct hda_bind_ctls alc663_asus_mode7_8_sp_bind_switch = {
16210
.ops = &snd_hda_bind_sw,
16212
HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
16213
HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT),
16218
static struct snd_kcontrol_new alc663_mode7_mixer[] = {
16219
HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch),
16220
HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol),
16221
HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch),
16222
HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
16223
HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT),
16224
HDA_CODEC_VOLUME("IntMic Playback Volume", 0x0b, 0x0, HDA_INPUT),
16225
HDA_CODEC_MUTE("IntMic Playback Switch", 0x0b, 0x0, HDA_INPUT),
16226
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
16227
HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
16231
static struct snd_kcontrol_new alc663_mode8_mixer[] = {
16232
HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch),
16233
HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol),
16234
HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch),
16235
HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x15, 0x0, HDA_OUTPUT),
16236
HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT),
16237
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
16238
HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
16147
16243
static struct snd_kcontrol_new alc662_chmode_mixer[] = {
16149
16245
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
16530
static struct hda_verb alc663_mode7_init_verbs[] = {
16531
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
16532
{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
16533
{0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
16534
{0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16535
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
16536
{0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16537
{0x1b, AC_VERB_SET_CONNECT_SEL, 0x01},
16538
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
16539
{0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16540
{0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
16541
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
16542
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
16543
{0x19, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
16544
{0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
16545
{0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
16549
static struct hda_verb alc663_mode8_init_verbs[] = {
16550
{0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
16551
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
16552
{0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16553
{0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
16554
{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
16555
{0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
16556
{0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16557
{0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
16558
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
16559
{0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
16560
{0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
16561
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
16562
{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
16563
{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
16564
{0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
16565
{0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
16434
16569
static struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
16435
16570
HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
16436
16571
HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
16764
static void alc663_two_hp_m7_speaker_automute(struct hda_codec *codec)
16766
unsigned int present1, present2;
16768
present1 = snd_hda_codec_read(codec, 0x1b, 0,
16769
AC_VERB_GET_PIN_SENSE, 0)
16770
& AC_PINSENSE_PRESENCE;
16771
present2 = snd_hda_codec_read(codec, 0x21, 0,
16772
AC_VERB_GET_PIN_SENSE, 0)
16773
& AC_PINSENSE_PRESENCE;
16775
if (present1 || present2) {
16776
snd_hda_codec_write_cache(codec, 0x14, 0,
16777
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
16778
snd_hda_codec_write_cache(codec, 0x17, 0,
16779
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
16781
snd_hda_codec_write_cache(codec, 0x14, 0,
16782
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
16783
snd_hda_codec_write_cache(codec, 0x17, 0,
16784
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
16788
static void alc663_two_hp_m8_speaker_automute(struct hda_codec *codec)
16790
unsigned int present1, present2;
16792
present1 = snd_hda_codec_read(codec, 0x21, 0,
16793
AC_VERB_GET_PIN_SENSE, 0)
16794
& AC_PINSENSE_PRESENCE;
16795
present2 = snd_hda_codec_read(codec, 0x15, 0,
16796
AC_VERB_GET_PIN_SENSE, 0)
16797
& AC_PINSENSE_PRESENCE;
16799
if (present1 || present2) {
16800
snd_hda_codec_write_cache(codec, 0x14, 0,
16801
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
16802
snd_hda_codec_write_cache(codec, 0x17, 0,
16803
AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
16805
snd_hda_codec_write_cache(codec, 0x14, 0,
16806
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
16807
snd_hda_codec_write_cache(codec, 0x17, 0,
16808
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
16629
16812
static void alc663_m51va_unsol_event(struct hda_codec *codec,
16630
16813
unsigned int res)
16920
17159
SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1),
16921
17160
SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_ASUS_MODE2),
16922
17161
SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1),
17162
SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC663_ASUS_MODE1),
17163
SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC663_ASUS_MODE1),
16923
17164
SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2),
17165
SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC663_ASUS_MODE7),
17166
SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC663_ASUS_MODE7),
17167
SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC663_ASUS_MODE8),
17168
SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC663_ASUS_MODE3),
17169
SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC663_ASUS_MODE1),
16924
17170
SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_ASUS_MODE2),
17171
SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_ASUS_MODE2),
17172
SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC663_ASUS_MODE1),
16925
17173
SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_ASUS_MODE2),
16926
17174
SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC663_ASUS_MODE6),
16927
17175
SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC663_ASUS_MODE6),
16928
17176
SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_ASUS_MODE2),
17177
SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC663_ASUS_MODE1),
16929
17178
SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC663_ASUS_MODE3),
16930
17179
SND_PCI_QUIRK(0x1043, 0x17c3, "ASUS UX20", ALC663_ASUS_M51VA),
16931
17180
SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_ASUS_MODE2),
17208
17457
.setup = alc663_mode6_setup,
17209
17458
.init_hook = alc663_mode6_inithook,
17460
[ALC663_ASUS_MODE7] = {
17461
.mixers = { alc663_mode7_mixer },
17462
.cap_mixer = alc662_auto_capture_mixer,
17463
.init_verbs = { alc662_init_verbs,
17464
alc663_mode7_init_verbs },
17465
.num_dacs = ARRAY_SIZE(alc662_dac_nids),
17467
.dac_nids = alc662_dac_nids,
17468
.dig_out_nid = ALC662_DIGOUT_NID,
17469
.num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
17470
.channel_mode = alc662_3ST_2ch_modes,
17471
.unsol_event = alc663_mode7_unsol_event,
17472
.setup = alc663_mode7_setup,
17473
.init_hook = alc663_mode7_inithook,
17475
[ALC663_ASUS_MODE8] = {
17476
.mixers = { alc663_mode8_mixer },
17477
.cap_mixer = alc662_auto_capture_mixer,
17478
.init_verbs = { alc662_init_verbs,
17479
alc663_mode8_init_verbs },
17480
.num_dacs = ARRAY_SIZE(alc662_dac_nids),
17482
.dac_nids = alc662_dac_nids,
17483
.dig_out_nid = ALC662_DIGOUT_NID,
17484
.num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
17485
.channel_mode = alc662_3ST_2ch_modes,
17486
.unsol_event = alc663_mode8_unsol_event,
17487
.setup = alc663_mode8_setup,
17488
.init_hook = alc663_mode8_inithook,
17211
17490
[ALC272_DELL] = {
17212
17491
.mixers = { alc663_m51va_mixer },
17213
17492
.cap_mixer = alc272_auto_capture_mixer,