aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-18 13:48:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-18 13:48:48 -0400
commitc66bce9b655aac0869254dcaefd2365145477f53 (patch)
treeac972b97de26cd32a38463dcbe675851e88279e1
parent61f98b0fca802d7e0191072606519e2230a6226d (diff)
parent256ca9c3ad5013ff8a8f165e5a82fab437628c8e (diff)
Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Except for a slightly big OMAP changes, all rest are small, mostly boring changes; all either 3.11 regression fixes or stable materials. - ASoC OMAP fixes due to non-DT OMAP4 removals - Other ASoC driver changes (sglt5000, wm8978, wm8948, samsung) - Fix missing locking for snd_pcm_stop() calls in many drivers - Fix the blocking request_module() in OSS sequencer - Fix old OSS vwsnd driver builds - Add a new HD-audio HDMI codec ID" * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: seq-oss: Initialize MIDI clients asynchronously ALSA: hda - Add new GPU codec ID to snd-hda staging: line6: Fix unlocked snd_pcm_stop() call [media] saa7134: Fix unlocked snd_pcm_stop() call ASoC: s6000: Fix unlocked snd_pcm_stop() call ASoC: atmel: Fix unlocked snd_pcm_stop() call ALSA: pxa2xx: Fix unlocked snd_pcm_stop() call ALSA: usx2y: Fix unlocked snd_pcm_stop() call ALSA: ua101: Fix unlocked snd_pcm_stop() call ALSA: 6fire: Fix unlocked snd_pcm_stop() call ALSA: atiixp: Fix unlocked snd_pcm_stop() call ALSA: asihpi: Fix unlocked snd_pcm_stop() call sound: oss/vwsnd: Always define vwsnd_mutex sound: oss/vwsnd: Add missing inclusion of linux/delay.h ASoC: wm8978: enable symmetric rates ASoC: omap-mcbsp: Use different method for DMA request when booted with DT ASoC: omap-dmic: Do not use platform_get_resource_byname() for DMA ASoC: omap-mcpdm: Do not use platform_get_resource_byname() for DMA ASoC: omap-pcm: Request the DMA channel differently when DT is involved ASoC: Samsung: Set RFS and BFS in slave mode ...
-rw-r--r--drivers/media/pci/saa7134/saa7134-alsa.c2
-rw-r--r--drivers/staging/line6/pcm.c5
-rw-r--r--sound/arm/pxa2xx-pcm-lib.c2
-rw-r--r--sound/core/seq/oss/seq_oss_init.c16
-rw-r--r--sound/core/seq/oss/seq_oss_midi.c2
-rw-r--r--sound/oss/vwsnd.c4
-rw-r--r--sound/pci/asihpi/asihpi.c3
-rw-r--r--sound/pci/atiixp.c2
-rw-r--r--sound/pci/atiixp_modem.c2
-rw-r--r--sound/pci/hda/patch_hdmi.c2
-rw-r--r--sound/soc/atmel/atmel-pcm-dma.c2
-rw-r--r--sound/soc/codecs/sgtl5000.c2
-rw-r--r--sound/soc/codecs/sgtl5000.h2
-rw-r--r--sound/soc/codecs/wm8978.c1
-rw-r--r--sound/soc/codecs/wm8994.c4
-rw-r--r--sound/soc/omap/mcbsp.c39
-rw-r--r--sound/soc/omap/omap-dmic.c11
-rw-r--r--sound/soc/omap/omap-mcpdm.c16
-rw-r--r--sound/soc/omap/omap-pcm.c17
-rw-r--r--sound/soc/s6000/s6000-pcm.c2
-rw-r--r--sound/soc/samsung/i2s.c8
-rw-r--r--sound/usb/6fire/pcm.c12
-rw-r--r--sound/usb/misc/ua101.c14
-rw-r--r--sound/usb/usx2y/usbusx2yaudio.c4
24 files changed, 110 insertions, 64 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c b/drivers/media/pci/saa7134/saa7134-alsa.c
index 10460fd3ce39..dbcdfbf8aed0 100644
--- a/drivers/media/pci/saa7134/saa7134-alsa.c
+++ b/drivers/media/pci/saa7134/saa7134-alsa.c
@@ -172,7 +172,9 @@ static void saa7134_irq_alsa_done(struct saa7134_dev *dev,
172 dprintk("irq: overrun [full=%d/%d] - Blocks in %d\n",dev->dmasound.read_count, 172 dprintk("irq: overrun [full=%d/%d] - Blocks in %d\n",dev->dmasound.read_count,
173 dev->dmasound.bufsize, dev->dmasound.blocks); 173 dev->dmasound.bufsize, dev->dmasound.blocks);
174 spin_unlock(&dev->slock); 174 spin_unlock(&dev->slock);
175 snd_pcm_stream_lock(dev->dmasound.substream);
175 snd_pcm_stop(dev->dmasound.substream,SNDRV_PCM_STATE_XRUN); 176 snd_pcm_stop(dev->dmasound.substream,SNDRV_PCM_STATE_XRUN);
177 snd_pcm_stream_unlock(dev->dmasound.substream);
176 return; 178 return;
177 } 179 }
178 180
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 4795f1284906..0dd08ef51398 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -392,8 +392,11 @@ static int snd_line6_pcm_free(struct snd_device *device)
392*/ 392*/
393static void pcm_disconnect_substream(struct snd_pcm_substream *substream) 393static void pcm_disconnect_substream(struct snd_pcm_substream *substream)
394{ 394{
395 if (substream->runtime && snd_pcm_running(substream)) 395 if (substream->runtime && snd_pcm_running(substream)) {
396 snd_pcm_stream_lock_irq(substream);
396 snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED); 397 snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
398 snd_pcm_stream_unlock_irq(substream);
399 }
397} 400}
398 401
399/* 402/*
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index 76e0d5695075..823359ed95e1 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -166,7 +166,9 @@ void pxa2xx_pcm_dma_irq(int dma_ch, void *dev_id)
166 } else { 166 } else {
167 printk(KERN_ERR "%s: DMA error on channel %d (DCSR=%#x)\n", 167 printk(KERN_ERR "%s: DMA error on channel %d (DCSR=%#x)\n",
168 rtd->params->name, dma_ch, dcsr); 168 rtd->params->name, dma_ch, dcsr);
169 snd_pcm_stream_lock(substream);
169 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); 170 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
171 snd_pcm_stream_unlock(substream);
170 } 172 }
171} 173}
172EXPORT_SYMBOL(pxa2xx_pcm_dma_irq); 174EXPORT_SYMBOL(pxa2xx_pcm_dma_irq);
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index e3cb46fef2c7..b3f39b5ed742 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -31,6 +31,7 @@
31#include <linux/export.h> 31#include <linux/export.h>
32#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
33#include <linux/slab.h> 33#include <linux/slab.h>
34#include <linux/workqueue.h>
34 35
35/* 36/*
36 * common variables 37 * common variables
@@ -60,6 +61,14 @@ static void free_devinfo(void *private);
60#define call_ctl(type,rec) snd_seq_kernel_client_ctl(system_client, type, rec) 61#define call_ctl(type,rec) snd_seq_kernel_client_ctl(system_client, type, rec)
61 62
62 63
64/* call snd_seq_oss_midi_lookup_ports() asynchronously */
65static void async_call_lookup_ports(struct work_struct *work)
66{
67 snd_seq_oss_midi_lookup_ports(system_client);
68}
69
70static DECLARE_WORK(async_lookup_work, async_call_lookup_ports);
71
63/* 72/*
64 * create sequencer client for OSS sequencer 73 * create sequencer client for OSS sequencer
65 */ 74 */
@@ -85,9 +94,6 @@ snd_seq_oss_create_client(void)
85 system_client = rc; 94 system_client = rc;
86 debug_printk(("new client = %d\n", rc)); 95 debug_printk(("new client = %d\n", rc));
87 96
88 /* look up midi devices */
89 snd_seq_oss_midi_lookup_ports(system_client);
90
91 /* create annoucement receiver port */ 97 /* create annoucement receiver port */
92 memset(port, 0, sizeof(*port)); 98 memset(port, 0, sizeof(*port));
93 strcpy(port->name, "Receiver"); 99 strcpy(port->name, "Receiver");
@@ -115,6 +121,9 @@ snd_seq_oss_create_client(void)
115 } 121 }
116 rc = 0; 122 rc = 0;
117 123
124 /* look up midi devices */
125 schedule_work(&async_lookup_work);
126
118 __error: 127 __error:
119 kfree(port); 128 kfree(port);
120 return rc; 129 return rc;
@@ -160,6 +169,7 @@ receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic
160int 169int
161snd_seq_oss_delete_client(void) 170snd_seq_oss_delete_client(void)
162{ 171{
172 cancel_work_sync(&async_lookup_work);
163 if (system_client >= 0) 173 if (system_client >= 0)
164 snd_seq_delete_kernel_client(system_client); 174 snd_seq_delete_kernel_client(system_client);
165 175
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index 677dc84590c7..862d84893ee8 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -72,7 +72,7 @@ static int send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
72 * look up the existing ports 72 * look up the existing ports
73 * this looks a very exhausting job. 73 * this looks a very exhausting job.
74 */ 74 */
75int __init 75int
76snd_seq_oss_midi_lookup_ports(int client) 76snd_seq_oss_midi_lookup_ports(int client)
77{ 77{
78 struct snd_seq_client_info *clinfo; 78 struct snd_seq_client_info *clinfo;
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c
index 7e814a5c3677..4bbcc0fcd4eb 100644
--- a/sound/oss/vwsnd.c
+++ b/sound/oss/vwsnd.c
@@ -149,17 +149,19 @@
149#include <linux/interrupt.h> 149#include <linux/interrupt.h>
150#include <linux/mutex.h> 150#include <linux/mutex.h>
151#include <linux/slab.h> 151#include <linux/slab.h>
152#include <linux/delay.h>
152 153
153#include <asm/visws/cobalt.h> 154#include <asm/visws/cobalt.h>
154 155
155#include "sound_config.h" 156#include "sound_config.h"
156 157
158static DEFINE_MUTEX(vwsnd_mutex);
159
157/*****************************************************************************/ 160/*****************************************************************************/
158/* debug stuff */ 161/* debug stuff */
159 162
160#ifdef VWSND_DEBUG 163#ifdef VWSND_DEBUG
161 164
162static DEFINE_MUTEX(vwsnd_mutex);
163static int shut_up = 1; 165static int shut_up = 1;
164 166
165/* 167/*
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index 185d54a5cb1a..dc632cdc3870 100644
--- a/sound/pci/asihpi/asihpi.c
+++ b/sound/pci/asihpi/asihpi.c
@@ -769,7 +769,10 @@ static void snd_card_asihpi_timer_function(unsigned long data)
769 s->number); 769 s->number);
770 ds->drained_count++; 770 ds->drained_count++;
771 if (ds->drained_count > 20) { 771 if (ds->drained_count > 20) {
772 unsigned long flags;
773 snd_pcm_stream_lock_irqsave(s, flags);
772 snd_pcm_stop(s, SNDRV_PCM_STATE_XRUN); 774 snd_pcm_stop(s, SNDRV_PCM_STATE_XRUN);
775 snd_pcm_stream_unlock_irqrestore(s, flags);
773 continue; 776 continue;
774 } 777 }
775 } else { 778 } else {
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index fe4c61bdb8ba..f6dec3ea371f 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -689,7 +689,9 @@ static void snd_atiixp_xrun_dma(struct atiixp *chip, struct atiixp_dma *dma)
689 if (! dma->substream || ! dma->running) 689 if (! dma->substream || ! dma->running)
690 return; 690 return;
691 snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type); 691 snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type);
692 snd_pcm_stream_lock(dma->substream);
692 snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); 693 snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN);
694 snd_pcm_stream_unlock(dma->substream);
693} 695}
694 696
695/* 697/*
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index cf29b9a1d65d..289563ecb6dd 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -638,7 +638,9 @@ static void snd_atiixp_xrun_dma(struct atiixp_modem *chip,
638 if (! dma->substream || ! dma->running) 638 if (! dma->substream || ! dma->running)
639 return; 639 return;
640 snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type); 640 snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type);
641 snd_pcm_stream_lock(dma->substream);
641 snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); 642 snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN);
643 snd_pcm_stream_unlock(dma->substream);
642} 644}
643 645
644/* 646/*
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 540bdef2f904..030ca8652a1c 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2622,6 +2622,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = {
2622{ .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_generic_hdmi }, 2622{ .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_generic_hdmi },
2623{ .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_generic_hdmi }, 2623{ .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_generic_hdmi },
2624{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_generic_hdmi }, 2624{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_generic_hdmi },
2625{ .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_generic_hdmi },
2625{ .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, 2626{ .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch },
2626{ .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, 2627{ .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch },
2627{ .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi }, 2628{ .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi },
@@ -2674,6 +2675,7 @@ MODULE_ALIAS("snd-hda-codec-id:10de0042");
2674MODULE_ALIAS("snd-hda-codec-id:10de0043"); 2675MODULE_ALIAS("snd-hda-codec-id:10de0043");
2675MODULE_ALIAS("snd-hda-codec-id:10de0044"); 2676MODULE_ALIAS("snd-hda-codec-id:10de0044");
2676MODULE_ALIAS("snd-hda-codec-id:10de0051"); 2677MODULE_ALIAS("snd-hda-codec-id:10de0051");
2678MODULE_ALIAS("snd-hda-codec-id:10de0060");
2677MODULE_ALIAS("snd-hda-codec-id:10de0067"); 2679MODULE_ALIAS("snd-hda-codec-id:10de0067");
2678MODULE_ALIAS("snd-hda-codec-id:10de8001"); 2680MODULE_ALIAS("snd-hda-codec-id:10de8001");
2679MODULE_ALIAS("snd-hda-codec-id:11069f80"); 2681MODULE_ALIAS("snd-hda-codec-id:11069f80");
diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 1d38fd0bc4e2..d12826526798 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -81,7 +81,9 @@ static void atmel_pcm_dma_irq(u32 ssc_sr,
81 81
82 /* stop RX and capture: will be enabled again at restart */ 82 /* stop RX and capture: will be enabled again at restart */
83 ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_disable); 83 ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_disable);
84 snd_pcm_stream_lock(substream);
84 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); 85 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
86 snd_pcm_stream_unlock(substream);
85 87
86 /* now drain RHR and read status to remove xrun condition */ 88 /* now drain RHR and read status to remove xrun condition */
87 ssc_readx(prtd->ssc->regs, SSC_RHR); 89 ssc_readx(prtd->ssc->regs, SSC_RHR);
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d441559dc92c..d659d3adcfb3 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -38,7 +38,7 @@
38static const struct reg_default sgtl5000_reg_defaults[] = { 38static const struct reg_default sgtl5000_reg_defaults[] = {
39 { SGTL5000_CHIP_CLK_CTRL, 0x0008 }, 39 { SGTL5000_CHIP_CLK_CTRL, 0x0008 },
40 { SGTL5000_CHIP_I2S_CTRL, 0x0010 }, 40 { SGTL5000_CHIP_I2S_CTRL, 0x0010 },
41 { SGTL5000_CHIP_SSS_CTRL, 0x0008 }, 41 { SGTL5000_CHIP_SSS_CTRL, 0x0010 },
42 { SGTL5000_CHIP_DAC_VOL, 0x3c3c }, 42 { SGTL5000_CHIP_DAC_VOL, 0x3c3c },
43 { SGTL5000_CHIP_PAD_STRENGTH, 0x015f }, 43 { SGTL5000_CHIP_PAD_STRENGTH, 0x015f },
44 { SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 }, 44 { SGTL5000_CHIP_ANA_HP_CTRL, 0x1818 },
diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h
index 4b69229a9818..2f8c88931f69 100644
--- a/sound/soc/codecs/sgtl5000.h
+++ b/sound/soc/codecs/sgtl5000.h
@@ -347,7 +347,7 @@
347#define SGTL5000_PLL_INT_DIV_MASK 0xf800 347#define SGTL5000_PLL_INT_DIV_MASK 0xf800
348#define SGTL5000_PLL_INT_DIV_SHIFT 11 348#define SGTL5000_PLL_INT_DIV_SHIFT 11
349#define SGTL5000_PLL_INT_DIV_WIDTH 5 349#define SGTL5000_PLL_INT_DIV_WIDTH 5
350#define SGTL5000_PLL_FRAC_DIV_MASK 0x0700 350#define SGTL5000_PLL_FRAC_DIV_MASK 0x07ff
351#define SGTL5000_PLL_FRAC_DIV_SHIFT 0 351#define SGTL5000_PLL_FRAC_DIV_SHIFT 0
352#define SGTL5000_PLL_FRAC_DIV_WIDTH 11 352#define SGTL5000_PLL_FRAC_DIV_WIDTH 11
353 353
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index 029f31c8e703..d8fc531c0e59 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -921,6 +921,7 @@ static struct snd_soc_dai_driver wm8978_dai = {
921 .formats = WM8978_FORMATS, 921 .formats = WM8978_FORMATS,
922 }, 922 },
923 .ops = &wm8978_dai_ops, 923 .ops = &wm8978_dai_ops,
924 .symmetric_rates = 1,
924}; 925};
925 926
926static int wm8978_suspend(struct snd_soc_codec *codec) 927static int wm8978_suspend(struct snd_soc_codec *codec)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1d4b1ec66e36..ba832b77c543 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3852,8 +3852,6 @@ static void wm8958_mic_work(struct work_struct *work)
3852 mic_complete_work.work); 3852 mic_complete_work.work);
3853 struct snd_soc_codec *codec = wm8994->hubs.codec; 3853 struct snd_soc_codec *codec = wm8994->hubs.codec;
3854 3854
3855 dev_crit(codec->dev, "MIC WORK %x\n", wm8994->mic_status);
3856
3857 pm_runtime_get_sync(codec->dev); 3855 pm_runtime_get_sync(codec->dev);
3858 3856
3859 mutex_lock(&wm8994->accdet_lock); 3857 mutex_lock(&wm8994->accdet_lock);
@@ -3863,8 +3861,6 @@ static void wm8958_mic_work(struct work_struct *work)
3863 mutex_unlock(&wm8994->accdet_lock); 3861 mutex_unlock(&wm8994->accdet_lock);
3864 3862
3865 pm_runtime_put(codec->dev); 3863 pm_runtime_put(codec->dev);
3866
3867 dev_crit(codec->dev, "MIC WORK %x DONE\n", wm8994->mic_status);
3868} 3864}
3869 3865
3870static irqreturn_t wm8958_mic_irq(int irq, void *data) 3866static irqreturn_t wm8958_mic_irq(int irq, void *data)
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index eb68c7db1cf3..361e4c03646e 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -1012,28 +1012,33 @@ int omap_mcbsp_init(struct platform_device *pdev)
1012 } 1012 }
1013 } 1013 }
1014 1014
1015 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); 1015 if (!pdev->dev.of_node) {
1016 if (!res) { 1016 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx");
1017 dev_err(&pdev->dev, "invalid rx DMA channel\n"); 1017 if (!res) {
1018 return -ENODEV; 1018 dev_err(&pdev->dev, "invalid tx DMA channel\n");
1019 } 1019 return -ENODEV;
1020 /* RX DMA request number, and port address configuration */ 1020 }
1021 mcbsp->dma_req[1] = res->start; 1021 mcbsp->dma_req[0] = res->start;
1022 mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1]; 1022 mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
1023 mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
1024 mcbsp->dma_data[1].maxburst = 4;
1025 1023
1026 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); 1024 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
1027 if (!res) { 1025 if (!res) {
1028 dev_err(&pdev->dev, "invalid tx DMA channel\n"); 1026 dev_err(&pdev->dev, "invalid rx DMA channel\n");
1029 return -ENODEV; 1027 return -ENODEV;
1028 }
1029 mcbsp->dma_req[1] = res->start;
1030 mcbsp->dma_data[1].filter_data = &mcbsp->dma_req[1];
1031 } else {
1032 mcbsp->dma_data[0].filter_data = "tx";
1033 mcbsp->dma_data[1].filter_data = "rx";
1030 } 1034 }
1031 /* TX DMA request number, and port address configuration */ 1035
1032 mcbsp->dma_req[0] = res->start;
1033 mcbsp->dma_data[0].filter_data = &mcbsp->dma_req[0];
1034 mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0); 1036 mcbsp->dma_data[0].addr = omap_mcbsp_dma_reg_params(mcbsp, 0);
1035 mcbsp->dma_data[0].maxburst = 4; 1037 mcbsp->dma_data[0].maxburst = 4;
1036 1038
1039 mcbsp->dma_data[1].addr = omap_mcbsp_dma_reg_params(mcbsp, 1);
1040 mcbsp->dma_data[1].maxburst = 4;
1041
1037 mcbsp->fclk = clk_get(&pdev->dev, "fck"); 1042 mcbsp->fclk = clk_get(&pdev->dev, "fck");
1038 if (IS_ERR(mcbsp->fclk)) { 1043 if (IS_ERR(mcbsp->fclk)) {
1039 ret = PTR_ERR(mcbsp->fclk); 1044 ret = PTR_ERR(mcbsp->fclk);
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index 2ad0370146fd..4db1f8e6e172 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -57,7 +57,6 @@ struct omap_dmic {
57 struct mutex mutex; 57 struct mutex mutex;
58 58
59 struct snd_dmaengine_dai_dma_data dma_data; 59 struct snd_dmaengine_dai_dma_data dma_data;
60 unsigned int dma_req;
61}; 60};
62 61
63static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) 62static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val)
@@ -478,15 +477,7 @@ static int asoc_dmic_probe(struct platform_device *pdev)
478 } 477 }
479 dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG; 478 dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG;
480 479
481 res = platform_get_resource(pdev, IORESOURCE_DMA, 0); 480 dmic->dma_data.filter_data = "up_link";
482 if (!res) {
483 dev_err(dmic->dev, "invalid dma resource\n");
484 ret = -ENODEV;
485 goto err_put_clk;
486 }
487
488 dmic->dma_req = res->start;
489 dmic->dma_data.filter_data = &dmic->dma_req;
490 481
491 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); 482 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
492 if (!res) { 483 if (!res) {
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index eb05c7ed6d05..a49dc52f8abc 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -66,7 +66,6 @@ struct omap_mcpdm {
66 bool restart; 66 bool restart;
67 67
68 struct snd_dmaengine_dai_dma_data dma_data[2]; 68 struct snd_dmaengine_dai_dma_data dma_data[2];
69 unsigned int dma_req[2];
70}; 69};
71 70
72/* 71/*
@@ -477,19 +476,8 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
477 mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA; 476 mcpdm->dma_data[0].addr = res->start + MCPDM_REG_DN_DATA;
478 mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA; 477 mcpdm->dma_data[1].addr = res->start + MCPDM_REG_UP_DATA;
479 478
480 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "dn_link"); 479 mcpdm->dma_data[0].filter_data = "dn_link";
481 if (!res) 480 mcpdm->dma_data[1].filter_data = "up_link";
482 return -ENODEV;
483
484 mcpdm->dma_req[0] = res->start;
485 mcpdm->dma_data[0].filter_data = &mcpdm->dma_req[0];
486
487 res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "up_link");
488 if (!res)
489 return -ENODEV;
490
491 mcpdm->dma_req[1] = res->start;
492 mcpdm->dma_data[1].filter_data = &mcpdm->dma_req[1];
493 481
494 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); 482 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
495 if (res == NULL) 483 if (res == NULL)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index c28e042f2208..a11405de86e8 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -113,14 +113,25 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
113{ 113{
114 struct snd_soc_pcm_runtime *rtd = substream->private_data; 114 struct snd_soc_pcm_runtime *rtd = substream->private_data;
115 struct snd_dmaengine_dai_dma_data *dma_data; 115 struct snd_dmaengine_dai_dma_data *dma_data;
116 int ret;
116 117
117 snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware); 118 snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);
118 119
119 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); 120 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
120 121
121 return snd_dmaengine_pcm_open_request_chan(substream, 122 /* DT boot: filter_data is the DMA name */
122 omap_dma_filter_fn, 123 if (rtd->cpu_dai->dev->of_node) {
123 dma_data->filter_data); 124 struct dma_chan *chan;
125
126 chan = dma_request_slave_channel(rtd->cpu_dai->dev,
127 dma_data->filter_data);
128 ret = snd_dmaengine_pcm_open(substream, chan);
129 } else {
130 ret = snd_dmaengine_pcm_open_request_chan(substream,
131 omap_dma_filter_fn,
132 dma_data->filter_data);
133 }
134 return ret;
124} 135}
125 136
126static int omap_pcm_mmap(struct snd_pcm_substream *substream, 137static int omap_pcm_mmap(struct snd_pcm_substream *substream,
diff --git a/sound/soc/s6000/s6000-pcm.c b/sound/soc/s6000/s6000-pcm.c
index 1358c7de2521..d0740a762963 100644
--- a/sound/soc/s6000/s6000-pcm.c
+++ b/sound/soc/s6000/s6000-pcm.c
@@ -128,7 +128,9 @@ static irqreturn_t s6000_pcm_irq(int irq, void *data)
128 substream->runtime && 128 substream->runtime &&
129 snd_pcm_running(substream)) { 129 snd_pcm_running(substream)) {
130 dev_dbg(pcm->dev, "xrun\n"); 130 dev_dbg(pcm->dev, "xrun\n");
131 snd_pcm_stream_lock(substream);
131 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); 132 snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
133 snd_pcm_stream_unlock(substream);
132 ret = IRQ_HANDLED; 134 ret = IRQ_HANDLED;
133 } 135 }
134 136
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 7a1734697434..959c702235c8 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -742,13 +742,13 @@ static int config_setup(struct i2s_dai *i2s)
742 return -EAGAIN; 742 return -EAGAIN;
743 } 743 }
744 744
745 /* Don't bother RFS, BFS & PSR in Slave mode */
746 if (is_slave(i2s))
747 return 0;
748
749 set_bfs(i2s, bfs); 745 set_bfs(i2s, bfs);
750 set_rfs(i2s, rfs); 746 set_rfs(i2s, rfs);
751 747
748 /* Don't bother with PSR in Slave mode */
749 if (is_slave(i2s))
750 return 0;
751
752 if (!(i2s->quirks & QUIRK_NO_MUXPSR)) { 752 if (!(i2s->quirks & QUIRK_NO_MUXPSR)) {
753 psr = i2s->rclk_srcrate / i2s->frmclk / rfs; 753 psr = i2s->rclk_srcrate / i2s->frmclk / rfs;
754 writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR); 754 writel(((psr - 1) << 8) | PSR_PSREN, i2s->addr + I2SPSR);
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c
index c5b9cac37dc4..2aa4e13063a8 100644
--- a/sound/usb/6fire/pcm.c
+++ b/sound/usb/6fire/pcm.c
@@ -639,17 +639,25 @@ int usb6fire_pcm_init(struct sfire_chip *chip)
639void usb6fire_pcm_abort(struct sfire_chip *chip) 639void usb6fire_pcm_abort(struct sfire_chip *chip)
640{ 640{
641 struct pcm_runtime *rt = chip->pcm; 641 struct pcm_runtime *rt = chip->pcm;
642 unsigned long flags;
642 int i; 643 int i;
643 644
644 if (rt) { 645 if (rt) {
645 rt->panic = true; 646 rt->panic = true;
646 647
647 if (rt->playback.instance) 648 if (rt->playback.instance) {
649 snd_pcm_stream_lock_irqsave(rt->playback.instance, flags);
648 snd_pcm_stop(rt->playback.instance, 650 snd_pcm_stop(rt->playback.instance,
649 SNDRV_PCM_STATE_XRUN); 651 SNDRV_PCM_STATE_XRUN);
650 if (rt->capture.instance) 652 snd_pcm_stream_unlock_irqrestore(rt->playback.instance, flags);
653 }
654
655 if (rt->capture.instance) {
656 snd_pcm_stream_lock_irqsave(rt->capture.instance, flags);
651 snd_pcm_stop(rt->capture.instance, 657 snd_pcm_stop(rt->capture.instance,
652 SNDRV_PCM_STATE_XRUN); 658 SNDRV_PCM_STATE_XRUN);
659 snd_pcm_stream_unlock_irqrestore(rt->capture.instance, flags);
660 }
653 661
654 for (i = 0; i < PCM_N_URBS; i++) { 662 for (i = 0; i < PCM_N_URBS; i++) {
655 usb_poison_urb(&rt->in_urbs[i].instance); 663 usb_poison_urb(&rt->in_urbs[i].instance);
diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
index 8b5d2c564e04..509315937f25 100644
--- a/sound/usb/misc/ua101.c
+++ b/sound/usb/misc/ua101.c
@@ -613,14 +613,24 @@ static int start_usb_playback(struct ua101 *ua)
613 613
614static void abort_alsa_capture(struct ua101 *ua) 614static void abort_alsa_capture(struct ua101 *ua)
615{ 615{
616 if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) 616 unsigned long flags;
617
618 if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) {
619 snd_pcm_stream_lock_irqsave(ua->capture.substream, flags);
617 snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN); 620 snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN);
621 snd_pcm_stream_unlock_irqrestore(ua->capture.substream, flags);
622 }
618} 623}
619 624
620static void abort_alsa_playback(struct ua101 *ua) 625static void abort_alsa_playback(struct ua101 *ua)
621{ 626{
622 if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) 627 unsigned long flags;
628
629 if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) {
630 snd_pcm_stream_lock_irqsave(ua->playback.substream, flags);
623 snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN); 631 snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN);
632 snd_pcm_stream_unlock_irqrestore(ua->playback.substream, flags);
633 }
624} 634}
625 635
626static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream, 636static int set_stream_hw(struct ua101 *ua, struct snd_pcm_substream *substream,
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 4967fe9c938d..63fb5219f0f8 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y)
273 struct snd_usX2Y_substream *subs = usX2Y->subs[s]; 273 struct snd_usX2Y_substream *subs = usX2Y->subs[s];
274 if (subs) { 274 if (subs) {
275 if (atomic_read(&subs->state) >= state_PRERUNNING) { 275 if (atomic_read(&subs->state) >= state_PRERUNNING) {
276 unsigned long flags;
277
278 snd_pcm_stream_lock_irqsave(subs->pcm_substream, flags);
276 snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN); 279 snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN);
280 snd_pcm_stream_unlock_irqrestore(subs->pcm_substream, flags);
277 } 281 }
278 for (u = 0; u < NRURBS; u++) { 282 for (u = 0; u < NRURBS; u++) {
279 struct urb *urb = subs->urb[u]; 283 struct urb *urb = subs->urb[u];