Lines Matching refs:substream
56 static void bf5xx_mmap_copy(struct snd_pcm_substream *substream, in bf5xx_mmap_copy() argument
59 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_mmap_copy()
62 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_mmap_copy()
120 static int bf5xx_pcm_hw_params(struct snd_pcm_substream *substream, in bf5xx_pcm_hw_params() argument
126 snd_pcm_lib_malloc_pages(substream, size); in bf5xx_pcm_hw_params()
131 static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream) in bf5xx_pcm_hw_free() argument
134 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_hw_free()
137 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_hw_free()
147 snd_pcm_lib_free_pages(substream); in bf5xx_pcm_hw_free()
151 static int bf5xx_pcm_prepare(struct snd_pcm_substream *substream) in bf5xx_pcm_prepare() argument
153 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_prepare()
160 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_prepare()
161 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
165 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
170 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_prepare()
171 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
175 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
183 static int bf5xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in bf5xx_pcm_trigger() argument
185 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_trigger()
192 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_trigger()
194 bf5xx_mmap_copy(substream, runtime->period_size); in bf5xx_pcm_trigger()
204 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_trigger()
222 static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) in bf5xx_pcm_pointer() argument
224 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_pointer()
229 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_pointer()
235 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_pointer()
244 static int bf5xx_pcm_open(struct snd_pcm_substream *substream) in bf5xx_pcm_open() argument
246 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_open()
249 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_open()
253 snd_soc_set_runtime_hwparams(substream, &bf5xx_pcm_hardware); in bf5xx_pcm_open()
273 static int bf5xx_pcm_mmap(struct snd_pcm_substream *substream, in bf5xx_pcm_mmap() argument
276 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_mmap()
284 static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel, in bf5xx_pcm_copy() argument
288 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_copy()
291 substream->stream ? "Capture" : "Playback", pos, count); in bf5xx_pcm_copy()
293 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_copy()
323 struct snd_pcm_substream *substream = pcm->streams[stream].substream; in bf5xx_pcm_preallocate_dma_buffer() local
324 struct snd_dma_buffer *buf = &substream->dma_buffer; in bf5xx_pcm_preallocate_dma_buffer()
353 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_preallocate_dma_buffer()
382 struct snd_pcm_substream *substream; in bf5xx_pcm_free_dma_buffers() local
393 substream = pcm->streams[stream].substream; in bf5xx_pcm_free_dma_buffers()
394 if (!substream) in bf5xx_pcm_free_dma_buffers()
397 buf = &substream->dma_buffer; in bf5xx_pcm_free_dma_buffers()
403 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_free_dma_buffers()
433 if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { in bf5xx_pcm_ac97_new()
440 if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { in bf5xx_pcm_ac97_new()