aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 10:51:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-10 10:51:56 -0400
commit05a88a43604abb816dfbff075bb114224641793b (patch)
tree7bf95bdd4d4dadbd8500b2761fdd499fc01fc10f /sound
parentdaf799cca8abbf7f3e253ecf1d41d244070773d7 (diff)
parent6c35ae3c327ef4b5f51d3428d2ba47ac2153e882 (diff)
Merge tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "This contains small fixes since the previous pull request: - A few regression fixes and small updates of HD-audio - Yet another fix for Haswell HDMI audio - A copule of trivial fixes in ASoC McASP, DPAM and WM8994" * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: Revert "ALSA: hda - Don't set up active streams twice" ALSA: Add comment for control TLV API ALSA: hda - Apply pin-enablement workaround to all Haswell HDMI codecs ALSA: HDA: Fix Oops caused by dereference NULL pointer ALSA: mips/sgio2audio: Remove redundant platform_set_drvdata() ALSA: mips/hal2: Remove redundant platform_set_drvdata() ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs sound: Fix make allmodconfig on MIPS ALSA: hda - Fix system panic when DMA > 40 bits for Nvidia audio controllers ALSA: atmel: Remove redundant platform_set_drvdata() ASoC: McASP: Fix receive clock polarity in DAIFMT_NB_NF mode. ASoC: wm8994: missing break in wm8994_aif3_hw_params() ASoC: McASP: Add pins output direction for rx clocks when configured in CBS_CFS format ASoC: dapm: use clk_prepare_enable and clk_disable_unprepare
Diffstat (limited to 'sound')
-rw-r--r--sound/atmel/abdac.c2
-rw-r--r--sound/atmel/ac97c.c2
-rw-r--r--sound/mips/hal2.c1
-rw-r--r--sound/mips/sgio2audio.c1
-rw-r--r--sound/oss/Kconfig1
-rw-r--r--sound/pci/hda/hda_codec.c7
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/hda/patch_conexant.c17
-rw-r--r--sound/pci/hda/patch_hdmi.c54
-rw-r--r--sound/soc/codecs/wm8994.c1
-rw-r--r--sound/soc/davinci/davinci-mcasp.c7
-rw-r--r--sound/soc/soc-dapm.c4
12 files changed, 51 insertions, 48 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 071ce1b5f2b4..872d59e35ee2 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -583,8 +583,6 @@ static int atmel_abdac_remove(struct platform_device *pdev)
583 free_irq(dac->irq, dac); 583 free_irq(dac->irq, dac);
584 snd_card_free(card); 584 snd_card_free(card);
585 585
586 platform_set_drvdata(pdev, NULL);
587
588 return 0; 586 return 0;
589} 587}
590 588
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 6b7e2b5a72de..ae63d22c0f88 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -1199,8 +1199,6 @@ static int atmel_ac97c_remove(struct platform_device *pdev)
1199 snd_card_set_dev(card, NULL); 1199 snd_card_set_dev(card, NULL);
1200 snd_card_free(card); 1200 snd_card_free(card);
1201 1201
1202 platform_set_drvdata(pdev, NULL);
1203
1204 return 0; 1202 return 0;
1205} 1203}
1206 1204
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 7420c59444ab..2b7f6e8bdd24 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -922,7 +922,6 @@ static int hal2_remove(struct platform_device *pdev)
922 struct snd_card *card = platform_get_drvdata(pdev); 922 struct snd_card *card = platform_get_drvdata(pdev);
923 923
924 snd_card_free(card); 924 snd_card_free(card);
925 platform_set_drvdata(pdev, NULL);
926 return 0; 925 return 0;
927} 926}
928 927
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c
index 01a03efdc8b0..cfe99ae149fe 100644
--- a/sound/mips/sgio2audio.c
+++ b/sound/mips/sgio2audio.c
@@ -963,7 +963,6 @@ static int snd_sgio2audio_remove(struct platform_device *pdev)
963 struct snd_card *card = platform_get_drvdata(pdev); 963 struct snd_card *card = platform_get_drvdata(pdev);
964 964
965 snd_card_free(card); 965 snd_card_free(card);
966 platform_set_drvdata(pdev, NULL);
967 return 0; 966 return 0;
968} 967}
969 968
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig
index 5849b129e50d..51c4ba95a32d 100644
--- a/sound/oss/Kconfig
+++ b/sound/oss/Kconfig
@@ -250,6 +250,7 @@ config MSND_FIFOSIZE
250menuconfig SOUND_OSS 250menuconfig SOUND_OSS
251 tristate "OSS sound modules" 251 tristate "OSS sound modules"
252 depends on ISA_DMA_API && VIRT_TO_BUS 252 depends on ISA_DMA_API && VIRT_TO_BUS
253 depends on !ISA_DMA_SUPPORT_BROKEN
253 help 254 help
254 OSS is the Open Sound System suite of sound card drivers. They make 255 OSS is the Open Sound System suite of sound card drivers. They make
255 sound programming easier since they provide a common API. Say Y or 256 sound programming easier since they provide a common API. Say Y or
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 6f9b64700f6e..55108b5fb291 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -681,6 +681,9 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex)
681 struct hda_bus_unsolicited *unsol; 681 struct hda_bus_unsolicited *unsol;
682 unsigned int wp; 682 unsigned int wp;
683 683
684 if (!bus || !bus->workq)
685 return 0;
686
684 trace_hda_unsol_event(bus, res, res_ex); 687 trace_hda_unsol_event(bus, res, res_ex);
685 unsol = bus->unsol; 688 unsol = bus->unsol;
686 if (!unsol) 689 if (!unsol)
@@ -1580,7 +1583,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
1580 "NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n", 1583 "NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n",
1581 nid, stream_tag, channel_id, format); 1584 nid, stream_tag, channel_id, format);
1582 p = get_hda_cvt_setup(codec, nid); 1585 p = get_hda_cvt_setup(codec, nid);
1583 if (!p || p->active) 1586 if (!p)
1584 return; 1587 return;
1585 1588
1586 if (codec->pcm_format_first) 1589 if (codec->pcm_format_first)
@@ -1627,7 +1630,7 @@ void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,
1627 1630
1628 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid); 1631 snd_printdd("hda_codec_cleanup_stream: NID=0x%x\n", nid);
1629 p = get_hda_cvt_setup(codec, nid); 1632 p = get_hda_cvt_setup(codec, nid);
1630 if (p && p->active) { 1633 if (p) {
1631 /* here we just clear the active flag when do_now isn't set; 1634 /* here we just clear the active flag when do_now isn't set;
1632 * actual clean-ups will be done later in 1635 * actual clean-ups will be done later in
1633 * purify_inactive_streams() called from snd_hda_codec_prpapre() 1636 * purify_inactive_streams() called from snd_hda_codec_prpapre()
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7b213d589ef6..de18722c4873 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -615,7 +615,7 @@ enum {
615/* quirks for Nvidia */ 615/* quirks for Nvidia */
616#define AZX_DCAPS_PRESET_NVIDIA \ 616#define AZX_DCAPS_PRESET_NVIDIA \
617 (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\ 617 (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\
618 AZX_DCAPS_ALIGN_BUFSIZE) 618 AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT)
619 619
620#define AZX_DCAPS_PRESET_CTHDA \ 620#define AZX_DCAPS_PRESET_CTHDA \
621 (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY) 621 (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY)
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 84b81c874a4a..b314d3e6d7fa 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -64,6 +64,7 @@ struct conexant_spec {
64 /* extra EAPD pins */ 64 /* extra EAPD pins */
65 unsigned int num_eapds; 65 unsigned int num_eapds;
66 hda_nid_t eapds[4]; 66 hda_nid_t eapds[4];
67 bool dynamic_eapd;
67 68
68#ifdef ENABLE_CXT_STATIC_QUIRKS 69#ifdef ENABLE_CXT_STATIC_QUIRKS
69 const struct snd_kcontrol_new *mixers[5]; 70 const struct snd_kcontrol_new *mixers[5];
@@ -3155,7 +3156,7 @@ static void cx_auto_parse_eapd(struct hda_codec *codec)
3155 * thus it might control over all pins. 3156 * thus it might control over all pins.
3156 */ 3157 */
3157 if (spec->num_eapds > 2) 3158 if (spec->num_eapds > 2)
3158 spec->gen.own_eapd_ctl = 1; 3159 spec->dynamic_eapd = 1;
3159} 3160}
3160 3161
3161static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins, 3162static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins,
@@ -3194,10 +3195,19 @@ static int cx_auto_build_controls(struct hda_codec *codec)
3194 return 0; 3195 return 0;
3195} 3196}
3196 3197
3198static int cx_auto_init(struct hda_codec *codec)
3199{
3200 struct conexant_spec *spec = codec->spec;
3201 snd_hda_gen_init(codec);
3202 if (!spec->dynamic_eapd)
3203 cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
3204 return 0;
3205}
3206
3197static const struct hda_codec_ops cx_auto_patch_ops = { 3207static const struct hda_codec_ops cx_auto_patch_ops = {
3198 .build_controls = cx_auto_build_controls, 3208 .build_controls = cx_auto_build_controls,
3199 .build_pcms = snd_hda_gen_build_pcms, 3209 .build_pcms = snd_hda_gen_build_pcms,
3200 .init = snd_hda_gen_init, 3210 .init = cx_auto_init,
3201 .free = snd_hda_gen_free, 3211 .free = snd_hda_gen_free,
3202 .unsol_event = snd_hda_jack_unsol_event, 3212 .unsol_event = snd_hda_jack_unsol_event,
3203#ifdef CONFIG_PM 3213#ifdef CONFIG_PM
@@ -3348,7 +3358,8 @@ static int patch_conexant_auto(struct hda_codec *codec)
3348 3358
3349 cx_auto_parse_beep(codec); 3359 cx_auto_parse_beep(codec);
3350 cx_auto_parse_eapd(codec); 3360 cx_auto_parse_eapd(codec);
3351 if (spec->gen.own_eapd_ctl) 3361 spec->gen.own_eapd_ctl = 1;
3362 if (spec->dynamic_eapd)
3352 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook; 3363 spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook;
3353 3364
3354 switch (codec->vendor_id) { 3365 switch (codec->vendor_id) {
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 32930e668854..e12f7a030c58 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1832,12 +1832,10 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec,
1832#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */ 1832#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
1833 1833
1834static void intel_haswell_enable_all_pins(struct hda_codec *codec, 1834static void intel_haswell_enable_all_pins(struct hda_codec *codec,
1835 const struct hda_fixup *fix, int action) 1835 bool update_tree)
1836{ 1836{
1837 unsigned int vendor_param; 1837 unsigned int vendor_param;
1838 1838
1839 if (action != HDA_FIXUP_ACT_PRE_PROBE)
1840 return;
1841 vendor_param = snd_hda_codec_read(codec, INTEL_VENDOR_NID, 0, 1839 vendor_param = snd_hda_codec_read(codec, INTEL_VENDOR_NID, 0,
1842 INTEL_GET_VENDOR_VERB, 0); 1840 INTEL_GET_VENDOR_VERB, 0);
1843 if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS) 1841 if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS)
@@ -1849,8 +1847,8 @@ static void intel_haswell_enable_all_pins(struct hda_codec *codec,
1849 if (vendor_param == -1) 1847 if (vendor_param == -1)
1850 return; 1848 return;
1851 1849
1852 snd_hda_codec_update_widgets(codec); 1850 if (update_tree)
1853 return; 1851 snd_hda_codec_update_widgets(codec);
1854} 1852}
1855 1853
1856static void intel_haswell_fixup_enable_dp12(struct hda_codec *codec) 1854static void intel_haswell_fixup_enable_dp12(struct hda_codec *codec)
@@ -1868,30 +1866,20 @@ static void intel_haswell_fixup_enable_dp12(struct hda_codec *codec)
1868 INTEL_SET_VENDOR_VERB, vendor_param); 1866 INTEL_SET_VENDOR_VERB, vendor_param);
1869} 1867}
1870 1868
1869/* Haswell needs to re-issue the vendor-specific verbs before turning to D0.
1870 * Otherwise you may get severe h/w communication errors.
1871 */
1872static void haswell_set_power_state(struct hda_codec *codec, hda_nid_t fg,
1873 unsigned int power_state)
1874{
1875 if (power_state == AC_PWRST_D0) {
1876 intel_haswell_enable_all_pins(codec, false);
1877 intel_haswell_fixup_enable_dp12(codec);
1878 }
1871 1879
1872 1880 snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_POWER_STATE, power_state);
1873/* available models for fixup */ 1881 snd_hda_codec_set_power_to_all(codec, fg, power_state);
1874enum { 1882}
1875 INTEL_HASWELL,
1876};
1877
1878static const struct hda_model_fixup hdmi_models[] = {
1879 {.id = INTEL_HASWELL, .name = "Haswell"},
1880 {}
1881};
1882
1883static const struct snd_pci_quirk hdmi_fixup_tbl[] = {
1884 SND_PCI_QUIRK(0x8086, 0x2010, "Haswell", INTEL_HASWELL),
1885 {} /* terminator */
1886};
1887
1888static const struct hda_fixup hdmi_fixups[] = {
1889 [INTEL_HASWELL] = {
1890 .type = HDA_FIXUP_FUNC,
1891 .v.func = intel_haswell_enable_all_pins,
1892 },
1893};
1894
1895 1883
1896static int patch_generic_hdmi(struct hda_codec *codec) 1884static int patch_generic_hdmi(struct hda_codec *codec)
1897{ 1885{
@@ -1904,11 +1892,10 @@ static int patch_generic_hdmi(struct hda_codec *codec)
1904 codec->spec = spec; 1892 codec->spec = spec;
1905 hdmi_array_init(spec, 4); 1893 hdmi_array_init(spec, 4);
1906 1894
1907 snd_hda_pick_fixup(codec, hdmi_models, hdmi_fixup_tbl, hdmi_fixups); 1895 if (codec->vendor_id == 0x80862807) {
1908 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE); 1896 intel_haswell_enable_all_pins(codec, true);
1909
1910 if (codec->vendor_id == 0x80862807)
1911 intel_haswell_fixup_enable_dp12(codec); 1897 intel_haswell_fixup_enable_dp12(codec);
1898 }
1912 1899
1913 if (hdmi_parse_codec(codec) < 0) { 1900 if (hdmi_parse_codec(codec) < 0) {
1914 codec->spec = NULL; 1901 codec->spec = NULL;
@@ -1916,6 +1903,9 @@ static int patch_generic_hdmi(struct hda_codec *codec)
1916 return -EINVAL; 1903 return -EINVAL;
1917 } 1904 }
1918 codec->patch_ops = generic_hdmi_patch_ops; 1905 codec->patch_ops = generic_hdmi_patch_ops;
1906 if (codec->vendor_id == 0x80862807)
1907 codec->patch_ops.set_power_state = haswell_set_power_state;
1908
1919 generic_hdmi_init_per_pins(codec); 1909 generic_hdmi_init_per_pins(codec);
1920 1910
1921 init_channel_allocations(); 1911 init_channel_allocations();
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 14094f558e03..1eb152cb1097 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2882,6 +2882,7 @@ static int wm8994_aif3_hw_params(struct snd_pcm_substream *substream,
2882 default: 2882 default:
2883 return 0; 2883 return 0;
2884 } 2884 }
2885 break;
2885 default: 2886 default:
2886 return 0; 2887 return 0;
2887 } 2888 }
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 8b85049daab0..56ecfc72f2e9 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -505,7 +505,10 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
505 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); 505 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE);
506 mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); 506 mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE);
507 507
508 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, ACLKX | AFSX); 508 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG,
509 ACLKX | ACLKR);
510 mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG,
511 AFSX | AFSR);
509 break; 512 break;
510 case SND_SOC_DAIFMT_CBM_CFS: 513 case SND_SOC_DAIFMT_CBM_CFS:
511 /* codec is clock master and frame slave */ 514 /* codec is clock master and frame slave */
@@ -565,7 +568,7 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai,
565 mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL); 568 mcasp_set_bits(base + DAVINCI_MCASP_ACLKXCTL_REG, ACLKXPOL);
566 mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL); 569 mcasp_clr_bits(base + DAVINCI_MCASP_TXFMCTL_REG, FSXPOL);
567 570
568 mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL); 571 mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRPOL);
569 mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL); 572 mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, FSRPOL);
570 break; 573 break;
571 574
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 21779a6a781a..a80c883bb8be 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1095,9 +1095,9 @@ int dapm_clock_event(struct snd_soc_dapm_widget *w,
1095 1095
1096#ifdef CONFIG_HAVE_CLK 1096#ifdef CONFIG_HAVE_CLK
1097 if (SND_SOC_DAPM_EVENT_ON(event)) { 1097 if (SND_SOC_DAPM_EVENT_ON(event)) {
1098 return clk_enable(w->clk); 1098 return clk_prepare_enable(w->clk);
1099 } else { 1099 } else {
1100 clk_disable(w->clk); 1100 clk_disable_unprepare(w->clk);
1101 return 0; 1101 return 0;
1102 } 1102 }
1103#endif 1103#endif