diff options
| -rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
| -rw-r--r-- | sound/atmel/abdac.c | 3 | ||||
| -rw-r--r-- | sound/firewire/dice.c | 4 | ||||
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 9 | ||||
| -rw-r--r-- | sound/pci/hda/patch_analog.c | 6 | ||||
| -rw-r--r-- | sound/pci/hda/patch_hdmi.c | 27 | ||||
| -rw-r--r-- | sound/pci/hda/patch_realtek.c | 92 | ||||
| -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/soc/soc-core.c | 4 | ||||
| -rw-r--r-- | sound/soc/soc-devres.c | 4 | ||||
| -rw-r--r-- | sound/soc/soc-pcm.c | 18 |
18 files changed, 146 insertions, 87 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 2037c45adfe6..56ebdfca6273 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
| @@ -104,7 +104,8 @@ struct device; | |||
| 104 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ | 104 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ |
| 105 | .kcontrol_news = wcontrols, .num_kcontrols = 1} | 105 | .kcontrol_news = wcontrols, .num_kcontrols = 1} |
| 106 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 106 | #define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
| 107 | { .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, \ | 107 | { .id = snd_soc_dapm_mux, .name = wname, \ |
| 108 | SND_SOC_DAPM_INIT_REG_VAL(wreg, wshift, winvert), \ | ||
| 108 | .kcontrol_news = wcontrols, .num_kcontrols = 1} | 109 | .kcontrol_news = wcontrols, .num_kcontrols = 1} |
| 109 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ | 110 | #define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \ |
| 110 | { .id = snd_soc_dapm_virt_mux, .name = wname, \ | 111 | { .id = snd_soc_dapm_virt_mux, .name = wname, \ |
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/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_intel.c b/sound/pci/hda/hda_intel.c index c6d230193da6..27aa14007cbd 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -3876,7 +3876,8 @@ static int azx_probe(struct pci_dev *pci, | |||
| 3876 | } | 3876 | } |
| 3877 | 3877 | ||
| 3878 | dev++; | 3878 | dev++; |
| 3879 | complete_all(&chip->probe_wait); | 3879 | if (chip->disabled) |
| 3880 | complete_all(&chip->probe_wait); | ||
| 3880 | return 0; | 3881 | return 0; |
| 3881 | 3882 | ||
| 3882 | out_free: | 3883 | out_free: |
| @@ -3953,10 +3954,10 @@ static int azx_probe_continue(struct azx *chip) | |||
| 3953 | 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) |
| 3954 | pm_runtime_put_noidle(&pci->dev); | 3955 | pm_runtime_put_noidle(&pci->dev); |
| 3955 | 3956 | ||
| 3956 | return 0; | ||
| 3957 | |||
| 3958 | out_free: | 3957 | out_free: |
| 3959 | chip->init_failed = 1; | 3958 | if (err < 0) |
| 3959 | chip->init_failed = 1; | ||
| 3960 | complete_all(&chip->probe_wait); | ||
| 3960 | return err; | 3961 | return err; |
| 3961 | } | 3962 | } |
| 3962 | 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_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 | |||
