aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-pcm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-03 14:25:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-03 14:25:30 -0400
commitf0a221ef47df3cdde2123fe75ce3b61bb7df656d (patch)
treed373fb0659a43eb3c3421db67787d6c95d340aca /sound/soc/davinci/davinci-pcm.c
parent9117703fabe4141dae566d683eeb728f638c9e49 (diff)
parent7fa9742bf7f918293c0b3ffd84167fccbdd42765 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (21 commits) ALSA: usb - Use strlcat() correctly ALSA: Fix invalid __exit in sound/mips/*.c ALSA: hda - Fix / improve ALC66x parser ALSA: ctxfi: Swapped SURROUND-SIDE mute sound: Make keywest_driver static ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs ASoC: fix kconfig order of Blackfin drivers ALSA: hda - Added quirk to enable sound on Toshiba NB200 ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2 ALSA: Don't assume i2c device probing always succeeds ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P ALSA: echoaudio - Re-enable the line-out control for the Mia card ALSA: hda - Resurrect input-source mixer of ALC268 model=acer ALSA: hda - Analog Devices AD1984A add HP Touchsmart model ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist ALSA: hda - CD-audio sound for hda-intel conexant benq laptop ASoC: DaVinci: Correct McASP FIFO initialization ASoC: Davinci: Fix race with cpu_dai->dma_data ASoC: DaVinci: Fix divide by zero error during 1st execution ...
Diffstat (limited to 'sound/soc/davinci/davinci-pcm.c')
-rw-r--r--sound/soc/davinci/davinci-pcm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 2f7da49ed34f..c73a915f233f 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -126,16 +126,9 @@ static void davinci_pcm_dma_irq(unsigned lch, u16 ch_status, void *data)
126static int davinci_pcm_dma_request(struct snd_pcm_substream *substream) 126static int davinci_pcm_dma_request(struct snd_pcm_substream *substream)
127{ 127{
128 struct davinci_runtime_data *prtd = substream->runtime->private_data; 128 struct davinci_runtime_data *prtd = substream->runtime->private_data;
129 struct snd_soc_pcm_runtime *rtd = substream->private_data;
130 struct davinci_pcm_dma_params *dma_data = rtd->dai->cpu_dai->dma_data;
131 struct edmacc_param p_ram; 129 struct edmacc_param p_ram;
132 int ret; 130 int ret;
133 131
134 if (!dma_data)
135 return -ENODEV;
136
137 prtd->params = dma_data;
138
139 /* Request master DMA channel */ 132 /* Request master DMA channel */
140 ret = edma_alloc_channel(prtd->params->channel, 133 ret = edma_alloc_channel(prtd->params->channel,
141 davinci_pcm_dma_irq, substream, 134 davinci_pcm_dma_irq, substream,
@@ -244,6 +237,11 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
244 struct snd_pcm_runtime *runtime = substream->runtime; 237 struct snd_pcm_runtime *runtime = substream->runtime;
245 struct davinci_runtime_data *prtd; 238 struct davinci_runtime_data *prtd;
246 int ret = 0; 239 int ret = 0;
240 struct snd_soc_pcm_runtime *rtd = substream->private_data;
241 struct davinci_pcm_dma_params *pa = rtd->dai->cpu_dai->private_data;
242 struct davinci_pcm_dma_params *params = &pa[substream->stream];
243 if (!params)
244 return -ENODEV;
247 245
248 snd_soc_set_runtime_hwparams(substream, &davinci_pcm_hardware); 246 snd_soc_set_runtime_hwparams(substream, &davinci_pcm_hardware);
249 /* ensure that buffer size is a multiple of period size */ 247 /* ensure that buffer size is a multiple of period size */
@@ -257,6 +255,7 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
257 return -ENOMEM; 255 return -ENOMEM;
258 256
259 spin_lock_init(&prtd->lock); 257 spin_lock_init(&prtd->lock);
258 prtd->params = params;
260 259
261 runtime->private_data = prtd; 260 runtime->private_data = prtd;
262 261