diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/atmel/abdac.c | 3 | ||||
-rw-r--r-- | sound/firewire/amdtp.c | 15 | ||||
-rw-r--r-- | sound/firewire/dice.c | 4 | ||||
-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 | 12 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 6 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 23 | ||||
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 27 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 130 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 | ||||
-rw-r--r-- | sound/soc/atmel/sam9x5_wm8731.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 25 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 2 | ||||
-rw-r--r-- | sound/soc/fsl/pcm030-audio-fabric.c | 3 | ||||
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 22 | ||||
-rw-r--r-- | sound/soc/omap/n810.c | 4 | ||||
-rw-r--r-- | sound/soc/sh/Kconfig | 1 | ||||
-rw-r--r-- | sound/usb/endpoint.c | 16 |
20 files changed, 266 insertions, 116 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 872d59e35ee2..721d8fd45685 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -357,7 +357,8 @@ static int set_sample_rates(struct atmel_abdac *dac) | |||
357 | if (new_rate < 0) | 357 | if (new_rate < 0) |
358 | break; | 358 | break; |
359 | /* make sure we are below the ABDAC clock */ | 359 | /* make sure we are below the ABDAC clock */ |
360 | if (new_rate <= clk_get_rate(dac->pclk)) { | 360 | if (index < MAX_NUM_RATES && |
361 | new_rate <= clk_get_rate(dac->pclk)) { | ||
361 | dac->rates[index] = new_rate / 256; | 362 | dac->rates[index] = new_rate / 256; |
362 | index++; | 363 | index++; |
363 | } | 364 | } |
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/firewire/dice.c b/sound/firewire/dice.c index 57bcd31fcc12..c0aa64941cee 100644 --- a/sound/firewire/dice.c +++ b/sound/firewire/dice.c | |||
@@ -1019,7 +1019,7 @@ static void dice_proc_read(struct snd_info_entry *entry, | |||
1019 | 1019 | ||
1020 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[2], 2) < 0) | 1020 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[2], 2) < 0) |
1021 | return; | 1021 | return; |
1022 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.tx)); | 1022 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.tx) / 4); |
1023 | for (stream = 0; stream < tx_rx_header.number; ++stream) { | 1023 | for (stream = 0; stream < tx_rx_header.number; ++stream) { |
1024 | if (dice_proc_read_mem(dice, &buf.tx, sections[2] + 2 + | 1024 | if (dice_proc_read_mem(dice, &buf.tx, sections[2] + 2 + |
1025 | stream * tx_rx_header.size, | 1025 | stream * tx_rx_header.size, |
@@ -1045,7 +1045,7 @@ static void dice_proc_read(struct snd_info_entry *entry, | |||
1045 | 1045 | ||
1046 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[4], 2) < 0) | 1046 | if (dice_proc_read_mem(dice, &tx_rx_header, sections[4], 2) < 0) |
1047 | return; | 1047 | return; |
1048 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.rx)); | 1048 | quadlets = min_t(u32, tx_rx_header.size, sizeof(buf.rx) / 4); |
1049 | for (stream = 0; stream < tx_rx_header.number; ++stream) { | 1049 | for (stream = 0; stream < tx_rx_header.number; ++stream) { |
1050 | if (dice_proc_read_mem(dice, &buf.rx, sections[4] + 2 + | 1050 | if (dice_proc_read_mem(dice, &buf.rx, sections[4] + 2 + |
1051 | stream * tx_rx_header.size, | 1051 | stream * tx_rx_header.size, |
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..27aa14007cbd 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); |
@@ -3877,7 +3876,8 @@ static int azx_probe(struct pci_dev *pci, | |||
3877 | } | 3876 | } |
3878 | 3877 | ||
3879 | dev++; | 3878 | dev++; |
3880 | complete_all(&chip->probe_wait); | 3879 | if (chip->disabled) |
3880 | complete_all(&chip->probe_wait); | ||
3881 | return 0; | 3881 | return 0; |
3882 | 3882 | ||
3883 | out_free: | 3883 | out_free: |
@@ -3954,10 +3954,10 @@ static int azx_probe_continue(struct azx *chip) | |||
3954 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) | 3954 | if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || chip->use_vga_switcheroo) |
3955 | pm_runtime_put_noidle(&pci->dev); | 3955 | pm_runtime_put_noidle(&pci->dev); |
3956 | 3956 | ||
3957 | return 0; | ||
3958 | |||
3959 | out_free: | 3957 | out_free: |
3960 | chip->init_failed = 1; | 3958 | if (err < 0) |
3959 | chip->init_failed = 1; | ||
3960 | complete_all(&chip->probe_wait); | ||
3961 | return err; | 3961 | return err; |
3962 | } | 3962 | } |
3963 | 3963 | ||
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 1a83559f4cbd..cac015be3325 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); |
@@ -359,6 +361,9 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
359 | */ | 361 | */ |
360 | spec->gen.multiout.no_share_stream = 1; | 362 | spec->gen.multiout.no_share_stream = 1; |
361 | 363 | ||
364 | /* AD1986A can't manage the dynamic pin on/off smoothly */ | ||
365 | spec->gen.auto_mute_via_amp = 1; | ||
366 | |||
362 | snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl, | 367 | snd_hda_pick_fixup(codec, ad1986a_fixup_models, ad1986a_fixup_tbl, |
363 | ad1986a_fixups); | 368 | ad1986a_fixups); |
364 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); | 369 | snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); |
@@ -962,6 +967,7 @@ static void ad1884_fixup_hp_eapd(struct hda_codec *codec, | |||
962 | switch (action) { | 967 | switch (action) { |
963 | case HDA_FIXUP_ACT_PRE_PROBE: | 968 | case HDA_FIXUP_ACT_PRE_PROBE: |
964 | spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; | 969 | spec->gen.vmaster_mute.hook = ad1884_vmaster_hp_gpio_hook; |
970 | spec->gen.own_eapd_ctl = 1; | ||
965 | snd_hda_sequence_write_cache(codec, gpio_init_verbs); | 971 | snd_hda_sequence_write_cache(codec, gpio_init_verbs); |
966 | break; | 972 | break; |
967 | case HDA_FIXUP_ACT_PROBE: | 973 | case HDA_FIXUP_ACT_PROBE: |
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_hdmi.c b/sound/pci/hda/patch_hdmi.c index 08407bed093e..c4a66ef6cf6f 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 | } |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5e42059f10a1..c5ea483d7559 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 | } |
@@ -3798,9 +3851,11 @@ enum { | |||
3798 | ALC271_FIXUP_HP_GATE_MIC_JACK, | 3851 | ALC271_FIXUP_HP_GATE_MIC_JACK, |
3799 | ALC269_FIXUP_ACER_AC700, | 3852 | ALC269_FIXUP_ACER_AC700, |
3800 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, | 3853 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST, |
3854 | ALC269VB_FIXUP_ASUS_ZENBOOK, | ||
3801 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, | 3855 | ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED, |
3802 | ALC269VB_FIXUP_ORDISSIMO_EVE2, | 3856 | ALC269VB_FIXUP_ORDISSIMO_EVE2, |
3803 | ALC283_FIXUP_CHROME_BOOK, | 3857 | ALC283_FIXUP_CHROME_BOOK, |
3858 | ALC283_FIXUP_SENSE_COMBO_JACK, | ||
3804 | ALC282_FIXUP_ASUS_TX300, | 3859 | ALC282_FIXUP_ASUS_TX300, |
3805 | ALC283_FIXUP_INT_MIC, | 3860 | ALC283_FIXUP_INT_MIC, |
3806 | ALC290_FIXUP_MONO_SPEAKERS, | 3861 | ALC290_FIXUP_MONO_SPEAKERS, |
@@ -4075,6 +4130,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4075 | .chained = true, | 4130 | .chained = true, |
4076 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, | 4131 | .chain_id = ALC269_FIXUP_THINKPAD_ACPI, |
4077 | }, | 4132 | }, |
4133 | [ALC269VB_FIXUP_ASUS_ZENBOOK] = { | ||
4134 | .type = HDA_FIXUP_FUNC, | ||
4135 | .v.func = alc269_fixup_limit_int_mic_boost, | ||
4136 | .chained = true, | ||
4137 | .chain_id = ALC269VB_FIXUP_DMIC, | ||
4138 | }, | ||
4078 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { | 4139 | [ALC269_FIXUP_LIMIT_INT_MIC_BOOST_MUTE_LED] = { |
4079 | .type = HDA_FIXUP_FUNC, | 4140 | .type = HDA_FIXUP_FUNC, |
4080 | .v.func = alc269_fixup_limit_int_mic_boost, | 4141 | .v.func = alc269_fixup_limit_int_mic_boost, |
@@ -4094,6 +4155,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
4094 | .type = HDA_FIXUP_FUNC, | 4155 | .type = HDA_FIXUP_FUNC, |
4095 | .v.func = alc283_fixup_chromebook, | 4156 | .v.func = alc283_fixup_chromebook, |
4096 | }, | 4157 | }, |
4158 | [ALC283_FIXUP_SENSE_COMBO_JACK] = { | ||
4159 | .type = HDA_FIXUP_FUNC, | ||
4160 | .v.func = alc283_fixup_sense_combo_jack, | ||
4161 | .chained = true, | ||
4162 | .chain_id = ALC283_FIXUP_CHROME_BOOK, | ||
4163 | }, | ||
4097 | [ALC282_FIXUP_ASUS_TX300] = { | 4164 | [ALC282_FIXUP_ASUS_TX300] = { |
4098 | .type = HDA_FIXUP_FUNC, | 4165 | .type = HDA_FIXUP_FUNC, |
4099 | .v.func = alc282_fixup_asus_tx300, | 4166 | .v.func = alc282_fixup_asus_tx300, |
@@ -4176,6 +4243,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4176 | SND_PCI_QUIRK(0x1028, 0x0614, "Dell Inspiron 3135", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 4243 | 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), | 4244 | 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), | 4245 | SND_PCI_QUIRK(0x1028, 0x061f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4246 | SND_PCI_QUIRK(0x1028, 0x0638, "Dell Inspiron 5439", ALC290_FIXUP_MONO_SPEAKERS), | ||
4179 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), | 4247 | SND_PCI_QUIRK(0x1028, 0x063f, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE), |
4180 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 4248 | 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), | 4249 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
@@ -4184,13 +4252,12 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
4184 | SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 4252 | 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), | 4253 | 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), | 4254 | 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), | 4255 | SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED), |
4189 | SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), | 4256 | 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), | 4257 | 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), | 4258 | 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), | 4259 | SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4193 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), | 4260 | SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK), |
4194 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), | 4261 | SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), |
4195 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), | 4262 | SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), |
4196 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), | 4263 | SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC), |
@@ -4292,6 +4359,8 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
4292 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 4359 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
4293 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 4360 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
4294 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, | 4361 | {.id = ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, .name = "dell-headset-dock"}, |
4362 | {.id = ALC283_FIXUP_CHROME_BOOK, .name = "alc283-chrome"}, | ||
4363 | {.id = ALC283_FIXUP_SENSE_COMBO_JACK, .name = "alc283-sense-combo"}, | ||
4295 | {} | 4364 | {} |
4296 | }; | 4365 | }; |
4297 | 4366 | ||
@@ -4467,6 +4536,7 @@ enum { | |||
4467 | ALC861_FIXUP_AMP_VREF_0F, | 4536 | ALC861_FIXUP_AMP_VREF_0F, |
4468 | ALC861_FIXUP_NO_JACK_DETECT, | 4537 | ALC861_FIXUP_NO_JACK_DETECT, |
4469 | ALC861_FIXUP_ASUS_A6RP, | 4538 | ALC861_FIXUP_ASUS_A6RP, |
4539 | ALC660_FIXUP_ASUS_W7J, | ||
4470 | }; | 4540 | }; |
4471 | 4541 | ||
4472 | /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ | 4542 | /* On some laptops, VREF of pin 0x0f is abused for controlling the main amp */ |
@@ -4516,10 +4586,22 @@ static const struct hda_fixup alc861_fixups[] = { | |||
4516 | .v.func = alc861_fixup_asus_amp_vref_0f, | 4586 | .v.func = alc861_fixup_asus_amp_vref_0f, |
4517 | .chained = true, | 4587 | .chained = true, |
4518 | .chain_id = ALC861_FIXUP_NO_JACK_DETECT, | 4588 | .chain_id = ALC861_FIXUP_NO_JACK_DETECT, |
4589 | }, | ||
4590 | [ALC660_FIXUP_ASUS_W7J] = { | ||
4591 | .type = HDA_FIXUP_VERBS, | ||
4592 | .v.verbs = (const struct hda_verb[]) { | ||
4593 | /* ASUS W7J needs a magic pin setup on unused NID 0x10 | ||
4594 | * for enabling outputs | ||
4595 | */ | ||
4596 | {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24}, | ||
4597 | { } | ||
4598 | }, | ||
4519 | } | 4599 | } |
4520 | }; | 4600 | }; |
4521 | 4601 | ||
4522 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { | 4602 | static const struct snd_pci_quirk alc861_fixup_tbl[] = { |
4603 | SND_PCI_QUIRK(0x1043, 0x1253, "ASUS W7J", ALC660_FIXUP_ASUS_W7J), | ||
4604 | SND_PCI_QUIRK(0x1043, 0x1263, "ASUS Z35HL", ALC660_FIXUP_ASUS_W7J), | ||
4523 | SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), | 4605 | SND_PCI_QUIRK(0x1043, 0x1393, "ASUS A6Rp", ALC861_FIXUP_ASUS_A6RP), |
4524 | SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", ALC861_FIXUP_AMP_VREF_0F), | 4606 | 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), | 4607 | SND_PCI_QUIRK(0x1462, 0x7254, "HP DX2200", ALC861_FIXUP_NO_JACK_DETECT), |
@@ -4715,7 +4797,7 @@ static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { | |||
4715 | }; | 4797 | }; |
4716 | 4798 | ||
4717 | /* override the 2.1 chmap */ | 4799 | /* override the 2.1 chmap */ |
4718 | static void alc662_fixup_bass_chmap(struct hda_codec *codec, | 4800 | static void alc_fixup_bass_chmap(struct hda_codec *codec, |
4719 | const struct hda_fixup *fix, int action) | 4801 | const struct hda_fixup *fix, int action) |
4720 | { | 4802 | { |
4721 | if (action == HDA_FIXUP_ACT_BUILD) { | 4803 | if (action == HDA_FIXUP_ACT_BUILD) { |
@@ -4923,7 +5005,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4923 | }, | 5005 | }, |
4924 | [ALC662_FIXUP_BASS_CHMAP] = { | 5006 | [ALC662_FIXUP_BASS_CHMAP] = { |
4925 | .type = HDA_FIXUP_FUNC, | 5007 | .type = HDA_FIXUP_FUNC, |
4926 | .v.func = alc662_fixup_bass_chmap, | 5008 | .v.func = alc_fixup_bass_chmap, |
4927 | .chained = true, | 5009 | .chained = true, |
4928 | .chain_id = ALC662_FIXUP_ASUS_MODE4 | 5010 | .chain_id = ALC662_FIXUP_ASUS_MODE4 |
4929 | }, | 5011 | }, |
@@ -4936,7 +5018,7 @@ static const struct hda_fixup alc662_fixups[] = { | |||
4936 | }, | 5018 | }, |
4937 | [ALC662_FIXUP_BASS_1A_CHMAP] = { | 5019 | [ALC662_FIXUP_BASS_1A_CHMAP] = { |
4938 | .type = HDA_FIXUP_FUNC, | 5020 | .type = HDA_FIXUP_FUNC, |
4939 | .v.func = alc662_fixup_bass_chmap, | 5021 | .v.func = alc_fixup_bass_chmap, |
4940 | .chained = true, | 5022 | .chained = true, |
4941 | .chain_id = ALC662_FIXUP_BASS_1A, | 5023 | .chain_id = ALC662_FIXUP_BASS_1A, |
4942 | }, | 5024 | }, |
@@ -5118,6 +5200,7 @@ static int patch_alc662(struct hda_codec *codec) | |||
5118 | case 0x10ec0272: | 5200 | case 0x10ec0272: |
5119 | case 0x10ec0663: | 5201 | case 0x10ec0663: |
5120 | case 0x10ec0665: | 5202 | case 0x10ec0665: |
5203 | case 0x10ec0668: | ||
5121 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); | 5204 | set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); |
5122 | break; | 5205 | break; |
5123 | case 0x10ec0273: | 5206 | case 0x10ec0273: |
@@ -5175,6 +5258,7 @@ static int patch_alc680(struct hda_codec *codec) | |||
5175 | */ | 5258 | */ |
5176 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { | 5259 | static const struct hda_codec_preset snd_hda_preset_realtek[] = { |
5177 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, | 5260 | { .id = 0x10ec0221, .name = "ALC221", .patch = patch_alc269 }, |
5261 | { .id = 0x10ec0231, .name = "ALC231", .patch = patch_alc269 }, | ||
5178 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, | 5262 | { .id = 0x10ec0233, .name = "ALC233", .patch = patch_alc269 }, |
5179 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, | 5263 | { .id = 0x10ec0255, .name = "ALC255", .patch = patch_alc269 }, |
5180 | { .id = 0x10ec0260, .name = "ALC260", .patch = patch_alc260 }, | 5264 | { .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/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 992ae38d5a15..1b372283bd01 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c | |||
@@ -97,6 +97,8 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) | |||
97 | goto out; | 97 | goto out; |
98 | } | 98 | } |
99 | 99 | ||
100 | snd_soc_card_set_drvdata(card, priv); | ||
101 | |||
100 | card->dev = &pdev->dev; | 102 | card->dev = &pdev->dev; |
101 | card->owner = THIS_MODULE; | 103 | card->owner = THIS_MODULE; |
102 | card->dai_link = dai; | 104 | card->dai_link = dai; |
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index c3c7396a6181..99b359e19d35 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c | |||
@@ -248,19 +248,6 @@ ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE), | |||
248 | ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE), | 248 | ARIZONA_MIXER_CONTROLS("SPKDAT2L", ARIZONA_OUT6LMIX_INPUT_1_SOURCE), |
249 | ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE), | 249 | ARIZONA_MIXER_CONTROLS("SPKDAT2R", ARIZONA_OUT6RMIX_INPUT_1_SOURCE), |
250 | 250 | ||
251 | SOC_SINGLE("HPOUT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_1L, | ||
252 | ARIZONA_OUT1_OSR_SHIFT, 1, 0), | ||
253 | SOC_SINGLE("HPOUT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_2L, | ||
254 | ARIZONA_OUT2_OSR_SHIFT, 1, 0), | ||
255 | SOC_SINGLE("HPOUT3 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_3L, | ||
256 | ARIZONA_OUT3_OSR_SHIFT, 1, 0), | ||
257 | SOC_SINGLE("Speaker High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_4L, | ||
258 | ARIZONA_OUT4_OSR_SHIFT, 1, 0), | ||
259 | SOC_SINGLE("SPKDAT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_5L, | ||
260 | ARIZONA_OUT5_OSR_SHIFT, 1, 0), | ||
261 | SOC_SINGLE("SPKDAT2 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_6L, | ||
262 | ARIZONA_OUT6_OSR_SHIFT, 1, 0), | ||
263 | |||
264 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, | 251 | SOC_DOUBLE_R("HPOUT1 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_1L, |
265 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), | 252 | ARIZONA_DAC_DIGITAL_VOLUME_1R, ARIZONA_OUT1L_MUTE_SHIFT, 1, 1), |
266 | SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, | 253 | SOC_DOUBLE_R("HPOUT2 Digital Switch", ARIZONA_DAC_DIGITAL_VOLUME_2L, |
@@ -293,18 +280,6 @@ SOC_DOUBLE_R_TLV("SPKDAT2 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_6L, | |||
293 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_VOL_SHIFT, | 280 | ARIZONA_DAC_DIGITAL_VOLUME_6R, ARIZONA_OUT6L_VOL_SHIFT, |
294 | 0xbf, 0, digital_tlv), | 281 | 0xbf, 0, digital_tlv), |
295 | 282 | ||
296 | SOC_DOUBLE_R_RANGE_TLV("HPOUT1 Volume", ARIZONA_OUTPUT_PATH_CONFIG_1L, | ||
297 | ARIZONA_OUTPUT_PATH_CONFIG_1R, | ||
298 | ARIZONA_OUT1L_PGA_VOL_SHIFT, | ||
299 | 0x34, 0x40, 0, ana_tlv), | ||
300 | SOC_DOUBLE_R_RANGE_TLV("HPOUT2 Volume", ARIZONA_OUTPUT_PATH_CONFIG_2L, | ||
301 | ARIZONA_OUTPUT_PATH_CONFIG_2R, | ||
302 | ARIZONA_OUT2L_PGA_VOL_SHIFT, | ||
303 | 0x34, 0x40, 0, ana_tlv), | ||
304 | SOC_DOUBLE_R_RANGE_TLV("HPOUT3 Volume", ARIZONA_OUTPUT_PATH_CONFIG_3L, | ||
305 | ARIZONA_OUTPUT_PATH_CONFIG_3R, | ||
306 | ARIZONA_OUT3L_PGA_VOL_SHIFT, 0x34, 0x40, 0, ana_tlv), | ||
307 | |||
308 | SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, | 283 | SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT, |
309 | ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), | 284 | ARIZONA_SPK1R_MUTE_SHIFT, 1, 1), |
310 | SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, | 285 | SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT, |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 456bb8c6d759..bc7472c968e3 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -447,10 +447,10 @@ static int wm8731_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
447 | iface |= 0x0001; | 447 | iface |= 0x0001; |
448 | break; | 448 | break; |
449 | case SND_SOC_DAIFMT_DSP_A: | 449 | case SND_SOC_DAIFMT_DSP_A: |
450 | iface |= 0x0003; | 450 | iface |= 0x0013; |
451 | break; | 451 | break; |
452 | case SND_SOC_DAIFMT_DSP_B: | 452 | case SND_SOC_DAIFMT_DSP_B: |
453 | iface |= 0x0013; | 453 | iface |= 0x0003; |
454 | break; | 454 | break; |
455 | default: | 455 | default: |
456 | return -EINVAL; | 456 | return -EINVAL; |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 253c88bb7a4c..4f05fb88bddf 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1259,6 +1259,8 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1259 | 1259 | ||
1260 | /* disable POBCTRL, SOFT_ST and BUFDCOPEN */ | 1260 | /* disable POBCTRL, SOFT_ST and BUFDCOPEN */ |
1261 | snd_soc_write(codec, WM8990_ANTIPOP2, 0x0); | 1261 | snd_soc_write(codec, WM8990_ANTIPOP2, 0x0); |
1262 | |||
1263 | codec->cache_sync = 1; | ||
1262 | break; | 1264 | break; |
1263 | } | 1265 | } |
1264 | 1266 | ||
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c index eb4373840bb6..3665f612819d 100644 --- a/sound/soc/fsl/pcm030-audio-fabric.c +++ b/sound/soc/fsl/pcm030-audio-fabric.c | |||
@@ -69,7 +69,6 @@ static int pcm030_fabric_probe(struct platform_device *op) | |||
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | 70 | ||
71 | card->dev = &op->dev; | 71 | card->dev = &op->dev; |
72 | platform_set_drvdata(op, pdata); | ||
73 | 72 | ||
74 | pdata->card = card; | 73 | pdata->card = card; |
75 | 74 | ||
@@ -98,6 +97,8 @@ static int pcm030_fabric_probe(struct platform_device *op) | |||
98 | if (ret) | 97 | if (ret) |
99 | dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret); | 98 | dev_err(&op->dev, "snd_soc_register_card() failed: %d\n", ret); |
100 | 99 | ||
100 | platform_set_drvdata(op, pdata); | ||
101 | |||
101 | return ret; | 102 | return ret; |
102 | } | 103 | } |
103 | 104 | ||
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index d34d91743e3f..0b18f654b413 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c | |||
@@ -33,6 +33,10 @@ | |||
33 | SNDRV_PCM_FMTBIT_S24_LE | \ | 33 | SNDRV_PCM_FMTBIT_S24_LE | \ |
34 | SNDRV_PCM_FMTBIT_S32_LE) | 34 | SNDRV_PCM_FMTBIT_S32_LE) |
35 | 35 | ||
36 | #define KIRKWOOD_SPDIF_FORMATS \ | ||
37 | (SNDRV_PCM_FMTBIT_S16_LE | \ | ||
38 | SNDRV_PCM_FMTBIT_S24_LE) | ||
39 | |||
36 | static int kirkwood_i2s_set_fmt(struct snd_soc_dai *cpu_dai, | 40 | static int kirkwood_i2s_set_fmt(struct snd_soc_dai *cpu_dai, |
37 | unsigned int fmt) | 41 | unsigned int fmt) |
38 | { | 42 | { |
@@ -244,15 +248,15 @@ static int kirkwood_i2s_play_trigger(struct snd_pcm_substream *substream, | |||
244 | ctl); | 248 | ctl); |
245 | } | 249 | } |
246 | 250 | ||
247 | if (dai->id == 0) | ||
248 | ctl &= ~KIRKWOOD_PLAYCTL_SPDIF_EN; /* i2s */ | ||
249 | else | ||
250 | ctl &= ~KIRKWOOD_PLAYCTL_I2S_EN; /* spdif */ | ||
251 | |||
252 | switch (cmd) { | 251 | switch (cmd) { |
253 | case SNDRV_PCM_TRIGGER_START: | 252 | case SNDRV_PCM_TRIGGER_START: |
254 | /* configure */ | 253 | /* configure */ |
255 | ctl = priv->ctl_play; | 254 | ctl = priv->ctl_play; |
255 | if (dai->id == 0) | ||
256 | ctl &= ~KIRKWOOD_PLAYCTL_SPDIF_EN; /* i2s */ | ||
257 | else | ||
258 | ctl &= ~KIRKWOOD_PLAYCTL_I2S_EN; /* spdif */ | ||
259 | |||
256 | value = ctl & ~KIRKWOOD_PLAYCTL_ENABLE_MASK; | 260 | value = ctl & ~KIRKWOOD_PLAYCTL_ENABLE_MASK; |
257 | writel(value, priv->io + KIRKWOOD_PLAYCTL); | 261 | writel(value, priv->io + KIRKWOOD_PLAYCTL); |
258 | 262 | ||
@@ -449,14 +453,14 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai[2] = { | |||
449 | .channels_max = 2, | 453 | .channels_max = 2, |
450 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | 454 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | |
451 | SNDRV_PCM_RATE_96000, | 455 | SNDRV_PCM_RATE_96000, |
452 | .formats = KIRKWOOD_I2S_FORMATS, | 456 | .formats = KIRKWOOD_SPDIF_FORMATS, |
453 | }, | 457 | }, |
454 | .capture = { | 458 | .capture = { |
455 | .channels_min = 1, | 459 | .channels_min = 1, |
456 | .channels_max = 2, | 460 | .channels_max = 2, |
457 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | 461 | .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | |
458 | SNDRV_PCM_RATE_96000, | 462 | SNDRV_PCM_RATE_96000, |
459 | .formats = KIRKWOOD_I2S_FORMATS, | 463 | .formats = KIRKWOOD_SPDIF_FORMATS, |
460 | }, | 464 | }, |
461 | .ops = &kirkwood_i2s_dai_ops, | 465 | .ops = &kirkwood_i2s_dai_ops, |
462 | }, | 466 | }, |
@@ -493,7 +497,7 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
493 | .rates = SNDRV_PCM_RATE_8000_192000 | | 497 | .rates = SNDRV_PCM_RATE_8000_192000 | |
494 | SNDRV_PCM_RATE_CONTINUOUS | | 498 | SNDRV_PCM_RATE_CONTINUOUS | |
495 | SNDRV_PCM_RATE_KNOT, | 499 | SNDRV_PCM_RATE_KNOT, |
496 | .formats = KIRKWOOD_I2S_FORMATS, | 500 | .formats = KIRKWOOD_SPDIF_FORMATS, |
497 | }, | 501 | }, |
498 | .capture = { | 502 | .capture = { |
499 | .channels_min = 1, | 503 | .channels_min = 1, |
@@ -501,7 +505,7 @@ static struct snd_soc_dai_driver kirkwood_i2s_dai_extclk[2] = { | |||
501 | .rates = SNDRV_PCM_RATE_8000_192000 | | 505 | .rates = SNDRV_PCM_RATE_8000_192000 | |
502 | SNDRV_PCM_RATE_CONTINUOUS | | 506 | SNDRV_PCM_RATE_CONTINUOUS | |
503 | SNDRV_PCM_RATE_KNOT, | 507 | SNDRV_PCM_RATE_KNOT, |
504 | .formats = KIRKWOOD_I2S_FORMATS, | 508 | .formats = KIRKWOOD_SPDIF_FORMATS, |
505 | }, | 509 | }, |
506 | .ops = &kirkwood_i2s_dai_ops, | 510 | .ops = &kirkwood_i2s_dai_ops, |
507 | }, | 511 | }, |
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 6d216cb6c19b..3fde9e402710 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -100,12 +100,12 @@ static int n810_startup(struct snd_pcm_substream *substream) | |||
100 | SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); | 100 | SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); |
101 | 101 | ||
102 | n810_ext_control(&codec->dapm); | 102 | n810_ext_control(&codec->dapm); |
103 | return clk_enable(sys_clkout2); | 103 | return clk_prepare_enable(sys_clkout2); |
104 | } | 104 | } |
105 | 105 | ||
106 | static void n810_shutdown(struct snd_pcm_substream *substream) | 106 | static void n810_shutdown(struct snd_pcm_substream *substream) |
107 | { | 107 | { |
108 | clk_disable(sys_clkout2); | 108 | clk_disable_unprepare(sys_clkout2); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int n810_hw_params(struct snd_pcm_substream *substream, | 111 | static int n810_hw_params(struct snd_pcm_substream *substream, |
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index 14011d90d70a..ff60e11ecb56 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig | |||
@@ -37,6 +37,7 @@ config SND_SOC_SH4_SIU | |||
37 | config SND_SOC_RCAR | 37 | config SND_SOC_RCAR |
38 | tristate "R-Car series SRU/SCU/SSIU/SSI support" | 38 | tristate "R-Car series SRU/SCU/SSIU/SSI support" |
39 | select SND_SIMPLE_CARD | 39 | select SND_SIMPLE_CARD |
40 | select REGMAP | ||
40 | help | 41 | help |
41 | This option enables R-Car SUR/SCU/SSIU/SSI sound support | 42 | This option enables R-Car SUR/SCU/SSIU/SSI sound support |
42 | 43 | ||
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; |