diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
commit | b28bc9b38c52f63f43e3fd875af982f2240a2859 (patch) | |
tree | 76cdb7b52b58f5685993cc15ed81d1c903023358 /sound/pci | |
parent | 8d30726912cb39c3a3ebde06214d54861f8fdde2 (diff) | |
parent | 802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff) |
Merge tag 'v3.13-rc6' into for-3.14/core
Needed to bring blk-mq uptodate, since changes have been going in
since for-3.14/core was established.
Fixup merge issues related to the immutable biovec changes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Conflicts:
block/blk-flush.c
fs/btrfs/check-integrity.c
fs/btrfs/extent_io.c
fs/btrfs/scrub.c
fs/logfs/dev_bdev.c
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 126 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 16 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 16 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 24 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 32 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 145 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 |
9 files changed, 298 insertions, 68 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 77db69480c19..7aa9870040c1 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -698,7 +698,6 @@ struct hda_bus { | |||
698 | unsigned int in_reset:1; /* during reset operation */ | 698 | unsigned int in_reset:1; /* during reset operation */ |
699 | unsigned int power_keep_link_on:1; /* don't power off HDA link */ | 699 | unsigned int power_keep_link_on:1; /* don't power off HDA link */ |
700 | unsigned int no_response_fallback:1; /* don't fallback at RIRB error */ | 700 | unsigned int no_response_fallback:1; /* don't fallback at RIRB error */ |
701 | unsigned int avoid_link_reset:1; /* don't reset link at runtime PM */ | ||
702 | 701 | ||
703 | int primary_dig_out_type; /* primary digital out PCM type */ | 702 | int primary_dig_out_type; /* primary digital out PCM type */ |
704 | }; | 703 | }; |
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 3067ed4fe3b2..c7f6d1cab606 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -474,6 +474,20 @@ static void invalidate_nid_path(struct hda_codec *codec, int idx) | |||
474 | memset(path, 0, sizeof(*path)); | 474 | memset(path, 0, sizeof(*path)); |
475 | } | 475 | } |
476 | 476 | ||
477 | /* return a DAC if paired to the given pin by codec driver */ | ||
478 | static hda_nid_t get_preferred_dac(struct hda_codec *codec, hda_nid_t pin) | ||
479 | { | ||
480 | struct hda_gen_spec *spec = codec->spec; | ||
481 | const hda_nid_t *list = spec->preferred_dacs; | ||
482 | |||
483 | if (!list) | ||
484 | return 0; | ||
485 | for (; *list; list += 2) | ||
486 | if (*list == pin) | ||
487 | return list[1]; | ||
488 | return 0; | ||
489 | } | ||
490 | |||
477 | /* look for an empty DAC slot */ | 491 | /* look for an empty DAC slot */ |
478 | static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, | 492 | static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, |
479 | bool is_digital) | 493 | bool is_digital) |
@@ -1192,7 +1206,14 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs, | |||
1192 | continue; | 1206 | continue; |
1193 | } | 1207 | } |
1194 | 1208 | ||
1195 | dacs[i] = look_for_dac(codec, pin, false); | 1209 | dacs[i] = get_preferred_dac(codec, pin); |
1210 | if (dacs[i]) { | ||
1211 | if (is_dac_already_used(codec, dacs[i])) | ||
1212 | badness += bad->shared_primary; | ||
1213 | } | ||
1214 | |||
1215 | if (!dacs[i]) | ||
1216 | dacs[i] = look_for_dac(codec, pin, false); | ||
1196 | if (!dacs[i] && !i) { | 1217 | if (!dacs[i] && !i) { |
1197 | /* try to steal the DAC of surrounds for the front */ | 1218 | /* try to steal the DAC of surrounds for the front */ |
1198 | for (j = 1; j < num_outs; j++) { | 1219 | for (j = 1; j < num_outs; j++) { |
@@ -2506,12 +2527,8 @@ static int create_out_jack_modes(struct hda_codec *codec, int num_pins, | |||
2506 | 2527 | ||
2507 | for (i = 0; i < num_pins; i++) { | 2528 | for (i = 0; i < num_pins; i++) { |
2508 | hda_nid_t pin = pins[i]; | 2529 | hda_nid_t pin = pins[i]; |
2509 | if (pin == spec->hp_mic_pin) { | 2530 | if (pin == spec->hp_mic_pin) |
2510 | int ret = create_hp_mic_jack_mode(codec, pin); | ||
2511 | if (ret < 0) | ||
2512 | return ret; | ||
2513 | continue; | 2531 | continue; |
2514 | } | ||
2515 | if (get_out_jack_num_items(codec, pin) > 1) { | 2532 | if (get_out_jack_num_items(codec, pin) > 1) { |
2516 | struct snd_kcontrol_new *knew; | 2533 | struct snd_kcontrol_new *knew; |
2517 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | 2534 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
@@ -2764,7 +2781,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol, | |||
2764 | val &= ~(AC_PINCTL_VREFEN | PIN_HP); | 2781 | val &= ~(AC_PINCTL_VREFEN | PIN_HP); |
2765 | val |= get_vref_idx(vref_caps, idx) | PIN_IN; | 2782 | val |= get_vref_idx(vref_caps, idx) | PIN_IN; |
2766 | } else | 2783 | } else |
2767 | val = snd_hda_get_default_vref(codec, nid); | 2784 | val = snd_hda_get_default_vref(codec, nid) | PIN_IN; |
2768 | } | 2785 | } |
2769 | snd_hda_set_pin_ctl_cache(codec, nid, val); | 2786 | snd_hda_set_pin_ctl_cache(codec, nid, val); |
2770 | call_hp_automute(codec, NULL); | 2787 | call_hp_automute(codec, NULL); |
@@ -2784,9 +2801,6 @@ static int create_hp_mic_jack_mode(struct hda_codec *codec, hda_nid_t pin) | |||
2784 | struct hda_gen_spec *spec = codec->spec; | 2801 | struct hda_gen_spec *spec = codec->spec; |
2785 | struct snd_kcontrol_new *knew; | 2802 | struct snd_kcontrol_new *knew; |
2786 | 2803 | ||
2787 | if (get_out_jack_num_items(codec, pin) <= 1 && | ||
2788 | get_in_jack_num_items(codec, pin) <= 1) | ||
2789 | return 0; /* no need */ | ||
2790 | knew = snd_hda_gen_add_kctl(spec, "Headphone Mic Jack Mode", | 2804 | knew = snd_hda_gen_add_kctl(spec, "Headphone Mic Jack Mode", |
2791 | &hp_mic_jack_mode_enum); | 2805 | &hp_mic_jack_mode_enum); |
2792 | if (!knew) | 2806 | if (!knew) |
@@ -2815,6 +2829,42 @@ static int add_loopback_list(struct hda_gen_spec *spec, hda_nid_t mix, int idx) | |||
2815 | return 0; | 2829 | return 0; |
2816 | } | 2830 | } |
2817 | 2831 | ||
2832 | /* return true if either a volume or a mute amp is found for the given | ||
2833 | * aamix path; the amp has to be either in the mixer node or its direct leaf | ||
2834 | */ | ||
2835 | static bool look_for_mix_leaf_ctls(struct hda_codec *codec, hda_nid_t mix_nid, | ||
2836 | hda_nid_t pin, unsigned int *mix_val, | ||
2837 | unsigned int *mute_val) | ||
2838 | { | ||
2839 | int idx, num_conns; | ||
2840 | const hda_nid_t *list; | ||
2841 | hda_nid_t nid; | ||
2842 | |||
2843 | idx = snd_hda_get_conn_index(codec, mix_nid, pin, true); | ||
2844 | if (idx < 0) | ||
2845 | return false; | ||
2846 | |||
2847 | *mix_val = *mute_val = 0; | ||
2848 | if (nid_has_volume(codec, mix_nid, HDA_INPUT)) | ||
2849 | *mix_val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | ||
2850 | if (nid_has_mute(codec, mix_nid, HDA_INPUT)) | ||
2851 | *mute_val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | ||
2852 | if (*mix_val && *mute_val) | ||
2853 | return true; | ||
2854 | |||
2855 | /* check leaf node */ | ||
2856 | num_conns = snd_hda_get_conn_list(codec, mix_nid, &list); | ||
2857 | if (num_conns < idx) | ||
2858 | return false; | ||
2859 | nid = list[idx]; | ||
2860 | if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT)) | ||
2861 | *mix_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT); | ||
2862 | if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT)) | ||
2863 | *mute_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT); | ||
2864 | |||
2865 | return *mix_val || *mute_val; | ||
2866 | } | ||
2867 | |||
2818 | /* create input playback/capture controls for the given pin */ | 2868 | /* create input playback/capture controls for the given pin */ |
2819 | static int new_analog_input(struct hda_codec *codec, int input_idx, | 2869 | static int new_analog_input(struct hda_codec *codec, int input_idx, |
2820 | hda_nid_t pin, const char *ctlname, int ctlidx, | 2870 | hda_nid_t pin, const char *ctlname, int ctlidx, |
@@ -2822,12 +2872,11 @@ static int new_analog_input(struct hda_codec *codec, int input_idx, | |||
2822 | { | 2872 | { |
2823 | struct hda_gen_spec *spec = codec->spec; | 2873 | struct hda_gen_spec *spec = codec->spec; |
2824 | struct nid_path *path; | 2874 | struct nid_path *path; |
2825 | unsigned int val; | 2875 | unsigned int mix_val, mute_val; |
2826 | int err, idx; | 2876 | int err, idx; |
2827 | 2877 | ||
2828 | if (!nid_has_volume(codec, mix_nid, HDA_INPUT) && | 2878 | if (!look_for_mix_leaf_ctls(codec, mix_nid, pin, &mix_val, &mute_val)) |
2829 | !nid_has_mute(codec, mix_nid, HDA_INPUT)) | 2879 | return 0; |
2830 | return 0; /* no need for analog loopback */ | ||
2831 | 2880 | ||
2832 | path = snd_hda_add_new_path(codec, pin, mix_nid, 0); | 2881 | path = snd_hda_add_new_path(codec, pin, mix_nid, 0); |
2833 | if (!path) | 2882 | if (!path) |
@@ -2836,20 +2885,18 @@ static int new_analog_input(struct hda_codec *codec, int input_idx, | |||
2836 | spec->loopback_paths[input_idx] = snd_hda_get_path_idx(codec, path); | 2885 | spec->loopback_paths[input_idx] = snd_hda_get_path_idx(codec, path); |
2837 | 2886 | ||
2838 | idx = path->idx[path->depth - 1]; | 2887 | idx = path->idx[path->depth - 1]; |
2839 | if (nid_has_volume(codec, mix_nid, HDA_INPUT)) { | 2888 | if (mix_val) { |
2840 | val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | 2889 | err = __add_pb_vol_ctrl(spec, HDA_CTL_WIDGET_VOL, ctlname, ctlidx, mix_val); |
2841 | err = __add_pb_vol_ctrl(spec, HDA_CTL_WIDGET_VOL, ctlname, ctlidx, val); | ||
2842 | if (err < 0) | 2890 | if (err < 0) |
2843 | return err; | 2891 | return err; |
2844 | path->ctls[NID_PATH_VOL_CTL] = val; | 2892 | path->ctls[NID_PATH_VOL_CTL] = mix_val; |
2845 | } | 2893 | } |
2846 | 2894 | ||
2847 | if (nid_has_mute(codec, mix_nid, HDA_INPUT)) { | 2895 | if (mute_val) { |
2848 | val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | 2896 | err = __add_pb_sw_ctrl(spec, HDA_CTL_WIDGET_MUTE, ctlname, ctlidx, mute_val); |
2849 | err = __add_pb_sw_ctrl(spec, HDA_CTL_WIDGET_MUTE, ctlname, ctlidx, val); | ||
2850 | if (err < 0) | 2897 | if (err < 0) |
2851 | return err; | 2898 | return err; |
2852 | path->ctls[NID_PATH_MUTE_CTL] = val; | 2899 | path->ctls[NID_PATH_MUTE_CTL] = mute_val; |
2853 | } | 2900 | } |
2854 | 2901 | ||
2855 | path->active = true; | 2902 | path->active = true; |
@@ -4271,6 +4318,26 @@ static unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec, | |||
4271 | return AC_PWRST_D3; | 4318 | return AC_PWRST_D3; |
4272 | } | 4319 | } |
4273 | 4320 | ||
4321 | /* mute all aamix inputs initially; parse up to the first leaves */ | ||
4322 | static void mute_all_mixer_nid(struct hda_codec *codec, hda_nid_t mix) | ||
4323 | { | ||
4324 | int i, nums; | ||
4325 | const hda_nid_t *conn; | ||
4326 | bool has_amp; | ||
4327 | |||
4328 | nums = snd_hda_get_conn_list(codec, mix, &conn); | ||
4329 | has_amp = nid_has_mute(codec, mix, HDA_INPUT); | ||
4330 | for (i = 0; i < nums; i++) { | ||
4331 | if (has_amp) | ||
4332 | snd_hda_codec_amp_stereo(codec, mix, | ||
4333 | HDA_INPUT, i, | ||
4334 | 0xff, HDA_AMP_MUTE); | ||
4335 | else if (nid_has_volume(codec, conn[i], HDA_OUTPUT)) | ||
4336 | snd_hda_codec_amp_stereo(codec, conn[i], | ||
4337 | HDA_OUTPUT, 0, | ||
4338 | 0xff, HDA_AMP_MUTE); | ||
4339 | } | ||
4340 | } | ||
4274 | 4341 | ||
4275 | /* | 4342 | /* |
4276 | * Parse the given BIOS configuration and set up the hda_gen_spec | 4343 | * Parse the given BIOS configuration and set up the hda_gen_spec |
@@ -4383,6 +4450,17 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, | |||
4383 | if (err < 0) | 4450 | if (err < 0) |
4384 | return err; | 4451 | return err; |
4385 | 4452 | ||
4453 | /* create "Headphone Mic Jack Mode" if no input selection is | ||
4454 | * available (or user specifies add_jack_modes hint) | ||
4455 | */ | ||
4456 | if (spec->hp_mic_pin && | ||
4457 | (spec->auto_mic || spec->input_mux.num_items == 1 || | ||
4458 | spec->add_jack_modes)) { | ||
4459 | err = create_hp_mic_jack_mode(codec, spec->hp_mic_pin); | ||
4460 | if (err < 0) | ||
4461 | return err; | ||
4462 | } | ||
4463 | |||
4386 | if (spec->add_jack_modes) { | 4464 | if (spec->add_jack_modes) { |
4387 | if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { | 4465 | if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { |
4388 | err = create_out_jack_modes(codec, cfg->line_outs, | 4466 | err = create_out_jack_modes(codec, cfg->line_outs, |
@@ -4398,6 +4476,10 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, | |||
4398 | } | 4476 | } |
4399 | } | 4477 | } |
4400 | 4478 | ||
4479 | /* mute all aamix input initially */ | ||
4480 | if (spec->mixer_nid) | ||
4481 | mute_all_mixer_nid(codec, spec->mixer_nid); | ||
4482 | |||
4401 | dig_only: | 4483 | dig_only: |
4402 | parse_digital(codec); | 4484 | parse_digital(codec); |
4403 | 4485 | ||
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 7e45cb44d151..0929a06df812 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h | |||
@@ -249,6 +249,9 @@ struct hda_gen_spec { | |||
249 | const struct badness_table *main_out_badness; | 249 | const struct badness_table *main_out_badness; |
250 | const struct badness_table *extra_out_badness; | 250 | const struct badness_table *extra_out_badness; |
251 | 251 | ||
252 | /* preferred pin/DAC pairs; an array of paired NIDs */ | ||
253 | const hda_nid_t *preferred_dacs; | ||
254 | |||
252 | /* loopback mixing mode */ | 255 | /* loopback mixing mode */ |
253 | bool aamix_mode; | 256 | bool aamix_mode; |
254 | 257 | ||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 7a09404579a7..956871d8b3d2 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2994,8 +2994,7 @@ static int azx_runtime_suspend(struct device *dev) | |||
2994 | STATESTS_INT_MASK); | 2994 | STATESTS_INT_MASK); |
2995 | 2995 | ||
2996 | azx_stop_chip(chip); | 2996 | azx_stop_chip(chip); |
2997 | if (!chip->bus->avoid_link_reset) | 2997 | azx_enter_link_reset(chip); |
2998 | azx_enter_link_reset(chip); | ||
2999 | azx_clear_irq_pending(chip); | 2998 | azx_clear_irq_pending(chip); |
3000 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) | 2999 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) |
3001 | hda_display_power(false); | 3000 | hda_display_power(false); |
@@ -3434,6 +3433,10 @@ static void check_probe_mask(struct azx *chip, int dev) | |||
3434 | * white/black-list for enable_msi | 3433 | * white/black-list for enable_msi |
3435 | */ | 3434 | */ |
3436 | static struct snd_pci_quirk msi_black_list[] = { | 3435 | static struct snd_pci_quirk msi_black_list[] = { |
3436 | SND_PCI_QUIRK(0x103c, 0x2191, "HP", 0), /* AMD Hudson */ | ||
3437 | SND_PCI_QUIRK(0x103c, 0x2192, "HP", 0), /* AMD Hudson */ | ||
3438 | SND_PCI_QUIRK(0x103c, 0x21f7, "HP", 0), /* AMD Hudson */ | ||
3439 | SND_PCI_QUIRK(0x103c, 0x21fa, "HP", 0), /* AMD Hudson */ | ||
3437 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ | 3440 | SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */ |
3438 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ | 3441 | SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */ |
3439 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ | 3442 | SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */ |
@@ -3877,7 +3880,8 @@ static int azx_probe(struct pci_dev *pci, | |||
3877 | } | 3880 | } |
3878 | 3881 | ||
3879 | dev++; | 3882 | dev++; |
3880 | complete_all(&chip->probe_wait); | 3883 | if (chip->disabled) |
3884 | complete_all(&chip->probe_wait); | ||
3881 | return 0; | 3885 | return 0; |
3882 | 3886 | ||
3883 | out_free: | 3887 | out_free: |
@@ -3954,10 +3958,10 @@ static int azx_probe_continue(struct azx *chip) | |||
3954 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) | 3958 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) |
3955 | pm_runtime_put_noidle(&pci->dev); | 3959 | pm_runtime_put_noidle(&pci->dev); |
3956 | 3960 | ||
3957 | return 0; | ||
3958 | |||
3959 | out_free: | 3961 | out_free: |
3960 | chip->init_failed = 1; | 3962 | if (err < 0) |
3963 | chip->init_failed = 1; | ||
3964 | complete_all(&chip->probe_wait); | ||
3961 | return err; | 3965 | return err; |
3962 | } | 3966 | } |
3963 | 3967 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 1a83559f4cbd..699262a3e07a 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -147,6 +147,8 @@ static void ad_vmaster_eapd_hook(void *private_data, int enabled) | |||
147 | 147 | ||
148 | if (!spec->eapd_nid) | 148 | if (!spec->eapd_nid) |
149 | return; | 149 | return; |
150 | if (codec->inv_eapd) | ||
151 | enabled = !enabled; | ||
150 | snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, | 152 | snd_hda_codec_update_cache(codec, spec->eapd_nid, 0, |
151 | AC_VERB_SET_EAPD_BTLENABLE, | 153 | AC_VERB_SET_EAPD_BTLENABLE, |
152 | enabled ? 0x02 : 0x00); | 154 | enabled ? 0x02 : 0x00); |
@@ -338,6 +340,14 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
338 | { | 340 | { |
339 | int err; | 341 | int err; |
340 | struct ad198x_spec *spec; | 342 | struct ad198x_spec *spec; |
343 | static hda_nid_t preferred_pairs[] = { | ||
344 | 0x1a, 0x03, | ||
345 | 0x1b, 0x03, | ||
346 | 0x1c, 0x04, | ||
347 | 0x1d, 0x05, | ||
348 | 0x1e, 0x03, | ||
349 | 0 | ||
350 | }; | ||
341 | 351 | ||
342 | err = alloc_ad_spec(codec); | 352 | err = alloc_ad_spec(codec); |
343 | if (err < 0) | 353 | if (err < 0) |
@@ -358,6 +368,11 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
358 | * So, let's disable the shared stream. | 368 | * So, let's disable the shared stream. |
359 | */ | 369 | */ |
360 | spec->gen.multiout.no_share_stream = 1; | 370 | spec->gen.multiout.no_share_stream = 1; |
371 | /* give fixed DAC/pin pairs */ | ||
372 | spec->gen.preferred_dacs = preferred_pairs; | ||
373 | |||
374 | /* AD1986A can't manage the dynamic pin on/off smoothly */ | ||
375 | spec->gen.auto_mute_via_amp = 1; | ||
361 | 376 | ||
362 | snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl, | 377 | snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl, |
363 | ad1986a_fixups); | 378 | ad1986a_fixups); |
@@ -962,6 +977,7 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec, | |||
962 | switch (action) { | 977 | switch (action) { |
963 | case HDA_FIXUP_ACT_PRE_PROBE: | 978 | case HDA_FIXUP_ACT_PRE_PROBE: |
964 | spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; | 979 | spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; |
980 | spec->gen.own_eapd_ctl = 1; | ||
965 | snd_hda_sequence_write_cache(codec, gpio_init_verbs); | 981 | snd_hda_sequence_write_cache(codec, gpio_init_verbs); |
966 | break; | 982 | break; |
967 | case HDA_FIXUP_ACT_PROBE: | 983 | case HDA_FIXUP_ACT_PROBE: |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index c205bb1747fd..3fbf2883e06e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -2936,7 +2936,6 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
2936 | SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), | 2936 | SND_PCI_QUIRK(0x1028, 0x0401, "Dell Vostro 1014", CXT5066_DELL_VOSTRO), |
2937 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), | 2937 | SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD), |
2938 | SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD), | 2938 | SND_PCI_QUIRK(0x1028, 0x050f, "Dell Inspiron", CXT5066_IDEAPAD), |
2939 | SND_PCI_QUIRK(0x1028, 0x0510, "Dell Vostro", CXT5066_IDEAPAD), | ||
2940 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), | 2939 | SND_PCI_QUIRK(0x103c, 0x360b, "HP G60", CXT5066_HP_LAPTOP), |
2941 | SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_ASUS), | 2940 | SND_PCI_QUIRK(0x1043, 0x13f3, "Asus A52J", CXT5066_ASUS), |
2942 | SND_PCI_QUIRK(0x1043, 0x1643, "Asus K52JU", CXT5066_ASUS), | 2941 | SND_PCI_QUIRK(0x1043, 0x1643, "Asus K52JU", CXT5066_ASUS), |
@@ -3244,9 +3243,29 @@ enum { | |||
3244 | #if IS_ENABLED(CONFIG_THINKPAD_ACPI) | 3243 | #if IS_ENABLED(CONFIG_THINKPAD_ACPI) |
3245 | 3244 | ||
3246 | #include <linux/thinkpad_acpi.h> | 3245 | #include <linux/thinkpad_acpi.h> |
3246 | #include <acpi/acpi.h> | ||
3247 | 3247 | ||
3248 | static int (*led_set_func)(int, bool); | 3248 | static int (*led_set_func)(int, bool); |
3249 | 3249 | ||
3250 | static acpi_status acpi_check_cb(acpi_handle handle, u32 lvl, void *context, | ||
3251 | void **rv) | ||
3252 | { | ||
3253 | bool *found = context; | ||
3254 | *found = true; | ||
3255 | return AE_OK; | ||
3256 | } | ||
3257 | |||
3258 | static bool is_thinkpad(struct hda_codec *codec) | ||
3259 | { | ||
3260 | bool found = false; | ||
3261 | if (codec->subsystem_id >> 16 != 0x17aa) | ||
3262 | return false; | ||
3263 | if (ACPI_SUCCESS(acpi_get_devices("LEN0068", acpi_check_cb, &found, NULL)) && found) | ||
3264 | return true; | ||
3265 | found = false; | ||
3266 | return ACPI_SUCCESS(acpi_get_devices("IBM0068", acpi_check_cb, &found, NULL)) && found; | ||
3267 | } | ||
3268 | |||
3250 | static void update_tpacpi_mute_led(void *private_data, int enabled) | 3269 | static void update_tpacpi_mute_led(void *private_data, int enabled) |
3251 | { | 3270 | { |
3252 | struct hda_codec *codec = private_data; | 3271 | struct hda_codec *codec = private_data; |
@@ -3279,6 +3298,8 @@ static void cxt_fixup_thinkpad_acpi(struct hda_codec *codec, | |||
3279 | bool removefunc = false; | 3298 | bool removefunc = false; |
3280 | 3299 | ||
3281 | if (action == HDA_FIXUP_ACT_PROBE) { | 3300 | if (action == HDA_FIXUP_ACT_PROBE) { |
3301 | if (!is_thinkpad(codec)) | ||
3302 | return; | ||
3282 | if (!led_set_func) | 3303 | if (!led_set_func) |
3283 | led_set_func = symbol_request(tpacpi_led_set); | 3304 | led_set_func = symbol_request(tpacpi_led_set); |
3284 | if (!led_set_func) { | 3305 | if (!led_set_func) { |
@@ -3494,6 +3515,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { | |||
3494 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), | 3515 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
3495 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), | 3516 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), |
3496 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), | 3517 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), |
3518 | SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), | ||
3497 | SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), | 3519 | SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), |
3498 | SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), | 3520 | SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), |
3499 | {} | 3521 | {} |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 08407bed093e..f281c8068557 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1142,32 +1142,34 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
1142 | 1142 | ||
1143 | static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll); | 1143 | static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll); |
1144 | 1144 | ||
1145 | static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) | 1145 | static void jack_callback(struct hda_codec *codec, struct hda_jack_tbl *jack) |
1146 | { | 1146 | { |
1147 | struct hdmi_spec *spec = codec->spec; | 1147 | struct hdmi_spec *spec = codec->spec; |
1148 | int pin_idx = pin_nid_to_pin_index(spec, jack->nid); | ||
1149 | if (pin_idx < 0) | ||
1150 | return; | ||
1151 | |||
1152 | if (hdmi_present_sense(get_pin(spec, pin_idx), 1)) | ||
1153 | snd_hda_jack_report_sync(codec); | ||
1154 | } | ||
1155 | |||
1156 | static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res) | ||
1157 | { | ||
1148 | int tag = res >> AC_UNSOL_RES_TAG_SHIFT; | 1158 | int tag = res >> AC_UNSOL_RES_TAG_SHIFT; |
1149 | int pin_nid; | ||
1150 | int pin_idx; | ||
1151 | struct hda_jack_tbl *jack; | 1159 | struct hda_jack_tbl *jack; |
1152 | int dev_entry = (res & AC_UNSOL_RES_DE) >> AC_UNSOL_RES_DE_SHIFT; | 1160 | int dev_entry = (res & AC_UNSOL_RES_DE) >> AC_UNSOL_RES_DE_SHIFT; |
1153 | 1161 | ||
1154 | jack = snd_hda_jack_tbl_get_from_tag(codec, tag); | 1162 | jack = snd_hda_jack_tbl_get_from_tag(codec, tag); |
1155 | if (!jack) | 1163 | if (!jack) |
1156 | return; | 1164 | return; |
1157 | pin_nid = jack->nid; | ||
1158 | jack->jack_dirty = 1; | 1165 | jack->jack_dirty = 1; |
1159 | 1166 | ||
1160 | _snd_printd(SND_PR_VERBOSE, | 1167 | _snd_printd(SND_PR_VERBOSE, |
1161 | "HDMI hot plug event: Codec=%d Pin=%d Device=%d Inactive=%d Presence_Detect=%d ELD_Valid=%d\n", | 1168 | "HDMI hot plug event: Codec=%d Pin=%d Device=%d Inactive=%d Presence_Detect=%d ELD_Valid=%d\n", |
1162 | codec->addr, pin_nid, dev_entry, !!(res & AC_UNSOL_RES_IA), | 1169 | codec->addr, jack->nid, dev_entry, !!(res & AC_UNSOL_RES_IA), |
1163 | !!(res & AC_UNSOL_RES_PD), !!(res & AC_UNSOL_RES_ELDV)); | 1170 | !!(res & AC_UNSOL_RES_PD), !!(res & AC_UNSOL_RES_ELDV)); |
1164 | 1171 | ||
1165 | pin_idx = pin_nid_to_pin_index(spec, pin_nid); | 1172 | jack_callback(codec, jack); |
1166 | if (pin_idx < 0) | ||
1167 | return; | ||
1168 | |||
1169 | if (hdmi_present_sense(get_pin(spec, pin_idx), 1)) | ||
1170 | snd_hda_jack_report_sync(codec); | ||
1171 | } | 1173 | } |
1172 | 1174 | ||
1173 | static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) | 1175 | static void hdmi_non_intrinsic_event(struct hda_codec *codec, unsigned int res) |
@@ -2095,7 +2097,8 @@ static int generic_hdmi_init(struct hda_codec *codec) | |||
2095 | hda_nid_t pin_nid = per_pin->pin_nid; | 2097 | hda_nid_t pin_nid = per_pin->pin_nid; |
2096 | 2098 | ||
2097 | hdmi_init_pin(codec, pin_nid); | 2099 | hdmi_init_pin(codec, pin_nid); |
2098 | snd_hda_jack_detect_enable(codec, pin_nid, pin_nid); | 2100 | snd_hda_jack_detect_enable_callback(codec, pin_nid, pin_nid, |
2101 | codec->jackpoll_interval > 0 ? jack_callback : NULL); | ||
2099 | } | 2102 | } |
2100 | return 0; | 2103 | return 0; |
2101 | } | 2104 | } |
@@ -2334,8 +2337,9 @@ static int simple_playback_build_controls(struct hda_codec *codec) | |||
2334 | int err; | 2337 | int err; |
2335 | 2338 | ||
2336 | per_cvt = get_cvt(spec, 0); | 2339 | per_cvt = get_cvt(spec, 0); |
2337 | err = snd_hda_create_spdif_out_ctls(codec, per_cvt->cvt_nid, | 2340 | err = snd_hda_create_dig_out_ctls(codec, per_cvt->cvt_nid, |
2338 | per_cvt->cvt_nid); | 2341 | per_cvt->cvt_nid, |
2342 | HDA_PCM_TYPE_HDMI); | ||
2339 | if (err < 0) | 2343 | if (err < 0) |
2340 | return err; | 2344 | return err; |
2341 | return simple_hdmi_build_jack(codec, 0); | 2345 | return simple_hdmi_build_jack(codec, 0); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5e42059f10a1..c5646941539a 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1780,8 +1780,11 @@ enum { | |||
1780 | ALC889_FIXUP_DAC_ROUTE, | 1780 | ALC889_FIXUP_DAC_ROUTE, |
1781 | ALC889_FIXUP_MBP_VREF, | 1781 | ALC889_FIXUP_MBP_VREF, |
1782 | ALC889_FIXUP_IMAC91_VREF, | 1782 | ALC889_FIXUP_IMAC91_VREF, |
1783 | ALC889_FIXUP_MBA21_VREF, | ||
1783 | ALC882_FIXUP_INV_DMIC, | 1784 | ALC882_FIXUP_INV_DMIC, |
1784 | ALC882_FIXUP_NO_PRIMARY_HP, | 1785 | ALC882_FIXUP_NO_PRIMARY_HP, |
1786 | ALC887_FIXUP_ASUS_BASS, | ||
1787 | ALC887_FIXUP_BASS_CHMAP, | ||
1785 | }; | 1788 | }; |
1786 | 1789 | ||
1787 | static void alc889_fixup_coef(struct hda_codec *codec, | 1790 | static void alc889_fixup_coef(struct hda_codec *codec, |
@@ -1882,17 +1885,13 @@ static void alc889_fixup_mbp_vref(struct hda_codec *codec, | |||
1882 | } | 1885 | } |
1883 | } | 1886 | } |
1884 | 1887 | ||
1885 | /* Set VREF on speaker pins on imac91 */ | 1888 | static void alc889_fixup_mac_pins(struct hda_codec *codec, |
1886 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, | 1889 | const hda_nid_t *nids, int num_nids) |
1887 | const struct hda_fixup *fix, int action) | ||
1888 | { | 1890 | { |
1889 | struct alc_spec *spec = codec->spec; | 1891 | struct alc_spec *spec = codec->spec; |
1890 | static hda_nid_t nids[2] = { 0x18, 0x1a }; | ||
1891 | int i; | 1892 | int i; |
1892 | 1893 | ||
1893 | if (action != HDA_FIXUP_ACT_INIT) | 1894 | for (i = 0; i < num_nids; i++) { |
1894 | return; | ||
1895 | for (i = 0; i < ARRAY_SIZE(nids); i++) { | ||
1896 | unsigned int val; | 1895 | unsigned int val; |
1897 | val = snd_hda_codec_get_pin_target(codec, nids[i]); | 1896 | val = snd_hda_codec_get_pin_target(codec, nids[i]); |
1898 | val |= AC_PINCTL_VREF_50; | 1897 | val |= AC_PINCTL_VREF_50; |
@@ -1901,6 +1900,26 @@ static void alc889_fixup_imac91_vref(struct hda_codec *codec, | |||
1901 | spec->gen.keep_vref_in_automute = 1; | 1900 | spec->gen.keep_vref_in_automute = 1; |
1902 | } | 1901 | } |
1903 | 1902 | ||
1903 | /* Set VREF on speaker pins on imac91 */ | ||
1904 | static void alc889_fixup_imac91_vref(struct hda_codec *codec, | ||
1905 | const struct hda_fixup *fix, int action) | ||
1906 | { | ||
1907 | static hda_nid_t nids[2] = { 0x18, 0x1a }; | ||
1908 | |||
1909 | if (action == HDA_FIXUP_ACT_INIT) | ||
1910 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); | ||
1911 | } | ||
1912 | |||
1913 | /* Set VREF on speaker pins on mba21 */ | ||
1914 | static void alc889_fixup_mba21_vref(struct hda_codec *codec, | ||
1915 | const struct hda_fixup *fix, int action) | ||
1916 | { | ||
1917 | static hda_nid_t nids[2] = { 0x18, 0x19 }; | ||
1918 | |||
1919 | if (action == HDA_FIXUP_ACT_INIT) | ||
1920 | alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); | ||
1921 | } | ||
1922 | |||
1904 | /* Don't take HP output as primary | 1923 | /* Don't take HP output as primary |
1905 | * Strangely, the speaker output doesn't work on Vaio Z and some Vaio | 1924 | * Strangely, the speaker output doesn't work on Vaio Z and some Vaio |
1906 | * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 | 1925 | * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 |
@@ -1915,6 +1934,9 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec, | |||
1915 | } | 1934 | } |
1916 | } | 1935 | } |
1917 | 1936 | ||
1937 | static void alc_fixup_bass_chmap(struct hda_codec *codec, | ||
1938 | const struct hda_fixup *fix, int action); | ||
1939 | |||
1918 | static const struct hda_fixup alc882_fixups[] = { | 1940 | static const struct hda_fixup alc882_fixups[] = { |
1919 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { | 1941 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
1920 | .type = HDA_FIXUP_PINS, | 1942 | .type = HDA_FIXUP_PINS, |
@@ -2097,6 +2119,12 @@ static const struct hda_fixup alc882_fixups[] = { | |||
2097 | .chained = true, | 2119 | .chained = true, |
2098 | .chain_id = ALC882_FIXUP_GPIO1, | 2120 | .chain_id = ALC882_FIXUP_GPIO1, |
2099 | }, | 2121 | }, |
2122 | [ALC889_FIXUP_MBA21_VREF] = { | ||
2123 | .type = HDA_FIXUP_FUNC, | ||
2124 | .v.func = alc889_fixup_mba21_vref, | ||
2125 | .chained = true, | ||
2126 | .chain_id = ALC889_FIXUP_MBP_VREF, | ||
2127 | }, | ||
2100 | [ALC882_FIXUP_INV_DMIC] = { | 2128 | [ALC882_FIXUP_INV_DMIC] = { |
2101 | .type = HDA_FIXUP_FUNC, | 2129 | .type = HDA_FIXUP_FUNC, |
2102 | .v.func = alc_fixup_inv_dmic_0x12, | 2130 | .v.func = alc_fixup_inv_dmic_0x12, |
@@ -2105,6 +2133,19 @@ static const struct hda_fixup alc882_fixups[] = { | |||
2105 | .type = HDA_FIXUP_FUNC, | 2133 | .type = HDA_FIXUP_FUNC, |
2106 | .v.func = alc882_fixup_no_primary_hp, | 2134 | .v.func = alc882_fixup_no_primary_hp, |
2107 | }, | 2135 | }, |
2136 | [ALC887_FIXUP_ASUS_BASS] = { | ||
2137 | .type = HDA_FIXUP_PINS, | ||
2138 | .v.pins = (const struct hda_pintbl[]) { | ||
2139 | {0x16, 0x99130130}, /* bass speaker */ | ||
2140 | {} | ||
2141 | }, | ||
2142 | .chained = true, | ||
2143 | .chain_id = ALC887_FIXUP_BASS_CHMAP, | ||
2144 | }, | ||
2145 | [ALC887_FIXUP_BASS_CHMAP] = { | ||
2146 | .type = HDA_FIXUP_FUNC, | ||
2147 | .v.func = alc_fixup_bass_chmap, | ||
2148 | }, | ||
2108 | }; | 2149 | }; |
2109 | 2150 | ||
2110 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 2151 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -2138,6 +2179,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
2138 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), | 2179 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), |
2139 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), | 2180 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), |
2140 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), | 2181 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
2182 | SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), | ||
2141 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | 2183 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), |
2142 | SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), | 2184 | SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), |
2143 | SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), | 2185 | SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), |
@@ -2153,7 +2195,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
2153 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), | 2195 | SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889_FIXUP_MBP_VREF), |
2154 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), | 2196 | SND_PCI_QUIRK(0x106b, 0x3200, "iMac 7,1 Aluminum", ALC882_FIXUP_EAPD), |
2155 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), | 2197 | SND_PCI_QUIRK(0x106b, 0x3400, "MacBookAir 1,1", ALC889_FIXUP_MBP_VREF), |
2156 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBP_VREF), | 2198 | SND_PCI_QUIRK(0x106b, 0x3500, "MacBookAir 2,1", ALC889_FIXUP_MBA21_VREF), |
2157 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), | 2199 | SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889_FIXUP_MBP_VREF), |
2158 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), | 2200 | SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC889_FIXUP_MBP_VREF), |
2159 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), | 2201 | SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_FIXUP_MACPRO_GPIO), |
@@ -3268,6 +3310,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec) | |||
3268 | alc_write_coef_idx(codec, 0x18, 0x7388); | 3310 | alc_write_coef_idx(codec, 0x18, 0x7388); |
3269 | break; | 3311 | break; |
3270 | case 0x10ec0668: | 3312 | case 0x10ec0668: |
3313 | alc_write_coef_idx(codec, 0x11, 0x0001); | ||
3271 | alc_write_coef_idx(codec, 0x15, 0x0d60); | 3314 | alc_write_coef_idx(codec, 0x15, 0x0d60); |
3272 | alc_write_coef_idx(codec, 0xc3, 0x0000); | 3315 | alc_write_coef_idx(codec, 0xc3, 0x0000); |
3273 | break; | 3316 | break; |
@@ -3296,6 +3339,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec) | |||
3296 | alc_write_coef_idx(codec, 0x18, 0x7388); | 3339 | alc_write_coef_idx(codec, 0x18, 0x7388); |
3297 | break; | 3340 | break; |
3298 | case 0x10ec0668: | 3341 | case 0x10ec0668: |
3342 | alc_write_coef_idx(codec, 0x11, 0x0001); | ||
3299 | alc_write_coef_idx(codec, 0x15, 0x0d50); | 3343 | alc_write_coef_idx(codec, 0x15, 0x0d50); |
3300 | alc_write_coef_idx(codec, 0xc3, 0x0000); | 3344 | alc_write_coef_idx(codec, 0xc3, 0x0000); |
3301 | break; | 3345 | break; |
@@ -3581,11 +3625,6 @@ static void alc283_hp_automute_hook(struct hda_codec *codec, | |||
3581 | vref); | 3625 | vref); |
3582 | } | 3626 | } |
3583 | 3627 | ||
3584 | static void alc283_chromebook_caps(struct hda_codec *codec) | ||
3585 | { | ||
3586 | snd_hda_override_wcaps(codec, 0x03, 0); | ||
3587 | } | ||
3588 | |||
3589 | static void alc283_fixup_chromebook(struct hda_codec *codec, | 3628 | static void alc283_fixup_chromebook(struct hda_codec *codec, |
3590 | const struct hda_fixup *fix, int action) | 3629 | const struct hda_fixup *fix, int action) |
3591 | { | 3630 | { |
@@ -3594,9 +3633,26 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, | |||
3594 | 3633 | ||
3595 | switch (action) { | 3634 | switch (action) { |
3596 | case HDA_FIXUP_ACT_PRE_PROBE: | 3635 | case HDA_FIXUP_ACT_PRE_PROBE: |
3597 | alc283_chromebook_caps(codec); | 3636 | snd_hda_override_wcaps(codec, 0x03, 0); |
3598 | /* Disable AA-loopback as it causes white noise */ | 3637 | /* Disable AA-loopback as it causes white noise */ |
3599 | spec->gen.mixer_nid = 0; | 3638 | spec->gen.mixer_nid = 0; |
3639 | break; | ||
3640 | case HDA_FIXUP_ACT_INIT: | ||
3641 | /* Enable Line1 input control by verb */ | ||
3642 | val = alc_read_coef_idx(codec, 0x1a); | ||
3643 | alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); | ||
3644 | break; | ||
3645 | } | ||
3646 | } | ||
3647 | |||
3648 | static void alc283_fixup_sense_combo_jack(struct hda_codec *codec, | ||
3649 | const struct hda_fixup *fix, int action) | ||
3650 | { | ||
3651 | struct alc_spec *spec = codec->spec; | ||
3652 | int val; | ||
3653 | |||
3654 | switch (action) { | ||
3655 | case HDA_FIXUP_ACT_PRE_PROBE: | ||
3600 | spec->gen.hp_automute_hook = alc283_hp_automute_hook; | 3656 | spec->gen.hp_automute_hook = alc283_hp_automute_hook; |
3601 | break; | 3657 | break; |
3602 | case HDA_FIXUP_ACT_INIT: | 3658 | case HDA_FIXUP_ACT_INIT: |
@@ -3604,9 +3660,6 @@ static void alc283_fixup_chromebook(struct hda_codec *codec, | |||
3604 | /* Set to manual mode */ | 3660 | /* Set to manual mode */ |
3605 | val = alc_read_coef_idx(codec, 0x06); | 3661 | val = alc_read_coef_idx(codec, 0x06); |
3606 | alc_write_coef_idx(codec, 0x06, val & ~0x000c); | 3662 | alc_write_coef_idx(codec, 0x06, val & ~0x000c); |
3607 | /* Enable Line1 input control by verb */ | ||
3608 | val = alc_read_coef_idx(codec, 0x1a); | ||
3609 | alc_write_coef_idx(codec, 0x1a, val | (1 << 4)); | ||
3610 | break; | 3663 | break; |
3611 | } | 3664 | } |
3612 | } | 3665 | } |
@@ -3796,11 +3849,14 @@ enum { | |||
3796 | ALC269_FIXUP_ASUS_X101, | 3849 | ALC269_FIXUP_ASUS_X101, |
3797 | ALC271_FIXUP_AMIC_MIC2, | 3850 | ALC271_FIXUP_AMIC_MIC2, |
3798 | ALC271_FIXUP_HP_GATE_MIC_JACK, | 3851 | ALC271_FIXUP_HP_GATE_MIC_JACK, |
3852 | ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572, | ||
3799 | ALC269_FIXUP_ACER_AC700, | 3853 | ALC269_FIXUP_ACER_AC700, |
3800 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, | 3854 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
3855 | ALC269VB_FIXUP_ASUS_ZENBOOK, | ||
3801 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, | 3856 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, |
3802 | ALC269VB_FIXUP_ORDISSIMO_EVE2, | 3857 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
3803 | ALC283_FIXUP_CHROME_BOOK, | 3858 | ALC283_FIXUP_CHROME_BOOK, |
3859 | ALC283_FIXUP_SENSE_COMBO_JACK, | ||
3804 | ALC282_FIXUP_ASUS_TX300, | 3860 | ALC282_FIXUP_ASUS_TX300, |
3805 | ALC283_FIXUP_INT_MIC, | 3861 | ALC283_FIXUP_INT_MIC, |
3806 | ALC290_FIXUP_MONO_SPEAKERS, | 3862 | ALC290_FIXUP_MONO_SPEAKERS, |
@@ -4056,6 +4112,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4056 | .chained = true, | 4112 | .chained = true, |
4057 | .chain_id = ALC271_FIXUP_AMIC_MIC2, | 4113 | .chain_id = ALC271_FIXUP_AMIC_MIC2, |
4058 | }, | 4114 | }, |
4115 | [ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572] = { | ||
4116 | .type = HDA_FIXUP_FUNC, | ||
4117 | .v.func = alc269_fixup_limit_int_mic_boost, | ||
4118 | .chained = true, | ||
4119 | .chain_id = ALC271_FIXUP_HP_GATE_MIC_JACK, | ||
4120 | }, | ||
4059 | [ALC269_FIXUP_ACER_AC700] = { | 4121 | [ALC269_FIXUP_ACER_AC700] = { |
4060 | .type = HDA_FIXUP_PINS, | 4122 | .type = HDA_FIXUP_PINS, |
4061 | .v.pins = (const struct hda_pintbl[]) { | 4123 | .v.pins = (const struct hda_pintbl[]) { |
@@ -4075,6 +4137,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4075 | .chained = true, | 4137 | .chained = true, |
4076 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, | 4138 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
4077 | }, | 4139 | }, |
4140 | [ALC269VB_FIXUP_ASUS_ZENBOOK] = { | ||
4141 | .type = HDA_FIXUP_FUNC, | ||
4142 | .v.func = alc269_fixup_limit_int_mic_boost, | ||
4143 | .chained = true, | ||
4144 | .chain_id = ALC269VB_FIXUP_DMIC, | ||
4145 | }, | ||
4078 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { | 4146 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { |
4079 | .type = HDA_FIXUP_FUNC, | 4147 | .type = HDA_FIXUP_FUNC, |
4080 | .v.func = alc269_fixup_limit_int_mic_boost, | 4148 | .v.func = alc269_fixup_limit_int_mic_boost, |
@@ -4094,6 +4162,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4094 | .type = HDA_FIXUP_FUNC, | 4162 | .type = HDA_FIXUP_FUNC, |
4095 | .v.func = alc283_fixup_chromebook, | 4163 | .v.func = alc283_fixup_chromebook, |
4096 | }, | 4164 | }, |
4165 | [ALC283_FIXUP_SENSE_COMBO_JACK] = { | ||
4166 | .type = HDA_FIXUP_FUNC, | ||
4167 | .v.func = alc283_fixup_sense_combo_jack, | ||
4168 | .chained = true, | ||
4169 | .chain_id = ALC283_FIXUP_CHROME_BOOK, | ||
4170 | }, | ||
4097 | [ALC282_FIXUP_ASUS_TX300] = { | 4171 | [ALC282_FIXUP_ASUS_TX300] = { |
4098 | .type = HDA_FIXUP_FUNC, | 4172 | .type = HDA_FIXUP_FUNC, |
4099 | .v.func = alc282_fixup_asus_tx300, | 4173 | .v.func = alc282_fixup_asus_tx300, |
@@ -4141,6 +4215,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4141 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4215 | SND_PCI_QUIRK(0x1025, 0x0740, "Acer AO725", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4142 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), | 4216 | SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK), |
4143 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), | 4217 | SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), |
4218 | SND_PCI_QUIRK(0x1025, 0x0775, "Acer Aspire E1-572", ALC271_FIXUP_HP_GATE_MIC_JACK_E1_572), | ||
4144 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), | 4219 | SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), |
4145 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4220 | SND_PCI_QUIRK(0x1028, 0x05bd, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4146 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4221 | SND_PCI_QUIRK(0x1028, 0x05be, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
@@ -4172,11 +4247,16 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4172 | SND_PCI_QUIRK(0x1028, 0x0606, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4247 | SND_PCI_QUIRK(0x1028, 0x0606, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4173 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4248 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4174 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4249 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4250 | SND_PCI_QUIRK(0x1028, 0x0610, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4175 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4251 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4176 | SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4252 | SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
4177 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), | 4253 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), |
4178 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4254 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4255 | SND_PCI_QUIRK(0x1028, 0x0629, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4256 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS), | ||
4257 | SND_PCI_QUIRK(0x1028, 0x063e, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4179 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4258 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4259 | SND_PCI_QUIRK(0x1028, 0x0640, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | ||
4180 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4260 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4181 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4261 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
4182 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 4262 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
@@ -4184,13 +4264,12 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4184 | SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4264 | SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4185 | SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4265 | SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
4186 | SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), | 4266 | SND_PCI_QUIRK(0x103c, 0x218b, "HP", ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED), |
4187 | SND_PCI_QUIRK(0x103c, 0x21ed, "HP Falco Chromebook", ALC283_FIXUP_CHROME_BOOK), | ||
4188 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), | 4267 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), |
4189 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), | 4268 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
4190 | SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4269 | SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4191 | SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), | 4270 | SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
4192 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), | 4271 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4193 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), | 4272 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4194 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | 4273 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
4195 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 4274 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
4196 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), | 4275 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
@@ -4292,6 +4371,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
4292 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 4371 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
4293 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 4372 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
4294 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, | 4373 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, |
4374 | {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-chrome"}, | ||
4375 | {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, | ||
4295 | {} | 4376 | {} |
4296 | }; | 4377 | }; |
4297 | 4378 | ||
@@ -4467,6 +4548,7 @@ enum { | |||
4467 | ALC861_FIXUP_AMP_VREF_0F, | 4548 | ALC861_FIXUP_AMP_VREF_0F, |
4468 | ALC861_FIXUP_NO_JACK_DETECT, | 4549 | ALC861_FIXUP_NO_JACK_DETECT, |
4469 | ALC861_FIXUP_ASUS_A6RP, | 4550 | ALC861_FIXUP_ASUS_A6RP, |
4551 | ALC660_FIXUP_ASUS_W7J, | ||
4470 | }; | 4552 | }; |
4471 | 4553 | ||
4472 | /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ | 4554 | /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ |
@@ -4516,10 +4598,22 @@ static const struct hda_fixup alc861_fixups[] = { | |||
4516 | .v.func = alc861_fixup_asus_amp_vref_0f, | 4598 | .v.func = alc861_fixup_asus_amp_vref_0f, |
4517 | .chained = true, | 4599 | .chained = true, |
4518 | .chain_id = ALC861_FIXUP_NO_JACK_DETECT, | 4600 | .chain_id = ALC861_FIXUP_NO_JACK_DETECT, |
4601 | }, | ||
4602 | [ALC660_FIXUP_ASUS_W7J] = { | ||
4603 | .type = HDA_FIXUP_VERBS, | ||
4604 | .v.verbs = (const struct hda_verb[]) { | ||
4605 | /* ASUS W7J needs a magic pin setup on unused NID 0x10 | ||
4606 | * for enabling outputs | ||
4607 | */ | ||
4608 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, | ||
4609 | { } | ||
4610 | }, | ||
4519 | } | 4611 | } |
4520 | }; | 4612 | }; |
4521 | 4613 | ||
4522 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { | 4614 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { |
4615 | SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J), | ||
4616 | SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J), | ||
4523 | SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), | 4617 | SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), |
4524 | SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), | 4618 | SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), |
4525 | SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), | 4619 | SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), |
@@ -4715,7 +4809,7 @@ static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { | |||
4715 | }; | 4809 | }; |
4716 | 4810 | ||
4717 | /* override the 2.1 chmap */ | 4811 | /* override the 2.1 chmap */ |
4718 | static void alc662_fixup_bass_chmap(struct hda_codec *codec, | 4812 | static void alc_fixup_bass_chmap(struct hda_codec *codec, |
4719 | const struct hda_fixup *fix, int action) | 4813 | const struct hda_fixup *fix, int action) |
4720 | { | 4814 | { |
4721 | if (action == HDA_FIXUP_ACT_BUILD) { | 4815 | if (action == HDA_FIXUP_ACT_BUILD) { |
@@ -4923,7 +5017,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4923 | }, | 5017 | }, |
4924 | [ALC662_FIXUP_BASS_CHMAP] = { | 5018 | [ALC662_FIXUP_BASS_CHMAP] = { |
4925 | .type = HDA_FIXUP_FUNC, | 5019 | .type = HDA_FIXUP_FUNC, |
4926 | .v.func = alc662_fixup_bass_chmap, | 5020 | .v.func = alc_fixup_bass_chmap, |
4927 | .chained = true, | 5021 | .chained = true, |
4928 | .chain_id = ALC662_FIXUP_ASUS_MODE4 | 5022 | .chain_id = ALC662_FIXUP_ASUS_MODE4 |
4929 | }, | 5023 | }, |
@@ -4936,7 +5030,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4936 | }, | 5030 | }, |
4937 | [ALC662_FIXUP_BASS_1A_CHMAP] = { | 5031 | [ALC662_FIXUP_BASS_1A_CHMAP] = { |
4938 | .type = HDA_FIXUP_FUNC, | 5032 | .type = HDA_FIXUP_FUNC, |
4939 | .v.func = alc662_fixup_bass_chmap, | 5033 | .v.func = alc_fixup_bass_chmap, |
4940 | .chained = true, | 5034 | .chained = true, |
4941 | .chain_id = ALC662_FIXUP_BASS_1A, | 5035 | .chain_id = ALC662_FIXUP_BASS_1A, |
4942 | }, | 5036 | }, |
@@ -4952,8 +5046,11 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
4952 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), | 5046 | SND_PCI_QUIRK(0x1025, 0x038b, "Acer Aspire 8943G", ALC662_FIXUP_ASPIRE), |
4953 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5047 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
4954 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5048 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5049 | SND_PCI_QUIRK(0x1028, 0x0623, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
5050 | SND_PCI_QUIRK(0x1028, 0x0624, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
4955 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5051 | SND_PCI_QUIRK(0x1028, 0x0625, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
4956 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 5052 | SND_PCI_QUIRK(0x1028, 0x0626, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
5053 | SND_PCI_QUIRK(0x1028, 0x0628, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | ||
4957 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), | 5054 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
4958 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), | 5055 | SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_BASS_1A_CHMAP), |
4959 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), | 5056 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_BASS_CHMAP), |
@@ -5118,6 +5215,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
5118 | case 0x10ec0272: | 5215 | case 0x10ec0272: |
5119 | case 0x10ec0663: | 5216 | case 0x10ec0663: |
5120 | case 0x10ec0665: | 5217 | case 0x10ec0665: |
5218 | case 0x10ec0668: | ||
5121 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); | 5219 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); |
5122 | break; | 5220 | break; |
5123 | case 0x10ec0273: | 5221 | case 0x10ec0273: |
@@ -5175,6 +5273,7 @@ static int patch_alc680(struct hda_codec *codec) | |||
5175 | */ | 5273 | */ |
5176 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { | 5274 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { |
5177 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, | 5275 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, |
5276 | { .id = 0x10ec0231, .name = "ALC231", .patch = patch_alc269 }, | ||
5178 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, | 5277 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, |
5179 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, | 5278 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, |
5180 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, | 5279 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index d2cc0041d9d3..088a5afbd1b9 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -2094,7 +2094,8 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec, | |||
2094 | 2094 | ||
2095 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | 2095 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { |
2096 | spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ | 2096 | spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ |
2097 | codec->bus->avoid_link_reset = 1; | 2097 | /* resetting controller clears GPIO, so we need to keep on */ |
2098 | codec->bus->power_keep_link_on = 1; | ||
2098 | } | 2099 | } |
2099 | } | 2100 | } |
2100 | 2101 | ||