Lines Matching refs:substream

42 static int nuc900_dma_hw_params(struct snd_pcm_substream *substream,  in nuc900_dma_hw_params()  argument
45 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params)); in nuc900_dma_hw_params()
48 static void nuc900_update_dma_register(struct snd_pcm_substream *substream) in nuc900_update_dma_register() argument
50 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_update_dma_register()
54 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in nuc900_update_dma_register()
66 static void nuc900_dma_start(struct snd_pcm_substream *substream) in nuc900_dma_start() argument
68 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_start()
77 static void nuc900_dma_stop(struct snd_pcm_substream *substream) in nuc900_dma_stop() argument
79 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_stop()
90 struct snd_pcm_substream *substream = dev_id; in nuc900_dma_interrupt() local
91 struct nuc900_audio *nuc900_audio = substream->runtime->private_data; in nuc900_dma_interrupt()
134 snd_pcm_period_elapsed(substream); in nuc900_dma_interrupt()
139 static int nuc900_dma_hw_free(struct snd_pcm_substream *substream) in nuc900_dma_hw_free() argument
141 snd_pcm_lib_free_pages(substream); in nuc900_dma_hw_free()
145 static int nuc900_dma_prepare(struct snd_pcm_substream *substream) in nuc900_dma_prepare() argument
147 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_prepare()
154 nuc900_update_dma_register(substream); in nuc900_dma_prepare()
160 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in nuc900_dma_prepare()
170 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in nuc900_dma_prepare()
183 static int nuc900_dma_trigger(struct snd_pcm_substream *substream, int cmd) in nuc900_dma_trigger() argument
190 nuc900_dma_start(substream); in nuc900_dma_trigger()
195 nuc900_dma_stop(substream); in nuc900_dma_trigger()
206 static int nuc900_dma_getposition(struct snd_pcm_substream *substream, in nuc900_dma_getposition() argument
209 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_getposition()
221 static snd_pcm_uframes_t nuc900_dma_pointer(struct snd_pcm_substream *substream) in nuc900_dma_pointer() argument
223 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_pointer()
227 nuc900_dma_getposition(substream, &src, &dst); in nuc900_dma_pointer()
229 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) in nuc900_dma_pointer()
234 return bytes_to_frames(substream->runtime, res); in nuc900_dma_pointer()
237 static int nuc900_dma_open(struct snd_pcm_substream *substream) in nuc900_dma_open() argument
239 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_open()
242 snd_soc_set_runtime_hwparams(substream, &nuc900_pcm_hardware); in nuc900_dma_open()
247 0, "nuc900-dma", substream)) in nuc900_dma_open()
255 static int nuc900_dma_close(struct snd_pcm_substream *substream) in nuc900_dma_close() argument
257 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_close()
260 free_irq(nuc900_audio->irq_num, substream); in nuc900_dma_close()
265 static int nuc900_dma_mmap(struct snd_pcm_substream *substream, in nuc900_dma_mmap() argument
268 struct snd_pcm_runtime *runtime = substream->runtime; in nuc900_dma_mmap()
270 return dma_mmap_writecombine(substream->pcm->card->dev, vma, in nuc900_dma_mmap()