aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/aloop.c5
-rw-r--r--sound/pci/hda/hda_intel.c49
-rw-r--r--sound/pci/hda/patch_hdmi.c11
-rw-r--r--sound/pci/hda/patch_realtek.c1
-rw-r--r--sound/soc/codecs/arizona.c5
-rw-r--r--sound/soc/codecs/wm2200.c3
-rw-r--r--sound/soc/codecs/wm5102.c3
-rw-r--r--sound/soc/codecs/wm5110.c3
-rw-r--r--sound/soc/codecs/wm_adsp.c6
-rw-r--r--sound/soc/fsl/Kconfig9
-rw-r--r--sound/soc/fsl/Makefile5
-rw-r--r--sound/soc/fsl/imx-pcm.c3
-rw-r--r--sound/soc/soc-dapm.c12
-rw-r--r--sound/usb/mixer.c17
-rw-r--r--sound/usb/quirks-table.h2
15 files changed, 80 insertions, 54 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 3d822328d383..64d534710b51 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -286,12 +286,14 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd)
286 loopback_active_notify(dpcm); 286 loopback_active_notify(dpcm);
287 break; 287 break;
288 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 288 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
289 case SNDRV_PCM_TRIGGER_SUSPEND:
289 spin_lock(&cable->lock); 290 spin_lock(&cable->lock);
290 cable->pause |= stream; 291 cable->pause |= stream;
291 loopback_timer_stop(dpcm); 292 loopback_timer_stop(dpcm);
292 spin_unlock(&cable->lock); 293 spin_unlock(&cable->lock);
293 break; 294 break;
294 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 295 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
296 case SNDRV_PCM_TRIGGER_RESUME:
295 spin_lock(&cable->lock); 297 spin_lock(&cable->lock);
296 dpcm->last_jiffies = jiffies; 298 dpcm->last_jiffies = jiffies;
297 cable->pause &= ~stream; 299 cable->pause &= ~stream;
@@ -563,7 +565,8 @@ static snd_pcm_uframes_t loopback_pointer(struct snd_pcm_substream *substream)
563static struct snd_pcm_hardware loopback_pcm_hardware = 565static struct snd_pcm_hardware loopback_pcm_hardware =
564{ 566{
565 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP | 567 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_MMAP |
566 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE), 568 SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE |
569 SNDRV_PCM_INFO_RESUME),
567 .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | 570 .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
568 SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE | 571 SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S32_BE |
569 SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE), 572 SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE),
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3d8df7c6a3b9..d9e37ffdb048 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -656,29 +656,43 @@ static char *driver_short_names[] = {
656#define get_azx_dev(substream) (substream->runtime->private_data) 656#define get_azx_dev(substream) (substream->runtime->private_data)
657 657
658#ifdef CONFIG_X86 658#ifdef CONFIG_X86
659static void __mark_pages_wc(struct azx *chip, void *addr, size_t size, bool on) 659static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool on)
660{ 660{
661 int pages;
662
661 if (azx_snoop(chip)) 663 if (azx_snoop(chip))
662 return; 664 return;
663 if (addr && size) { 665 if (!dmab || !dmab->area || !dmab->bytes)
664 int pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; 666 return;
667
668#ifdef CONFIG_SND_DMA_SGBUF
669 if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_SG) {
670 struct snd_sg_buf *sgbuf = dmab->private_data;
665 if (on) 671 if (on)
666 set_memory_wc((unsigned long)addr, pages); 672 set_pages_array_wc(sgbuf->page_table, sgbuf->pages);
667 else 673 else
668 set_memory_wb((unsigned long)addr, pages); 674 set_pages_array_wb(sgbuf->page_table, sgbuf->pages);
675 return;
669 } 676 }
677#endif
678
679 pages = (dmab->bytes + PAGE_SIZE - 1) >> PAGE_SHIFT;
680 if (on)
681 set_memory_wc((unsigned long)dmab->area, pages);
682 else
683 set_memory_wb((unsigned long)dmab->area, pages);
670} 684}
671 685
672static inline void mark_pages_wc(struct azx *chip, struct snd_dma_buffer *buf, 686static inline void mark_pages_wc(struct azx *chip, struct snd_dma_buffer *buf,
673 bool on) 687 bool on)
674{ 688{
675 __mark_pages_wc(chip, buf->area, buf->bytes, on); 689 __mark_pages_wc(chip, buf, on);
676} 690}
677static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev, 691static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev,
678 struct snd_pcm_runtime *runtime, bool on) 692 struct snd_pcm_substream *substream, bool on)
679{ 693{
680 if (azx_dev->wc_marked != on) { 694 if (azx_dev->wc_marked != on) {
681 __mark_pages_wc(chip, runtime->dma_area, runtime->dma_bytes, on); 695 __mark_pages_wc(chip, snd_pcm_get_dma_buf(substream), on);
682 azx_dev->wc_marked = on; 696 azx_dev->wc_marked = on;
683 } 697 }
684} 698}
@@ -689,7 +703,7 @@ static inline void mark_pages_wc(struct azx *chip, struct snd_dma_buffer *buf,
689{ 703{
690} 704}
691static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev, 705static inline void mark_runtime_wc(struct azx *chip, struct azx_dev *azx_dev,
692 struct snd_pcm_runtime *runtime, bool on) 706 struct snd_pcm_substream *substream, bool on)
693{ 707{
694} 708}
695#endif 709#endif
@@ -1975,11 +1989,10 @@ static int azx_pcm_hw_params(struct snd_pcm_substream *substream,
1975{ 1989{
1976 struct azx_pcm *apcm = snd_pcm_substream_chip(substream); 1990 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
1977 struct azx *chip = apcm->chip; 1991 struct azx *chip = apcm->chip;
1978 struct snd_pcm_runtime *runtime = substream->runtime;
1979 struct azx_dev *azx_dev = get_azx_dev(substream); 1992 struct azx_dev *azx_dev = get_azx_dev(substream);
1980 int ret; 1993 int ret;
1981 1994
1982 mark_runtime_wc(chip, azx_dev, runtime, false); 1995 mark_runtime_wc(chip, azx_dev, substream, false);
1983 azx_dev->bufsize = 0; 1996 azx_dev->bufsize = 0;
1984 azx_dev->period_bytes = 0; 1997 azx_dev->period_bytes = 0;
1985 azx_dev->format_val = 0; 1998 azx_dev->format_val = 0;
@@ -1987,7 +2000,7 @@ static int azx_pcm_hw_params(struct snd_pcm_substream *substream,
1987 params_buffer_bytes(hw_params)); 2000 params_buffer_bytes(hw_params));
1988 if (ret < 0) 2001 if (ret < 0)
1989 return ret; 2002 return ret;
1990 mark_runtime_wc(chip, azx_dev, runtime, true); 2003 mark_runtime_wc(chip, azx_dev, substream, true);
1991 return ret; 2004 return ret;
1992} 2005}
1993 2006
@@ -1996,7 +2009,6 @@ static int azx_pcm_hw_free(struct snd_pcm_substream *substream)
1996 struct azx_pcm *apcm = snd_pcm_substream_chip(substream); 2009 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
1997 struct azx_dev *azx_dev = get_azx_dev(substream); 2010 struct azx_dev *azx_dev = get_azx_dev(substream);
1998 struct azx *chip = apcm->chip; 2011 struct azx *chip = apcm->chip;
1999 struct snd_pcm_runtime *runtime = substream->runtime;
2000 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream]; 2012 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream];
2001 2013
2002 /* reset BDL address */ 2014 /* reset BDL address */
@@ -2009,7 +2021,7 @@ static int azx_pcm_hw_free(struct snd_pcm_substream *substream)
2009 2021
2010 snd_hda_codec_cleanup(apcm->codec, hinfo, substream); 2022 snd_hda_codec_cleanup(apcm->codec, hinfo, substream);
2011 2023
2012 mark_runtime_wc(chip, azx_dev, runtime, false); 2024 mark_runtime_wc(chip, azx_dev, substream, false);
2013 return snd_pcm_lib_free_pages(substream); 2025 return snd_pcm_lib_free_pages(substream);
2014} 2026}
2015 2027
@@ -3624,13 +3636,12 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
3624 /* 5 Series/3400 */ 3636 /* 5 Series/3400 */
3625 { PCI_DEVICE(0x8086, 0x3b56), 3637 { PCI_DEVICE(0x8086, 0x3b56),
3626 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH }, 3638 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
3627 /* SCH */ 3639 /* Poulsbo */
3628 { PCI_DEVICE(0x8086, 0x811b), 3640 { PCI_DEVICE(0x8086, 0x811b),
3629 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3641 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
3630 AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_LPIB }, /* Poulsbo */ 3642 /* Oaktrail */
3631 { PCI_DEVICE(0x8086, 0x080a), 3643 { PCI_DEVICE(0x8086, 0x080a),
3632 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP | 3644 .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
3633 AZX_DCAPS_BUFSIZE | AZX_DCAPS_POSFIX_LPIB }, /* Oaktrail */
3634 /* ICH */ 3645 /* ICH */
3635 { PCI_DEVICE(0x8086, 0x2668), 3646 { PCI_DEVICE(0x8086, 0x2668),
3636 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_OLD_SSYNC | 3647 .driver_data = AZX_DRIVER_ICH | AZX_DCAPS_OLD_SSYNC |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 1b3b4ee3e8a7..85236da79046 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -714,9 +714,10 @@ static void hdmi_setup_fake_chmap(unsigned char *map, int ca)
714 714
715static void hdmi_setup_channel_mapping(struct hda_codec *codec, 715static void hdmi_setup_channel_mapping(struct hda_codec *codec,
716 hda_nid_t pin_nid, bool non_pcm, int ca, 716 hda_nid_t pin_nid, bool non_pcm, int ca,
717 int channels, unsigned char *map) 717 int channels, unsigned char *map,
718 bool chmap_set)
718{ 719{
719 if (!non_pcm && map) { 720 if (!non_pcm && chmap_set) {
720 hdmi_manual_setup_channel_mapping(codec, pin_nid, 721 hdmi_manual_setup_channel_mapping(codec, pin_nid,
721 channels, map); 722 channels, map);
722 } else { 723 } else {
@@ -905,7 +906,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
905 pin_nid, 906 pin_nid,
906 channels); 907 channels);
907 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, 908 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
908 channels, per_pin->chmap); 909 channels, per_pin->chmap,
910 per_pin->chmap_set);
909 hdmi_stop_infoframe_trans(codec, pin_nid); 911 hdmi_stop_infoframe_trans(codec, pin_nid);
910 hdmi_fill_audio_infoframe(codec, pin_nid, 912 hdmi_fill_audio_infoframe(codec, pin_nid,
911 ai.bytes, sizeof(ai)); 913 ai.bytes, sizeof(ai));
@@ -915,7 +917,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
915 * accordingly */ 917 * accordingly */
916 if (per_pin->non_pcm != non_pcm) 918 if (per_pin->non_pcm != non_pcm)
917 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, 919 hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca,
918 channels, per_pin->chmap); 920 channels, per_pin->chmap,
921 per_pin->chmap_set);
919 } 922 }
920 923
921 per_pin->non_pcm = non_pcm; 924 per_pin->non_pcm = non_pcm;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index dc75607fc05b..de512c52fa96 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2363,6 +2363,7 @@ static const struct hda_model_fixup alc268_fixup_models[] = {
2363}; 2363};
2364 2364
2365static const struct snd_pci_quirk alc268_fixup_tbl[] = { 2365static const struct snd_pci_quirk alc268_fixup_tbl[] = {
2366 SND_PCI_QUIRK(0x1025, 0x015b, "Acer AOA 150 (ZG5)", ALC268_FIXUP_INV_DMIC),
2366 /* below is codec SSID since multiple Toshiba laptops have the 2367 /* below is codec SSID since multiple Toshiba laptops have the
2367 * same PCI SSID 1179:ff00 2368 * same PCI SSID 1179:ff00
2368 */ 2369 */
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 1d8bb5917594..ef62c435848e 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -685,7 +685,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
685 } 685 }
686 sr_val = i; 686 sr_val = i;
687 687
688 lrclk = snd_soc_params_to_bclk(params) / params_rate(params); 688 lrclk = rates[bclk] / params_rate(params);
689 689
690 arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n", 690 arizona_aif_dbg(dai, "BCLK %dHz LRCLK %dHz\n",
691 rates[bclk], rates[bclk] / lrclk); 691 rates[bclk], rates[bclk] / lrclk);
@@ -1082,6 +1082,9 @@ int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq,
1082 id, ret); 1082 id, ret);
1083 } 1083 }
1084 1084
1085 regmap_update_bits(arizona->regmap, fll->base + 1,
1086 ARIZONA_FLL1_FREERUN, 0);
1087
1085 return 0; 1088 return 0;
1086} 1089}
1087EXPORT_SYMBOL_GPL(arizona_init_fll); 1090EXPORT_SYMBOL_GPL(arizona_init_fll);
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index e6cefe1ac677..d8c65f574658 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -1019,8 +1019,6 @@ static const char *wm2200_mixer_texts[] = {
1019 "EQR", 1019 "EQR",
1020 "LHPF1", 1020 "LHPF1",
1021 "LHPF2", 1021 "LHPF2",
1022 "LHPF3",
1023 "LHPF4",
1024 "DSP1.1", 1022 "DSP1.1",
1025 "DSP1.2", 1023 "DSP1.2",
1026 "DSP1.3", 1024 "DSP1.3",
@@ -1053,7 +1051,6 @@ static int wm2200_mixer_values[] = {
1053 0x25, 1051 0x25,
1054 0x50, /* EQ */ 1052 0x50, /* EQ */
1055 0x51, 1053 0x51,
1056 0x52,
1057 0x60, /* LHPF1 */ 1054 0x60, /* LHPF1 */
1058 0x61, /* LHPF2 */ 1055 0x61, /* LHPF2 */
1059 0x68, /* DSP1 */ 1056 0x68, /* DSP1 */
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 7a9048dad1cd..1440b3f9b7bb 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -896,8 +896,7 @@ static const unsigned int wm5102_aec_loopback_values[] = {
896 896
897static const struct soc_enum wm5102_aec_loopback = 897static const struct soc_enum wm5102_aec_loopback =
898 SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1, 898 SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1,
899 ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 899 ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
900 ARIZONA_AEC_LOOPBACK_SRC_MASK,
901 ARRAY_SIZE(wm5102_aec_loopback_texts), 900 ARRAY_SIZE(wm5102_aec_loopback_texts),
902 wm5102_aec_loopback_texts, 901 wm5102_aec_loopback_texts,
903 wm5102_aec_loopback_values); 902 wm5102_aec_loopback_values);
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index ae80c8c28536..7a090968c4f7 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -344,8 +344,7 @@ static const unsigned int wm5110_aec_loopback_values[] = {
344 344
345static const struct soc_enum wm5110_aec_loopback = 345static const struct soc_enum wm5110_aec_loopback =
346 SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1, 346 SOC_VALUE_ENUM_SINGLE(ARIZONA_DAC_AEC_CONTROL_1,
347 ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 347 ARIZONA_AEC_LOOPBACK_SRC_SHIFT, 0xf,
348 ARIZONA_AEC_LOOPBACK_SRC_MASK,
349 ARRAY_SIZE(wm5110_aec_loopback_texts), 348 ARRAY_SIZE(wm5110_aec_loopback_texts),
350 wm5110_aec_loopback_texts, 349 wm5110_aec_loopback_texts,
351 wm5110_aec_loopback_values); 350 wm5110_aec_loopback_values);
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 7b198c38f3ef..b6b654837585 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -324,7 +324,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
324 324
325 if (reg) { 325 if (reg) {
326 buf = kmemdup(region->data, le32_to_cpu(region->len), 326 buf = kmemdup(region->data, le32_to_cpu(region->len),
327 GFP_KERNEL); 327 GFP_KERNEL | GFP_DMA);
328 if (!buf) { 328 if (!buf) {
329 adsp_err(dsp, "Out of memory\n"); 329 adsp_err(dsp, "Out of memory\n");
330 return -ENOMEM; 330 return -ENOMEM;
@@ -396,7 +396,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
396 hdr = (void*)&firmware->data[0]; 396 hdr = (void*)&firmware->data[0];
397 if (memcmp(hdr->magic, "WMDR", 4) != 0) { 397 if (memcmp(hdr->magic, "WMDR", 4) != 0) {
398 adsp_err(dsp, "%s: invalid magic\n", file); 398 adsp_err(dsp, "%s: invalid magic\n", file);
399 return -EINVAL; 399 goto out_fw;
400 } 400 }
401 401
402 adsp_dbg(dsp, "%s: v%d.%d.%d\n", file, 402 adsp_dbg(dsp, "%s: v%d.%d.%d\n", file,
@@ -439,7 +439,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)
439 439
440 if (reg) { 440 if (reg) {
441 buf = kmemdup(blk->data, le32_to_cpu(blk->len), 441 buf = kmemdup(blk->data, le32_to_cpu(blk->len),
442 GFP_KERNEL); 442 GFP_KERNEL | GFP_DMA);
443 if (!buf) { 443 if (!buf) {
444 adsp_err(dsp, "Out of memory\n"); 444 adsp_err(dsp, "Out of memory\n");
445 return -ENOMEM; 445 return -ENOMEM;
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 3b98159d9645..a210c8d7b4bc 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -108,18 +108,13 @@ if SND_IMX_SOC
108config SND_SOC_IMX_SSI 108config SND_SOC_IMX_SSI
109 tristate 109 tristate
110 110
111config SND_SOC_IMX_PCM
112 tristate
113
114config SND_SOC_IMX_PCM_FIQ 111config SND_SOC_IMX_PCM_FIQ
115 bool 112 tristate
116 select FIQ 113 select FIQ
117 select SND_SOC_IMX_PCM
118 114
119config SND_SOC_IMX_PCM_DMA 115config SND_SOC_IMX_PCM_DMA
120 bool 116 tristate
121 select SND_SOC_DMAENGINE_PCM 117 select SND_SOC_DMAENGINE_PCM
122 select SND_SOC_IMX_PCM
123 118
124config SND_SOC_IMX_AUDMUX 119config SND_SOC_IMX_AUDMUX
125 tristate 120 tristate
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index afd34794db53..ec1457915d7c 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -41,7 +41,10 @@ endif
41obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o 41obj-$(CONFIG_SND_SOC_IMX_SSI) += snd-soc-imx-ssi.o
42obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o 42obj-$(CONFIG_SND_SOC_IMX_AUDMUX) += snd-soc-imx-audmux.o
43 43
44obj-$(CONFIG_SND_SOC_IMX_PCM) += snd-soc-imx-pcm.o 44obj-$(CONFIG_SND_SOC_IMX_PCM_FIQ) += snd-soc-imx-pcm-fiq.o
45snd-soc-imx-pcm-fiq-y := imx-pcm-fiq.o imx-pcm.o
46obj-$(CONFIG_SND_SOC_IMX_PCM_DMA) += snd-soc-imx-pcm-dma.o
47snd-soc-imx-pcm-dma-y := imx-pcm-dma.o imx-pcm.o
45 48
46# i.MX Machine Support 49# i.MX Machine Support
47snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o 50snd-soc-eukrea-tlv320-objs := eukrea-tlv320.o
diff --git a/sound/soc/fsl/imx-pcm.c b/sound/soc/fsl/imx-pcm.c
index d5cd9eff3b48..0c9f188ddc68 100644
--- a/sound/soc/fsl/imx-pcm.c
+++ b/sound/soc/fsl/imx-pcm.c
@@ -31,7 +31,6 @@ int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
31 runtime->dma_bytes); 31 runtime->dma_bytes);
32 return ret; 32 return ret;
33} 33}
34EXPORT_SYMBOL_GPL(snd_imx_pcm_mmap);
35 34
36static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) 35static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
37{ 36{
@@ -80,7 +79,6 @@ int imx_pcm_new(struct snd_soc_pcm_runtime *rtd)
80out: 79out:
81 return ret; 80 return ret;
82} 81}
83EXPORT_SYMBOL_GPL(imx_pcm_new);
84 82
85void imx_pcm_free(struct snd_pcm *pcm) 83void imx_pcm_free(struct snd_pcm *pcm)
86{ 84{
@@ -102,7 +100,6 @@ void imx_pcm_free(struct snd_pcm *pcm)
102 buf->area = NULL; 100 buf->area = NULL;
103 } 101 }
104} 102}
105EXPORT_SYMBOL_GPL(imx_pcm_free);
106 103
107MODULE_DESCRIPTION("Freescale i.MX PCM driver"); 104MODULE_DESCRIPTION("Freescale i.MX PCM driver");
108MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); 105MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1e36bc81e5af..258acadb9e7d 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1023,7 +1023,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
1023 1023
1024 if (SND_SOC_DAPM_EVENT_ON(event)) { 1024 if (SND_SOC_DAPM_EVENT_ON(event)) {
1025 if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) { 1025 if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
1026 ret = regulator_allow_bypass(w->regulator, true); 1026 ret = regulator_allow_bypass(w->regulator, false);
1027 if (ret != 0) 1027 if (ret != 0)
1028 dev_warn(w->dapm->dev, 1028 dev_warn(w->dapm->dev,
1029 "ASoC: Failed to bypass %s: %d\n", 1029 "ASoC: Failed to bypass %s: %d\n",
@@ -1033,7 +1033,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
1033 return regulator_enable(w->regulator); 1033 return regulator_enable(w->regulator);
1034 } else { 1034 } else {
1035 if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) { 1035 if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
1036 ret = regulator_allow_bypass(w->regulator, false); 1036 ret = regulator_allow_bypass(w->regulator, true);
1037 if (ret != 0) 1037 if (ret != 0)
1038 dev_warn(w->dapm->dev, 1038 dev_warn(w->dapm->dev,
1039 "ASoC: Failed to unbypass %s: %d\n", 1039 "ASoC: Failed to unbypass %s: %d\n",
@@ -3039,6 +3039,14 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
3039 w->name, ret); 3039 w->name, ret);
3040 return NULL; 3040 return NULL;
3041 } 3041 }
3042
3043 if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
3044 ret = regulator_allow_bypass(w->regulator, true);
3045 if (ret != 0)
3046 dev_warn(w->dapm->dev,
3047 "ASoC: Failed to unbypass %s: %d\n",
3048 w->name, ret);
3049 }
3042 break; 3050 break;
3043 case snd_soc_dapm_clock_supply: 3051 case snd_soc_dapm_clock_supply:
3044#ifdef CONFIG_CLKDEV_LOOKUP 3052#ifdef CONFIG_CLKDEV_LOOKUP
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ed4d89c8b52a..e90daf8cdaa8 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1331,16 +1331,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void
1331 } 1331 }
1332 channels = (hdr->bLength - 7) / csize - 1; 1332 channels = (hdr->bLength - 7) / csize - 1;
1333 bmaControls = hdr->bmaControls; 1333 bmaControls = hdr->bmaControls;
1334 if (hdr->bLength < 7 + csize) {
1335 snd_printk(KERN_ERR "usbaudio: unit %u: "
1336 "invalid UAC_FEATURE_UNIT descriptor\n",
1337 unitid);
1338 return -EINVAL;
1339 }
1334 } else { 1340 } else {
1335 struct uac2_feature_unit_descriptor *ftr = _ftr; 1341 struct uac2_feature_unit_descriptor *ftr = _ftr;
1336 csize = 4; 1342 csize = 4;
1337 channels = (hdr->bLength - 6) / 4 - 1; 1343 channels = (hdr->bLength - 6) / 4 - 1;
1338 bmaControls = ftr->bmaControls; 1344 bmaControls = ftr->bmaControls;
1339 } 1345 if (hdr->bLength < 6 + csize) {
1340 1346 snd_printk(KERN_ERR "usbaudio: unit %u: "
1341 if (hdr->bLength < 7 || !csize || hdr->bLength < 7 + csize) { 1347 "invalid UAC_FEATURE_UNIT descriptor\n",
1342 snd_printk(KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n", unitid); 1348 unitid);
1343 return -EINVAL; 1349 return -EINVAL;
1350 }
1344 } 1351 }
1345 1352
1346 /* parse the source unit */ 1353 /* parse the source unit */
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 64d25a7a4d59..820580a6dfc3 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -1750,7 +1750,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
1750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { 1750 .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1751 /* .vendor_name = "Roland", */ 1751 /* .vendor_name = "Roland", */
1752 /* .product_name = "A-PRO", */ 1752 /* .product_name = "A-PRO", */
1753 .ifnum = 1, 1753 .ifnum = 0,
1754 .type = QUIRK_MIDI_FIXED_ENDPOINT, 1754 .type = QUIRK_MIDI_FIXED_ENDPOINT,
1755 .data = & (const struct snd_usb_midi_endpoint_info) { 1755 .data = & (const struct snd_usb_midi_endpoint_info) {
1756 .out_cables = 0x0003, 1756 .out_cables = 0x0003,