• Home
  • Raw
  • Download

Lines Matching refs:substream

45 static int nuc900_dma_hw_params(struct snd_pcm_substream *substream,  in nuc900_dma_hw_params()  argument
48 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_hw_params()
53 ret = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in nuc900_dma_hw_params()
59 nuc900_audio->substream = substream; in nuc900_dma_hw_params()
60 nuc900_audio->dma_addr[substream->stream] = runtime->dma_addr; in nuc900_dma_hw_params()
61 nuc900_audio->buffersize[substream->stream] = in nuc900_dma_hw_params()
69 static void nuc900_update_dma_register(struct snd_pcm_substream *substream, in nuc900_update_dma_register() argument
72 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_update_dma_register()
76 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in nuc900_update_dma_register()
88 static void nuc900_dma_start(struct snd_pcm_substream *substream) in nuc900_dma_start() argument
90 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_start()
99 static void nuc900_dma_stop(struct snd_pcm_substream *substream) in nuc900_dma_stop() argument
101 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_stop()
112 struct snd_pcm_substream *substream = dev_id; in nuc900_dma_interrupt() local
113 struct nuc900_audio *nuc900_audio = substream->runtime->private_data; in nuc900_dma_interrupt()
156 snd_pcm_period_elapsed(substream); in nuc900_dma_interrupt()
161 static int nuc900_dma_hw_free(struct snd_pcm_substream *substream) in nuc900_dma_hw_free() argument
163 snd_pcm_lib_free_pages(substream); in nuc900_dma_hw_free()
167 static int nuc900_dma_prepare(struct snd_pcm_substream *substream) in nuc900_dma_prepare() argument
169 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_prepare()
176 nuc900_update_dma_register(substream, in nuc900_dma_prepare()
177 nuc900_audio->dma_addr[substream->stream], in nuc900_dma_prepare()
178 nuc900_audio->buffersize[substream->stream]); in nuc900_dma_prepare()
184 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in nuc900_dma_prepare()
194 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in nuc900_dma_prepare()
207 static int nuc900_dma_trigger(struct snd_pcm_substream *substream, int cmd) in nuc900_dma_trigger() argument
214 nuc900_dma_start(substream); in nuc900_dma_trigger()
219 nuc900_dma_stop(substream); in nuc900_dma_trigger()
230 static int nuc900_dma_getposition(struct snd_pcm_substream *substream, in nuc900_dma_getposition() argument
233 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_getposition()
245 static snd_pcm_uframes_t nuc900_dma_pointer(struct snd_pcm_substream *substream) in nuc900_dma_pointer() argument
247 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_pointer()
251 nuc900_dma_getposition(substream, &src, &dst); in nuc900_dma_pointer()
253 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in nuc900_dma_pointer()
258 return bytes_to_frames(substream->runtime, res); in nuc900_dma_pointer()
261 static int nuc900_dma_open(struct snd_pcm_substream *substream) in nuc900_dma_open() argument
263 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_open()
266 snd_soc_set_runtime_hwparams(substream, &nuc900_pcm_hardware); in nuc900_dma_open()
271 0, "nuc900-dma", substream)) in nuc900_dma_open()
279 static int nuc900_dma_close(struct snd_pcm_substream *substream) in nuc900_dma_close() argument
281 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_close()
284 free_irq(nuc900_audio->irq_num, substream); in nuc900_dma_close()
289 static int nuc900_dma_mmap(struct snd_pcm_substream *substream, in nuc900_dma_mmap() argument
292 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_mmap()
294 return dma_mmap_writecombine(substream->pcm->card->dev, vma, in nuc900_dma_mmap()