diff options
-rw-r--r-- | sound/pci/hda/hda_beep.c | 11 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 34 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 13 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 89 |
4 files changed, 88 insertions, 59 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 08fe6592ad44..3f51a981e604 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c | |||
@@ -51,19 +51,22 @@ static void snd_hda_generate_beep(struct work_struct *work) | |||
51 | * The tone frequency of beep generator on IDT/STAC codecs is | 51 | * The tone frequency of beep generator on IDT/STAC codecs is |
52 | * defined from the 8bit tone parameter, in Hz, | 52 | * defined from the 8bit tone parameter, in Hz, |
53 | * freq = 48000 * (257 - tone) / 1024 | 53 | * freq = 48000 * (257 - tone) / 1024 |
54 | * that is from 12kHz to 93.75kHz in step of 46.875 hz | 54 | * that is from 12kHz to 93.75Hz in steps of 46.875 Hz |
55 | */ | 55 | */ |
56 | static int beep_linear_tone(struct hda_beep *beep, int hz) | 56 | static int beep_linear_tone(struct hda_beep *beep, int hz) |
57 | { | 57 | { |
58 | if (hz <= 0) | ||
59 | return 0; | ||
58 | hz *= 1000; /* fixed point */ | 60 | hz *= 1000; /* fixed point */ |
59 | hz = hz - DIGBEEP_HZ_MIN; | 61 | hz = hz - DIGBEEP_HZ_MIN |
62 | + DIGBEEP_HZ_STEP / 2; /* round to nearest step */ | ||
60 | if (hz < 0) | 63 | if (hz < 0) |
61 | hz = 0; /* turn off PC beep*/ | 64 | hz = 0; /* turn off PC beep*/ |
62 | else if (hz >= (DIGBEEP_HZ_MAX - DIGBEEP_HZ_MIN)) | 65 | else if (hz >= (DIGBEEP_HZ_MAX - DIGBEEP_HZ_MIN)) |
63 | hz = 0xff; | 66 | hz = 1; /* max frequency */ |
64 | else { | 67 | else { |
65 | hz /= DIGBEEP_HZ_STEP; | 68 | hz /= DIGBEEP_HZ_STEP; |
66 | hz++; | 69 | hz = 255 - hz; |
67 | } | 70 | } |
68 | return hz; | 71 | return hz; |
69 | } | 72 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6abaa6bbb3d6..a7cf34965225 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1470,6 +1470,17 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1470 | return err; | 1470 | return err; |
1471 | } | 1471 | } |
1472 | snd_pcm_limit_hw_rates(runtime); | 1472 | snd_pcm_limit_hw_rates(runtime); |
1473 | /* sanity check */ | ||
1474 | if (snd_BUG_ON(!runtime->hw.channels_min) || | ||
1475 | snd_BUG_ON(!runtime->hw.channels_max) || | ||
1476 | snd_BUG_ON(!runtime->hw.formats) || | ||
1477 | snd_BUG_ON(!runtime->hw.rates)) { | ||
1478 | azx_release_device(azx_dev); | ||
1479 | hinfo->ops.close(hinfo, apcm->codec, substream); | ||
1480 | snd_hda_power_down(apcm->codec); | ||
1481 | mutex_unlock(&chip->open_mutex); | ||
1482 | return -EINVAL; | ||
1483 | } | ||
1473 | spin_lock_irqsave(&chip->reg_lock, flags); | 1484 | spin_lock_irqsave(&chip->reg_lock, flags); |
1474 | azx_dev->substream = substream; | 1485 | azx_dev->substream = substream; |
1475 | azx_dev->running = 0; | 1486 | azx_dev->running = 0; |
@@ -1478,13 +1489,6 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1478 | runtime->private_data = azx_dev; | 1489 | runtime->private_data = azx_dev; |
1479 | snd_pcm_set_sync(substream); | 1490 | snd_pcm_set_sync(substream); |
1480 | mutex_unlock(&chip->open_mutex); | 1491 | mutex_unlock(&chip->open_mutex); |
1481 | |||
1482 | if (snd_BUG_ON(!runtime->hw.channels_min || !runtime->hw.channels_max)) | ||
1483 | return -EINVAL; | ||
1484 | if (snd_BUG_ON(!runtime->hw.formats)) | ||
1485 | return -EINVAL; | ||
1486 | if (snd_BUG_ON(!runtime->hw.rates)) | ||
1487 | return -EINVAL; | ||
1488 | return 0; | 1492 | return 0; |
1489 | } | 1493 | } |
1490 | 1494 | ||
@@ -2344,9 +2348,19 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
2344 | gcap = azx_readw(chip, GCAP); | 2348 | gcap = azx_readw(chip, GCAP); |
2345 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); | 2349 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); |
2346 | 2350 | ||
2347 | /* ATI chips seems buggy about 64bit DMA addresses */ | 2351 | /* disable SB600 64bit support for safety */ |
2348 | if (chip->driver_type == AZX_DRIVER_ATI) | 2352 | if ((chip->driver_type == AZX_DRIVER_ATI) || |
2349 | gcap &= ~ICH6_GCAP_64OK; | 2353 | (chip->driver_type == AZX_DRIVER_ATIHDMI)) { |
2354 | struct pci_dev *p_smbus; | ||
2355 | p_smbus = pci_get_device(PCI_VENDOR_ID_ATI, | ||
2356 | PCI_DEVICE_ID_ATI_SBX00_SMBUS, | ||
2357 | NULL); | ||
2358 | if (p_smbus) { | ||
2359 | if (p_smbus->revision < 0x30) | ||
2360 | gcap &= ~ICH6_GCAP_64OK; | ||
2361 | pci_dev_put(p_smbus); | ||
2362 | } | ||
2363 | } | ||
2350 | 2364 | ||
2351 | /* allow 64bit DMA address if supported by H/W */ | 2365 | /* allow 64bit DMA address if supported by H/W */ |
2352 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) | 2366 | if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64))) |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0227b0c8a724..88a9da4afe5c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7166,9 +7166,6 @@ static struct hda_verb alc882_targa_verbs[] = { | |||
7166 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ | 7166 | {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* HP */ |
7167 | 7167 | ||
7168 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | 7168 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, |
7169 | {0x01, AC_VERB_SET_GPIO_MASK, 0x03}, | ||
7170 | {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03}, | ||
7171 | {0x01, AC_VERB_SET_GPIO_DATA, 0x03}, | ||
7172 | { } /* end */ | 7169 | { } /* end */ |
7173 | }; | 7170 | }; |
7174 | 7171 | ||
@@ -8691,7 +8688,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
8691 | }, | 8688 | }, |
8692 | [ALC883_TARGA_DIG] = { | 8689 | [ALC883_TARGA_DIG] = { |
8693 | .mixers = { alc883_targa_mixer, alc883_chmode_mixer }, | 8690 | .mixers = { alc883_targa_mixer, alc883_chmode_mixer }, |
8694 | .init_verbs = { alc883_init_verbs, alc883_targa_verbs}, | 8691 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, |
8692 | alc883_targa_verbs}, | ||
8695 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 8693 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
8696 | .dac_nids = alc883_dac_nids, | 8694 | .dac_nids = alc883_dac_nids, |
8697 | .dig_out_nid = ALC883_DIGOUT_NID, | 8695 | .dig_out_nid = ALC883_DIGOUT_NID, |
@@ -8704,7 +8702,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
8704 | }, | 8702 | }, |
8705 | [ALC883_TARGA_2ch_DIG] = { | 8703 | [ALC883_TARGA_2ch_DIG] = { |
8706 | .mixers = { alc883_targa_2ch_mixer}, | 8704 | .mixers = { alc883_targa_2ch_mixer}, |
8707 | .init_verbs = { alc883_init_verbs, alc883_targa_verbs}, | 8705 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, |
8706 | alc883_targa_verbs}, | ||
8708 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 8707 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
8709 | .dac_nids = alc883_dac_nids, | 8708 | .dac_nids = alc883_dac_nids, |
8710 | .adc_nids = alc883_adc_nids_alt, | 8709 | .adc_nids = alc883_adc_nids_alt, |
@@ -12431,9 +12430,9 @@ static struct snd_kcontrol_new alc269_lifebook_mixer[] = { | |||
12431 | 12430 | ||
12432 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { | 12431 | static struct snd_kcontrol_new alc269_eeepc_mixer[] = { |
12433 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 12432 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
12434 | HDA_CODEC_MUTE("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), | 12433 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT), |
12435 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 12434 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
12436 | HDA_CODEC_MUTE("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 12435 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
12437 | { } /* end */ | 12436 | { } /* end */ |
12438 | }; | 12437 | }; |
12439 | 12438 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 8e004fb6961a..9008b4b013aa 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -210,7 +210,9 @@ struct via_spec { | |||
210 | /* capture */ | 210 | /* capture */ |
211 | unsigned int num_adc_nids; | 211 | unsigned int num_adc_nids; |
212 | hda_nid_t *adc_nids; | 212 | hda_nid_t *adc_nids; |
213 | hda_nid_t mux_nids[3]; | ||
213 | hda_nid_t dig_in_nid; | 214 | hda_nid_t dig_in_nid; |
215 | hda_nid_t dig_in_pin; | ||
214 | 216 | ||
215 | /* capture source */ | 217 | /* capture source */ |
216 | const struct hda_input_mux *input_mux; | 218 | const struct hda_input_mux *input_mux; |
@@ -319,6 +321,9 @@ static void via_auto_set_output_and_unmute(struct hda_codec *codec, | |||
319 | pin_type); | 321 | pin_type); |
320 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, | 322 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, |
321 | AMP_OUT_UNMUTE); | 323 | AMP_OUT_UNMUTE); |
324 | if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) | ||
325 | snd_hda_codec_write(codec, nid, 0, | ||
326 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
322 | } | 327 | } |
323 | 328 | ||
324 | 329 | ||
@@ -387,27 +392,12 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol, | |||
387 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 392 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
388 | struct via_spec *spec = codec->spec; | 393 | struct via_spec *spec = codec->spec; |
389 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 394 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
390 | unsigned int vendor_id = codec->vendor_id; | 395 | |
391 | 396 | if (!spec->mux_nids[adc_idx]) | |
392 | /* AIW0 lydia 060801 add for correct sw0 input select */ | 397 | return -EINVAL; |
393 | if (IS_VT1708_VENDORID(vendor_id) && (adc_idx == 0)) | 398 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, |
394 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | 399 | spec->mux_nids[adc_idx], |
395 | 0x18, &spec->cur_mux[adc_idx]); | 400 | &spec->cur_mux[adc_idx]); |
396 | else if ((IS_VT1709_10CH_VENDORID(vendor_id) || | ||
397 | IS_VT1709_6CH_VENDORID(vendor_id)) && (adc_idx == 0)) | ||
398 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
399 | 0x19, &spec->cur_mux[adc_idx]); | ||
400 | else if ((IS_VT1708B_8CH_VENDORID(vendor_id) || | ||
401 | IS_VT1708B_4CH_VENDORID(vendor_id)) && (adc_idx == 0)) | ||
402 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
403 | 0x17, &spec->cur_mux[adc_idx]); | ||
404 | else if (IS_VT1702_VENDORID(vendor_id) && (adc_idx == 0)) | ||
405 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
406 | 0x13, &spec->cur_mux[adc_idx]); | ||
407 | else | ||
408 | return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, | ||
409 | spec->adc_nids[adc_idx], | ||
410 | &spec->cur_mux[adc_idx]); | ||
411 | } | 401 | } |
412 | 402 | ||
413 | static int via_independent_hp_info(struct snd_kcontrol *kcontrol, | 403 | static int via_independent_hp_info(struct snd_kcontrol *kcontrol, |
@@ -998,25 +988,11 @@ static int via_init(struct hda_codec *codec) | |||
998 | 988 | ||
999 | /* Lydia Add for EAPD enable */ | 989 | /* Lydia Add for EAPD enable */ |
1000 | if (!spec->dig_in_nid) { /* No Digital In connection */ | 990 | if (!spec->dig_in_nid) { /* No Digital In connection */ |
1001 | if (IS_VT1708_VENDORID(codec->vendor_id)) { | 991 | if (spec->dig_in_pin) { |
1002 | snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, | 992 | snd_hda_codec_write(codec, spec->dig_in_pin, 0, |
1003 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
1004 | PIN_OUT); | ||
1005 | snd_hda_codec_write(codec, VT1708_DIGIN_PIN, 0, | ||
1006 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
1007 | } else if (IS_VT1709_10CH_VENDORID(codec->vendor_id) || | ||
1008 | IS_VT1709_6CH_VENDORID(codec->vendor_id)) { | ||
1009 | snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, | ||
1010 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 993 | AC_VERB_SET_PIN_WIDGET_CONTROL, |
1011 | PIN_OUT); | 994 | PIN_OUT); |
1012 | snd_hda_codec_write(codec, VT1709_DIGIN_PIN, 0, | 995 | snd_hda_codec_write(codec, spec->dig_in_pin, 0, |
1013 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | ||
1014 | } else if (IS_VT1708B_8CH_VENDORID(codec->vendor_id) || | ||
1015 | IS_VT1708B_4CH_VENDORID(codec->vendor_id)) { | ||
1016 | snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, | ||
1017 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
1018 | PIN_OUT); | ||
1019 | snd_hda_codec_write(codec, VT1708B_DIGIN_PIN, 0, | ||
1020 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); | 996 | AC_VERB_SET_EAPD_BTLENABLE, 0x02); |
1021 | } | 997 | } |
1022 | } else /* enable SPDIF-input pin */ | 998 | } else /* enable SPDIF-input pin */ |
@@ -1326,6 +1302,7 @@ static int vt1708_parse_auto_config(struct hda_codec *codec) | |||
1326 | 1302 | ||
1327 | if (spec->autocfg.dig_outs) | 1303 | if (spec->autocfg.dig_outs) |
1328 | spec->multiout.dig_out_nid = VT1708_DIGOUT_NID; | 1304 | spec->multiout.dig_out_nid = VT1708_DIGOUT_NID; |
1305 | spec->dig_in_pin = VT1708_DIGIN_PIN; | ||
1329 | if (spec->autocfg.dig_in_pin) | 1306 | if (spec->autocfg.dig_in_pin) |
1330 | spec->dig_in_nid = VT1708_DIGIN_NID; | 1307 | spec->dig_in_nid = VT1708_DIGIN_NID; |
1331 | 1308 | ||
@@ -1352,6 +1329,34 @@ static int via_auto_init(struct hda_codec *codec) | |||
1352 | return 0; | 1329 | return 0; |
1353 | } | 1330 | } |
1354 | 1331 | ||
1332 | static int get_mux_nids(struct hda_codec *codec) | ||
1333 | { | ||
1334 | struct via_spec *spec = codec->spec; | ||
1335 | hda_nid_t nid, conn[8]; | ||
1336 | unsigned int type; | ||
1337 | int i, n; | ||
1338 | |||
1339 | for (i = 0; i < spec->num_adc_nids; i++) { | ||
1340 | nid = spec->adc_nids[i]; | ||
1341 | while (nid) { | ||
1342 | type = (get_wcaps(codec, nid) & AC_WCAP_TYPE) | ||
1343 | >> AC_WCAP_TYPE_SHIFT; | ||
1344 | if (type == AC_WID_PIN) | ||
1345 | break; | ||
1346 | n = snd_hda_get_connections(codec, nid, conn, | ||
1347 | ARRAY_SIZE(conn)); | ||
1348 | if (n <= 0) | ||
1349 | break; | ||
1350 | if (n > 1) { | ||
1351 | spec->mux_nids[i] = nid; | ||
1352 | break; | ||
1353 | } | ||
1354 | nid = conn[0]; | ||
1355 | } | ||
1356 | } | ||
1357 | return 0; | ||
1358 | } | ||
1359 | |||
1355 | static int patch_vt1708(struct hda_codec *codec) | 1360 | static int patch_vt1708(struct hda_codec *codec) |
1356 | { | 1361 | { |
1357 | struct via_spec *spec; | 1362 | struct via_spec *spec; |
@@ -1799,6 +1804,7 @@ static int vt1709_parse_auto_config(struct hda_codec *codec) | |||
1799 | 1804 | ||
1800 | if (spec->autocfg.dig_outs) | 1805 | if (spec->autocfg.dig_outs) |
1801 | spec->multiout.dig_out_nid = VT1709_DIGOUT_NID; | 1806 | spec->multiout.dig_out_nid = VT1709_DIGOUT_NID; |
1807 | spec->dig_in_pin = VT1709_DIGIN_PIN; | ||
1802 | if (spec->autocfg.dig_in_pin) | 1808 | if (spec->autocfg.dig_in_pin) |
1803 | spec->dig_in_nid = VT1709_DIGIN_NID; | 1809 | spec->dig_in_nid = VT1709_DIGIN_NID; |
1804 | 1810 | ||
@@ -1859,6 +1865,7 @@ static int patch_vt1709_10ch(struct hda_codec *codec) | |||
1859 | if (!spec->adc_nids && spec->input_mux) { | 1865 | if (!spec->adc_nids && spec->input_mux) { |
1860 | spec->adc_nids = vt1709_adc_nids; | 1866 | spec->adc_nids = vt1709_adc_nids; |
1861 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); | 1867 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); |
1868 | get_mux_nids(codec); | ||
1862 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; | 1869 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; |
1863 | spec->num_mixers++; | 1870 | spec->num_mixers++; |
1864 | } | 1871 | } |
@@ -1952,6 +1959,7 @@ static int patch_vt1709_6ch(struct hda_codec *codec) | |||
1952 | if (!spec->adc_nids && spec->input_mux) { | 1959 | if (!spec->adc_nids && spec->input_mux) { |
1953 | spec->adc_nids = vt1709_adc_nids; | 1960 | spec->adc_nids = vt1709_adc_nids; |
1954 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); | 1961 | spec->num_adc_nids = ARRAY_SIZE(vt1709_adc_nids); |
1962 | get_mux_nids(codec); | ||
1955 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; | 1963 | spec->mixers[spec->num_mixers] = vt1709_capture_mixer; |
1956 | spec->num_mixers++; | 1964 | spec->num_mixers++; |
1957 | } | 1965 | } |
@@ -2344,6 +2352,7 @@ static int vt1708B_parse_auto_config(struct hda_codec *codec) | |||
2344 | 2352 | ||
2345 | if (spec->autocfg.dig_outs) | 2353 | if (spec->autocfg.dig_outs) |
2346 | spec->multiout.dig_out_nid = VT1708B_DIGOUT_NID; | 2354 | spec->multiout.dig_out_nid = VT1708B_DIGOUT_NID; |
2355 | spec->dig_in_pin = VT1708B_DIGIN_PIN; | ||
2347 | if (spec->autocfg.dig_in_pin) | 2356 | if (spec->autocfg.dig_in_pin) |
2348 | spec->dig_in_nid = VT1708B_DIGIN_NID; | 2357 | spec->dig_in_nid = VT1708B_DIGIN_NID; |
2349 | 2358 | ||
@@ -2404,6 +2413,7 @@ static int patch_vt1708B_8ch(struct hda_codec *codec) | |||
2404 | if (!spec->adc_nids && spec->input_mux) { | 2413 | if (!spec->adc_nids && spec->input_mux) { |
2405 | spec->adc_nids = vt1708B_adc_nids; | 2414 | spec->adc_nids = vt1708B_adc_nids; |
2406 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); | 2415 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); |
2416 | get_mux_nids(codec); | ||
2407 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; | 2417 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; |
2408 | spec->num_mixers++; | 2418 | spec->num_mixers++; |
2409 | } | 2419 | } |
@@ -2455,6 +2465,7 @@ static int patch_vt1708B_4ch(struct hda_codec *codec) | |||
2455 | if (!spec->adc_nids && spec->input_mux) { | 2465 | if (!spec->adc_nids && spec->input_mux) { |
2456 | spec->adc_nids = vt1708B_adc_nids; | 2466 | spec->adc_nids = vt1708B_adc_nids; |
2457 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); | 2467 | spec->num_adc_nids = ARRAY_SIZE(vt1708B_adc_nids); |
2468 | get_mux_nids(codec); | ||
2458 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; | 2469 | spec->mixers[spec->num_mixers] = vt1708B_capture_mixer; |
2459 | spec->num_mixers++; | 2470 | spec->num_mixers++; |
2460 | } | 2471 | } |
@@ -2889,6 +2900,7 @@ static int patch_vt1708S(struct hda_codec *codec) | |||
2889 | if (!spec->adc_nids && spec->input_mux) { | 2900 | if (!spec->adc_nids && spec->input_mux) { |
2890 | spec->adc_nids = vt1708S_adc_nids; | 2901 | spec->adc_nids = vt1708S_adc_nids; |
2891 | spec->num_adc_nids = ARRAY_SIZE(vt1708S_adc_nids); | 2902 | spec->num_adc_nids = ARRAY_SIZE(vt1708S_adc_nids); |
2903 | get_mux_nids(codec); | ||
2892 | spec->mixers[spec->num_mixers] = vt1708S_capture_mixer; | 2904 | spec->mixers[spec->num_mixers] = vt1708S_capture_mixer; |
2893 | spec->num_mixers++; | 2905 | spec->num_mixers++; |
2894 | } | 2906 | } |
@@ -3206,6 +3218,7 @@ static int patch_vt1702(struct hda_codec *codec) | |||
3206 | if (!spec->adc_nids && spec->input_mux) { | 3218 | if (!spec->adc_nids && spec->input_mux) { |
3207 | spec->adc_nids = vt1702_adc_nids; | 3219 | spec->adc_nids = vt1702_adc_nids; |
3208 | spec->num_adc_nids = ARRAY_SIZE(vt1702_adc_nids); | 3220 | spec->num_adc_nids = ARRAY_SIZE(vt1702_adc_nids); |
3221 | get_mux_nids(codec); | ||
3209 | spec->mixers[spec->num_mixers] = vt1702_capture_mixer; | 3222 | spec->mixers[spec->num_mixers] = vt1702_capture_mixer; |
3210 | spec->num_mixers++; | 3223 | spec->num_mixers++; |
3211 | } | 3224 | } |