Lines Matching refs:substream
55 static void bf5xx_mmap_copy(struct snd_pcm_substream *substream, in bf5xx_mmap_copy() argument
58 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_mmap_copy()
61 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_mmap_copy()
118 static int bf5xx_pcm_hw_params(struct snd_pcm_substream *substream, in bf5xx_pcm_hw_params() argument
124 snd_pcm_lib_malloc_pages(substream, size); in bf5xx_pcm_hw_params()
129 static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream) in bf5xx_pcm_hw_free() argument
132 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_hw_free()
135 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_hw_free()
145 snd_pcm_lib_free_pages(substream); in bf5xx_pcm_hw_free()
149 static int bf5xx_pcm_prepare(struct snd_pcm_substream *substream) in bf5xx_pcm_prepare() argument
151 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_prepare()
158 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_prepare()
159 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
163 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
168 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_prepare()
169 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
173 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
181 static int bf5xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in bf5xx_pcm_trigger() argument
183 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_trigger()
190 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_trigger()
192 bf5xx_mmap_copy(substream, runtime->period_size); in bf5xx_pcm_trigger()
202 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_trigger()
220 static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) in bf5xx_pcm_pointer() argument
222 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_pointer()
227 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_pointer()
233 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_pointer()
242 static int bf5xx_pcm_open(struct snd_pcm_substream *substream) in bf5xx_pcm_open() argument
244 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_open()
247 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_open()
251 snd_soc_set_runtime_hwparams(substream, &bf5xx_pcm_hardware); in bf5xx_pcm_open()
271 static int bf5xx_pcm_mmap(struct snd_pcm_substream *substream, in bf5xx_pcm_mmap() argument
274 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_mmap()
282 static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel, in bf5xx_pcm_copy() argument
286 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_copy()
289 substream->stream ? "Capture" : "Playback", pos, count); in bf5xx_pcm_copy()
291 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_copy()
321 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in bf5xx_pcm_preallocate_dma_buffer() local
322 struct snd_dma_buffer *buf = &substream->dma_buffer; in bf5xx_pcm_preallocate_dma_buffer()
351 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_preallocate_dma_buffer()
380 struct snd_pcm_substream *substream; in bf5xx_pcm_free_dma_buffers() local
391 substream = pcm->streams[stream].substream; in bf5xx_pcm_free_dma_buffers()
392 if (!substream) in bf5xx_pcm_free_dma_buffers()
395 buf = &substream->dma_buffer; in bf5xx_pcm_free_dma_buffers()
401 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_free_dma_buffers()
428 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in bf5xx_pcm_ac97_new()
435 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in bf5xx_pcm_ac97_new()