• Home
  • Raw
  • Download

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, in bf5xx_pcm_copy() argument
232 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_copy()
233 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_copy()
239 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_copy()
244 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_copy()
272 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in bf5xx_pcm_copy()
288 static int bf5xx_pcm_copy_user(struct snd_pcm_substream *substream, in bf5xx_pcm_copy_user() argument
292 return bf5xx_pcm_copy(substream, channel, pos, (void *)buf, count); in bf5xx_pcm_copy_user()
295 static int bf5xx_pcm_silence(struct snd_pcm_substream *substream, in bf5xx_pcm_silence() argument
299 struct snd_soc_pcm_runtime *rtd = substream->private_data; in bf5xx_pcm_silence()
300 struct snd_pcm_runtime *runtime = substream->runtime; in bf5xx_pcm_silence()
306 dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); in bf5xx_pcm_silence()