diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97-pcm.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c index 4be1a490f4fb..4d25f73274e8 100644 --- a/sound/soc/blackfin/bf5xx-ac97-pcm.c +++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c | |||
@@ -193,8 +193,10 @@ static int bf5xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
193 | switch (cmd) { | 193 | switch (cmd) { |
194 | case SNDRV_PCM_TRIGGER_START: | 194 | case SNDRV_PCM_TRIGGER_START: |
195 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 195 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
196 | #if defined(CONFIG_SND_BF5XX_MMAP_SUPPORT) | ||
196 | bf5xx_mmap_copy(substream, runtime->period_size); | 197 | bf5xx_mmap_copy(substream, runtime->period_size); |
197 | sport->tx_delay_pos = 0; | 198 | sport->tx_delay_pos = 0; |
199 | #endif | ||
198 | sport_tx_start(sport); | 200 | sport_tx_start(sport); |
199 | } else | 201 | } else |
200 | sport_rx_start(sport); | 202 | sport_rx_start(sport); |
@@ -267,23 +269,6 @@ static int bf5xx_pcm_open(struct snd_pcm_substream *substream) | |||
267 | return ret; | 269 | return ret; |
268 | } | 270 | } |
269 | 271 | ||
270 | static int bf5xx_pcm_close(struct snd_pcm_substream *substream) | ||
271 | { | ||
272 | struct snd_pcm_runtime *runtime = substream->runtime; | ||
273 | struct sport_device *sport = runtime->private_data; | ||
274 | |||
275 | pr_debug("%s enter\n", __func__); | ||
276 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | ||
277 | sport->once = 0; | ||
278 | memset(sport->tx_dma_buf, 0, runtime->buffer_size * | ||
279 | sizeof(struct ac97_frame)); | ||
280 | } else | ||
281 | memset(sport->rx_dma_buf, 0, runtime->buffer_size * | ||
282 | sizeof(struct ac97_frame)); | ||
283 | |||
284 | return 0; | ||
285 | } | ||
286 | |||
287 | #if defined(CONFIG_SND_BF5XX_MMAP_SUPPORT) | 272 | #if defined(CONFIG_SND_BF5XX_MMAP_SUPPORT) |
288 | static int bf5xx_pcm_mmap(struct snd_pcm_substream *substream, | 273 | static int bf5xx_pcm_mmap(struct snd_pcm_substream *substream, |
289 | struct vm_area_struct *vma) | 274 | struct vm_area_struct *vma) |
@@ -301,7 +286,7 @@ static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel, | |||
301 | void __user *buf, snd_pcm_uframes_t count) | 286 | void __user *buf, snd_pcm_uframes_t count) |
302 | { | 287 | { |
303 | struct snd_pcm_runtime *runtime = substream->runtime; | 288 | struct snd_pcm_runtime *runtime = substream->runtime; |
304 | 289 | unsigned int chan_mask = ac97_chan_mask[runtime->channels - 1]; | |
305 | pr_debug("%s copy pos:0x%lx count:0x%lx\n", | 290 | pr_debug("%s copy pos:0x%lx count:0x%lx\n", |
306 | substream->stream ? "Capture" : "Playback", pos, count); | 291 | substream->stream ? "Capture" : "Playback", pos, count); |
307 | 292 | ||
@@ -317,7 +302,6 @@ static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel, | |||
317 | 302 | ||
318 | struct snd_pcm_ops bf5xx_pcm_ac97_ops = { | 303 | struct snd_pcm_ops bf5xx_pcm_ac97_ops = { |
319 | .open = bf5xx_pcm_open, | 304 | .open = bf5xx_pcm_open, |
320 | .close = bf5xx_pcm_close, | ||
321 | .ioctl = snd_pcm_lib_ioctl, | 305 | .ioctl = snd_pcm_lib_ioctl, |
322 | .hw_params = bf5xx_pcm_hw_params, | 306 | .hw_params = bf5xx_pcm_hw_params, |
323 | .hw_free = bf5xx_pcm_hw_free, | 307 | .hw_free = bf5xx_pcm_hw_free, |