Lines Matching refs:substream
63 static int bf5xx_pcm_hw_params(struct snd_pcm_substream *substream, in bf5xx_pcm_hw_params() argument
66 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_hw_params()
70 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_hw_params()
75 return snd_pcm_lib_malloc_pages(substream, buffer_size); in bf5xx_pcm_hw_params()
78 static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream) in bf5xx_pcm_hw_free() argument
80 snd_pcm_lib_free_pages(substream); in bf5xx_pcm_hw_free()
85 static int bf5xx_pcm_prepare(struct snd_pcm_substream *substream) in bf5xx_pcm_prepare() argument
87 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_prepare()
88 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_prepare()
93 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_prepare()
99 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_prepare()
100 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
104 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
112 static int bf5xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in bf5xx_pcm_trigger() argument
114 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_trigger()
121 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_trigger()
129 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_trigger()
141 static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) in bf5xx_pcm_pointer() argument
143 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_pointer()
144 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_pointer()
150 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_pointer()
153 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_pointer()
164 if (diff == snd_pcm_lib_buffer_bytes(substream)) in bf5xx_pcm_pointer()
167 frames = bytes_to_frames(substream->runtime, diff); in bf5xx_pcm_pointer()
174 static int bf5xx_pcm_open(struct snd_pcm_substream *substream) in bf5xx_pcm_open() argument
176 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_open()
179 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_open()
180 struct snd_dma_buffer *buf = &substream->dma_buffer; in bf5xx_pcm_open()
184 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_open()
188 snd_soc_set_runtime_hwparams(substream, &bf5xx_pcm_hardware); in bf5xx_pcm_open()
200 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in bf5xx_pcm_open()
216 static int bf5xx_pcm_mmap(struct snd_pcm_substream *substream, in bf5xx_pcm_mmap() argument
219 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_mmap()
228 static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel, in bf5xx_pcm_copy() argument
231 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_copy()
232 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_copy()
238 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_copy()
241 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_copy()
269 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_copy()
285 static int bf5xx_pcm_silence(struct snd_pcm_substream *substream, in bf5xx_pcm_silence() argument
288 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_silence()
289 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_silence()
295 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_silence()