diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-29 12:36:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-29 12:36:42 -0500 |
commit | b8495995dd8ad425ec1b78f7182586d5a004d8ec (patch) | |
tree | 251e5032e6c1b8bbb24af2a8b6a4dd0eabad8eb2 | |
parent | b01537bfbc832a09162e7189f63251a8785e2112 (diff) | |
parent | eb9ca3ab2194ad9a6c52da0e8bf1b3f1ff9cd6f4 (diff) |
Merge tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Quite a few HD-Audio fixes, a WUSB audio fix and a fix for FireWire
audio. The HD-audio part contains a couple of fixes for the generic
parser, and these are the only intrusive fixes. The rest are mostly
device-specific fixes"
* tag 'sound-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Add LFE chmap to ASUS ET2700
ALSA: hda - Initialize missing bass speaker pin for ASUS AIO ET2700
ALSA: hda - limit mic boost on Asus UX31[A,E]
ALSA: hda - Check leaf nodes to find aamix amps
ALSA: hda - Fix hp-mic mode without VREF bits
ALSA: hda - Create Headhpone Mic Jack Mode when really needed
ALSA: usb: use multiple packets per urb for Wireless USB inbound audio
ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Conexant codec
ALSA: hda - Drop bus->avoid_link_reset flag
ALSA: hda/realtek - Set pcbeep amp for ALC668
ALSA: hda/realtek - Add support of ALC231 codec
ALSA: firewire-lib: fix wrong value for FDF field as an empty packet
-rw-r--r-- | sound/firewire/amdtp.c | 15 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.c | 79 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 23 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 38 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 16 |
8 files changed, 138 insertions, 40 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index d3226892ad6b..9048777228e2 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c | |||
@@ -434,17 +434,14 @@ static void queue_out_packet(struct amdtp_out_stream *s, unsigned int cycle) | |||
434 | return; | 434 | return; |
435 | index = s->packet_index; | 435 | index = s->packet_index; |
436 | 436 | ||
437 | /* this module generate empty packet for 'no data' */ | ||
437 | syt = calculate_syt(s, cycle); | 438 | syt = calculate_syt(s, cycle); |
438 | if (!(s->flags & CIP_BLOCKING)) { | 439 | if (!(s->flags & CIP_BLOCKING)) |
439 | data_blocks = calculate_data_blocks(s); | 440 | data_blocks = calculate_data_blocks(s); |
440 | } else { | 441 | else if (syt != 0xffff) |
441 | if (syt != 0xffff) { | 442 | data_blocks = s->syt_interval; |
442 | data_blocks = s->syt_interval; | 443 | else |
443 | } else { | 444 | data_blocks = 0; |
444 | data_blocks = 0; | ||
445 | syt = 0xffffff; | ||
446 | } | ||
447 | } | ||
448 | 445 | ||
449 | buffer = s->buffer.packets[index].buffer; | 446 | buffer = s->buffer.packets[index].buffer; |
450 | buffer[0] = cpu_to_be32(ACCESS_ONCE(s->source_node_id_field) | | 447 | buffer[0] = cpu_to_be32(ACCESS_ONCE(s->source_node_id_field) | |
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..c4671d00babd 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c | |||
@@ -2506,12 +2506,8 @@ static int create_out_jack_modes(struct hda_codec *codec, int num_pins, | |||
2506 | 2506 | ||
2507 | for (i = 0; i < num_pins; i++) { | 2507 | for (i = 0; i < num_pins; i++) { |
2508 | hda_nid_t pin = pins[i]; | 2508 | hda_nid_t pin = pins[i]; |
2509 | if (pin == spec->hp_mic_pin) { | 2509 | 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; | 2510 | continue; |
2514 | } | ||
2515 | if (get_out_jack_num_items(codec, pin) > 1) { | 2511 | if (get_out_jack_num_items(codec, pin) > 1) { |
2516 | struct snd_kcontrol_new *knew; | 2512 | struct snd_kcontrol_new *knew; |
2517 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; | 2513 | char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; |
@@ -2764,7 +2760,7 @@ static int hp_mic_jack_mode_put(struct snd_kcontrol *kcontrol, | |||
2764 | val &= ~(AC_PINCTL_VREFEN | PIN_HP); | 2760 | val &= ~(AC_PINCTL_VREFEN | PIN_HP); |
2765 | val |= get_vref_idx(vref_caps, idx) | PIN_IN; | 2761 | val |= get_vref_idx(vref_caps, idx) | PIN_IN; |
2766 | } else | 2762 | } else |
2767 | val = snd_hda_get_default_vref(codec, nid); | 2763 | val = snd_hda_get_default_vref(codec, nid) | PIN_IN; |
2768 | } | 2764 | } |
2769 | snd_hda_set_pin_ctl_cache(codec, nid, val); | 2765 | snd_hda_set_pin_ctl_cache(codec, nid, val); |
2770 | call_hp_automute(codec, NULL); | 2766 | call_hp_automute(codec, NULL); |
@@ -2784,9 +2780,6 @@ static int create_hp_mic_jack_mode(struct hda_codec *codec, hda_nid_t pin) | |||
2784 | struct hda_gen_spec *spec = codec->spec; | 2780 | struct hda_gen_spec *spec = codec->spec; |
2785 | struct snd_kcontrol_new *knew; | 2781 | struct snd_kcontrol_new *knew; |
2786 | 2782 | ||
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", | 2783 | knew = snd_hda_gen_add_kctl(spec, "Headphone Mic Jack Mode", |
2791 | &hp_mic_jack_mode_enum); | 2784 | &hp_mic_jack_mode_enum); |
2792 | if (!knew) | 2785 | if (!knew) |
@@ -2815,6 +2808,42 @@ static int add_loopback_list(struct hda_gen_spec *spec, hda_nid_t mix, int idx) | |||
2815 | return 0; | 2808 | return 0; |
2816 | } | 2809 | } |
2817 | 2810 | ||
2811 | /* return true if either a volume or a mute amp is found for the given | ||
2812 | * aamix path; the amp has to be either in the mixer node or its direct leaf | ||
2813 | */ | ||
2814 | static bool look_for_mix_leaf_ctls(struct hda_codec *codec, hda_nid_t mix_nid, | ||
2815 | hda_nid_t pin, unsigned int *mix_val, | ||
2816 | unsigned int *mute_val) | ||
2817 | { | ||
2818 | int idx, num_conns; | ||
2819 | const hda_nid_t *list; | ||
2820 | hda_nid_t nid; | ||
2821 | |||
2822 | idx = snd_hda_get_conn_index(codec, mix_nid, pin, true); | ||
2823 | if (idx < 0) | ||
2824 | return false; | ||
2825 | |||
2826 | *mix_val = *mute_val = 0; | ||
2827 | if (nid_has_volume(codec, mix_nid, HDA_INPUT)) | ||
2828 | *mix_val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | ||
2829 | if (nid_has_mute(codec, mix_nid, HDA_INPUT)) | ||
2830 | *mute_val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | ||
2831 | if (*mix_val && *mute_val) | ||
2832 | return true; | ||
2833 | |||
2834 | /* check leaf node */ | ||
2835 | num_conns = snd_hda_get_conn_list(codec, mix_nid, &list); | ||
2836 | if (num_conns < idx) | ||
2837 | return false; | ||
2838 | nid = list[idx]; | ||
2839 | if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT)) | ||
2840 | *mix_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT); | ||
2841 | if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT)) | ||
2842 | *mute_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT); | ||
2843 | |||
2844 | return *mix_val || *mute_val; | ||
2845 | } | ||
2846 | |||
2818 | /* create input playback/capture controls for the given pin */ | 2847 | /* create input playback/capture controls for the given pin */ |
2819 | static int new_analog_input(struct hda_codec *codec, int input_idx, | 2848 | static int new_analog_input(struct hda_codec *codec, int input_idx, |
2820 | hda_nid_t pin, const char *ctlname, int ctlidx, | 2849 | hda_nid_t pin, const char *ctlname, int ctlidx, |
@@ -2822,12 +2851,11 @@ static int new_analog_input(struct hda_codec *codec, int input_idx, | |||
2822 | { | 2851 | { |
2823 | struct hda_gen_spec *spec = codec->spec; | 2852 | struct hda_gen_spec *spec = codec->spec; |
2824 | struct nid_path *path; | 2853 | struct nid_path *path; |
2825 | unsigned int val; | 2854 | unsigned int mix_val, mute_val; |
2826 | int err, idx; | 2855 | int err, idx; |
2827 | 2856 | ||
2828 | if (!nid_has_volume(codec, mix_nid, HDA_INPUT) && | 2857 | if (!look_for_mix_leaf_ctls(codec, mix_nid, pin, &mix_val, &mute_val)) |
2829 | !nid_has_mute(codec, mix_nid, HDA_INPUT)) | 2858 | return 0; |
2830 | return 0; /* no need for analog loopback */ | ||
2831 | 2859 | ||
2832 | path = snd_hda_add_new_path(codec, pin, mix_nid, 0); | 2860 | path = snd_hda_add_new_path(codec, pin, mix_nid, 0); |
2833 | if (!path) | 2861 | if (!path) |
@@ -2836,20 +2864,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); | 2864 | spec->loopback_paths[input_idx] = snd_hda_get_path_idx(codec, path); |
2837 | 2865 | ||
2838 | idx = path->idx[path->depth - 1]; | 2866 | idx = path->idx[path->depth - 1]; |
2839 | if (nid_has_volume(codec, mix_nid, HDA_INPUT)) { | 2867 | if (mix_val) { |
2840 | val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | 2868 | 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) | 2869 | if (err < 0) |
2843 | return err; | 2870 | return err; |
2844 | path->ctls[NID_PATH_VOL_CTL] = val; | 2871 | path->ctls[NID_PATH_VOL_CTL] = mix_val; |
2845 | } | 2872 | } |
2846 | 2873 | ||
2847 | if (nid_has_mute(codec, mix_nid, HDA_INPUT)) { | 2874 | if (mute_val) { |
2848 | val = HDA_COMPOSE_AMP_VAL(mix_nid, 3, idx, HDA_INPUT); | 2875 | 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) | 2876 | if (err < 0) |
2851 | return err; | 2877 | return err; |
2852 | path->ctls[NID_PATH_MUTE_CTL] = val; | 2878 | path->ctls[NID_PATH_MUTE_CTL] = mute_val; |
2853 | } | 2879 | } |
2854 | 2880 | ||
2855 | path->active = true; | 2881 | path->active = true; |
@@ -4383,6 +4409,17 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, | |||
4383 | if (err < 0) | 4409 | if (err < 0) |
4384 | return err; | 4410 | return err; |
4385 | 4411 | ||
4412 | /* create "Headphone Mic Jack Mode" if no input selection is | ||
4413 | * available (or user specifies add_jack_modes hint) | ||
4414 | */ | ||
4415 | if (spec->hp_mic_pin && | ||
4416 | (spec->auto_mic || spec->input_mux.num_items == 1 || | ||
4417 | spec->add_jack_modes)) { | ||
4418 | err = create_hp_mic_jack_mode(codec, spec->hp_mic_pin); | ||
4419 | if (err < 0) | ||
4420 | return err; | ||
4421 | } | ||
4422 | |||
4386 | if (spec->add_jack_modes) { | 4423 | if (spec->add_jack_modes) { |
4387 | if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { | 4424 | if (cfg->line_out_type != AUTO_PIN_SPEAKER_OUT) { |
4388 | err = create_out_jack_modes(codec, cfg->line_outs, | 4425 | err = create_out_jack_modes(codec, cfg->line_outs, |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 7a09404579a7..c6d230193da6 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); |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index c205bb1747fd..1f2717f817a0 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3244,9 +3244,29 @@ enum { | |||
3244 | #if IS_ENABLED(CONFIG_THINKPAD_ACPI) | 3244 | #if IS_ENABLED(CONFIG_THINKPAD_ACPI) |
3245 | 3245 | ||
3246 | #include <linux/thinkpad_acpi.h> | 3246 | #include <linux/thinkpad_acpi.h> |
3247 | #include <acpi/acpi.h> | ||
3247 | 3248 | ||
3248 | static int (*led_set_func)(int, bool); | 3249 | static int (*led_set_func)(int, bool); |
3249 | 3250 | ||
3251 | static acpi_status acpi_check_cb(acpi_handle handle, u32 lvl, void *context, | ||
3252 | void **rv) | ||
3253 | { | ||
3254 | bool *found = context; | ||
3255 | *found = true; | ||
3256 | return AE_OK; | ||
3257 | } | ||
3258 | |||
3259 | static bool is_thinkpad(struct hda_codec *codec) | ||
3260 | { | ||
3261 | bool found = false; | ||
3262 | if (codec->subsystem_id >> 16 != 0x17aa) | ||
3263 | return false; | ||
3264 | if (ACPI_SUCCESS(acpi_get_devices("LEN0068", acpi_check_cb, &found, NULL)) && found) | ||
3265 | return true; | ||
3266 | found = false; | ||
3267 | return ACPI_SUCCESS(acpi_get_devices("IBM0068", acpi_check_cb, &found, NULL)) && found; | ||
3268 | } | ||
3269 | |||
3250 | static void update_tpacpi_mute_led(void *private_data, int enabled) | 3270 | static void update_tpacpi_mute_led(void *private_data, int enabled) |
3251 | { | 3271 | { |
3252 | struct hda_codec *codec = private_data; | 3272 | struct hda_codec *codec = private_data; |
@@ -3279,6 +3299,8 @@ static void cxt_fixup_thinkpad_acpi(struct hda_codec *codec, | |||
3279 | bool removefunc = false; | 3299 | bool removefunc = false; |
3280 | 3300 | ||
3281 | if (action == HDA_FIXUP_ACT_PROBE) { | 3301 | if (action == HDA_FIXUP_ACT_PROBE) { |
3302 | if (!is_thinkpad(codec)) | ||
3303 | return; | ||
3282 | if (!led_set_func) | 3304 | if (!led_set_func) |
3283 | led_set_func = symbol_request(tpacpi_led_set); | 3305 | led_set_func = symbol_request(tpacpi_led_set); |
3284 | if (!led_set_func) { | 3306 | if (!led_set_func) { |
@@ -3494,6 +3516,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = { | |||
3494 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), | 3516 | SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC), |
3495 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), | 3517 | SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC), |
3496 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), | 3518 | SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC), |
3519 | SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI), | ||
3497 | SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), | 3520 | SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004), |
3498 | SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), | 3521 | SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205), |
3499 | {} | 3522 | {} |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5e42059f10a1..c770bdba6531 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1782,6 +1782,8 @@ enum { | |||
1782 | ALC889_FIXUP_IMAC91_VREF, | 1782 | ALC889_FIXUP_IMAC91_VREF, |
1783 | ALC882_FIXUP_INV_DMIC, | 1783 | ALC882_FIXUP_INV_DMIC, |
1784 | ALC882_FIXUP_NO_PRIMARY_HP, | 1784 | ALC882_FIXUP_NO_PRIMARY_HP, |
1785 | ALC887_FIXUP_ASUS_BASS, | ||
1786 | ALC887_FIXUP_BASS_CHMAP, | ||
1785 | }; | 1787 | }; |
1786 | 1788 | ||
1787 | static void alc889_fixup_coef(struct hda_codec *codec, | 1789 | static void alc889_fixup_coef(struct hda_codec *codec, |
@@ -1915,6 +1917,9 @@ static void alc882_fixup_no_primary_hp(struct hda_codec *codec, | |||
1915 | } | 1917 | } |
1916 | } | 1918 | } |
1917 | 1919 | ||
1920 | static void alc_fixup_bass_chmap(struct hda_codec *codec, | ||
1921 | const struct hda_fixup *fix, int action); | ||
1922 | |||
1918 | static const struct hda_fixup alc882_fixups[] = { | 1923 | static const struct hda_fixup alc882_fixups[] = { |
1919 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { | 1924 | [ALC882_FIXUP_ABIT_AW9D_MAX] = { |
1920 | .type = HDA_FIXUP_PINS, | 1925 | .type = HDA_FIXUP_PINS, |
@@ -2105,6 +2110,19 @@ static const struct hda_fixup alc882_fixups[] = { | |||
2105 | .type = HDA_FIXUP_FUNC, | 2110 | .type = HDA_FIXUP_FUNC, |
2106 | .v.func = alc882_fixup_no_primary_hp, | 2111 | .v.func = alc882_fixup_no_primary_hp, |
2107 | }, | 2112 | }, |
2113 | [ALC887_FIXUP_ASUS_BASS] = { | ||
2114 | .type = HDA_FIXUP_PINS, | ||
2115 | .v.pins = (const struct hda_pintbl[]) { | ||
2116 | {0x16, 0x99130130}, /* bass speaker */ | ||
2117 | {} | ||
2118 | }, | ||
2119 | .chained = true, | ||
2120 | .chain_id = ALC887_FIXUP_BASS_CHMAP, | ||
2121 | }, | ||
2122 | [ALC887_FIXUP_BASS_CHMAP] = { | ||
2123 | .type = HDA_FIXUP_FUNC, | ||
2124 | .v.func = alc_fixup_bass_chmap, | ||
2125 | }, | ||
2108 | }; | 2126 | }; |
2109 | 2127 | ||
2110 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { | 2128 | static const struct snd_pci_quirk alc882_fixup_tbl[] = { |
@@ -2138,6 +2156,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = { | |||
2138 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), | 2156 | SND_PCI_QUIRK(0x1043, 0x1873, "ASUS W90V", ALC882_FIXUP_ASUS_W90V), |
2139 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), | 2157 | SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_FIXUP_ASUS_W2JC), |
2140 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), | 2158 | SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_FIXUP_EEE1601), |
2159 | SND_PCI_QUIRK(0x1043, 0x84bc, "ASUS ET2700", ALC887_FIXUP_ASUS_BASS), | ||
2141 | SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), | 2160 | 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), | 2161 | 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), | 2162 | SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), |
@@ -3798,6 +3817,7 @@ enum { | |||
3798 | ALC271_FIXUP_HP_GATE_MIC_JACK, | 3817 | ALC271_FIXUP_HP_GATE_MIC_JACK, |
3799 | ALC269_FIXUP_ACER_AC700, | 3818 | ALC269_FIXUP_ACER_AC700, |
3800 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, | 3819 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
3820 | ALC269VB_FIXUP_ASUS_ZENBOOK, | ||
3801 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, | 3821 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, |
3802 | ALC269VB_FIXUP_ORDISSIMO_EVE2, | 3822 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
3803 | ALC283_FIXUP_CHROME_BOOK, | 3823 | ALC283_FIXUP_CHROME_BOOK, |
@@ -4075,6 +4095,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4075 | .chained = true, | 4095 | .chained = true, |
4076 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, | 4096 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
4077 | }, | 4097 | }, |
4098 | [ALC269VB_FIXUP_ASUS_ZENBOOK] = { | ||
4099 | .type = HDA_FIXUP_FUNC, | ||
4100 | .v.func = alc269_fixup_limit_int_mic_boost, | ||
4101 | .chained = true, | ||
4102 | .chain_id = ALC269VB_FIXUP_DMIC, | ||
4103 | }, | ||
4078 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { | 4104 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { |
4079 | .type = HDA_FIXUP_FUNC, | 4105 | .type = HDA_FIXUP_FUNC, |
4080 | .v.func = alc269_fixup_limit_int_mic_boost, | 4106 | .v.func = alc269_fixup_limit_int_mic_boost, |
@@ -4189,8 +4215,8 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4189 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), | 4215 | 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), | 4216 | 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), | 4217 | 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), | 4218 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4193 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), | 4219 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4194 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | 4220 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
4195 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 4221 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
4196 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), | 4222 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
@@ -4715,7 +4741,7 @@ static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { | |||
4715 | }; | 4741 | }; |
4716 | 4742 | ||
4717 | /* override the 2.1 chmap */ | 4743 | /* override the 2.1 chmap */ |
4718 | static void alc662_fixup_bass_chmap(struct hda_codec *codec, | 4744 | static void alc_fixup_bass_chmap(struct hda_codec *codec, |
4719 | const struct hda_fixup *fix, int action) | 4745 | const struct hda_fixup *fix, int action) |
4720 | { | 4746 | { |
4721 | if (action == HDA_FIXUP_ACT_BUILD) { | 4747 | if (action == HDA_FIXUP_ACT_BUILD) { |
@@ -4923,7 +4949,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4923 | }, | 4949 | }, |
4924 | [ALC662_FIXUP_BASS_CHMAP] = { | 4950 | [ALC662_FIXUP_BASS_CHMAP] = { |
4925 | .type = HDA_FIXUP_FUNC, | 4951 | .type = HDA_FIXUP_FUNC, |
4926 | .v.func = alc662_fixup_bass_chmap, | 4952 | .v.func = alc_fixup_bass_chmap, |
4927 | .chained = true, | 4953 | .chained = true, |
4928 | .chain_id = ALC662_FIXUP_ASUS_MODE4 | 4954 | .chain_id = ALC662_FIXUP_ASUS_MODE4 |
4929 | }, | 4955 | }, |
@@ -4936,7 +4962,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4936 | }, | 4962 | }, |
4937 | [ALC662_FIXUP_BASS_1A_CHMAP] = { | 4963 | [ALC662_FIXUP_BASS_1A_CHMAP] = { |
4938 | .type = HDA_FIXUP_FUNC, | 4964 | .type = HDA_FIXUP_FUNC, |
4939 | .v.func = alc662_fixup_bass_chmap, | 4965 | .v.func = alc_fixup_bass_chmap, |
4940 | .chained = true, | 4966 | .chained = true, |
4941 | .chain_id = ALC662_FIXUP_BASS_1A, | 4967 | .chain_id = ALC662_FIXUP_BASS_1A, |
4942 | }, | 4968 | }, |
@@ -5118,6 +5144,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
5118 | case 0x10ec0272: | 5144 | case 0x10ec0272: |
5119 | case 0x10ec0663: | 5145 | case 0x10ec0663: |
5120 | case 0x10ec0665: | 5146 | case 0x10ec0665: |
5147 | case 0x10ec0668: | ||
5121 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); | 5148 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); |
5122 | break; | 5149 | break; |
5123 | case 0x10ec0273: | 5150 | case 0x10ec0273: |
@@ -5175,6 +5202,7 @@ static int patch_alc680(struct hda_codec *codec) | |||
5175 | */ | 5202 | */ |
5176 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { | 5203 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { |
5177 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, | 5204 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, |
5205 | { .id = 0x10ec0231, .name = "ALC231", .patch = patch_alc269 }, | ||
5178 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, | 5206 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, |
5179 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, | 5207 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, |
5180 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, | 5208 | { .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 | ||
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index b9ba0fcc45df..83aabea259d7 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -636,8 +636,22 @@ static int data_ep_set_params(struct snd_usb_endpoint *ep, | |||
636 | if (usb_pipein(ep->pipe) || | 636 | if (usb_pipein(ep->pipe) || |
637 | snd_usb_endpoint_implicit_feedback_sink(ep)) { | 637 | snd_usb_endpoint_implicit_feedback_sink(ep)) { |
638 | 638 | ||
639 | urb_packs = packs_per_ms; | ||
640 | /* | ||
641 | * Wireless devices can poll at a max rate of once per 4ms. | ||
642 | * For dataintervals less than 5, increase the packet count to | ||
643 | * allow the host controller to use bursting to fill in the | ||
644 | * gaps. | ||
645 | */ | ||
646 | if (snd_usb_get_speed(ep->chip->dev) == USB_SPEED_WIRELESS) { | ||
647 | int interval = ep->datainterval; | ||
648 | while (interval < 5) { | ||
649 | urb_packs <<= 1; | ||
650 | ++interval; | ||
651 | } | ||
652 | } | ||
639 | /* make capture URBs <= 1 ms and smaller than a period */ | 653 | /* make capture URBs <= 1 ms and smaller than a period */ |
640 | urb_packs = min(max_packs_per_urb, packs_per_ms); | 654 | urb_packs = min(max_packs_per_urb, urb_packs); |
641 | while (urb_packs > 1 && urb_packs * maxsize >= period_bytes) | 655 | while (urb_packs > 1 && urb_packs * maxsize >= period_bytes) |
642 | urb_packs >>= 1; | 656 | urb_packs >>= 1; |
643 | ep->nurbs = MAX_URBS; | 657 | ep->nurbs = MAX_URBS; |