Lines Matching refs:substream

105 static void dsp_buffer_free(struct snd_pcm_substream *substream)  in dsp_buffer_free()  argument
107 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in dsp_buffer_free()
111 vfree(substream->runtime->dma_area); in dsp_buffer_free()
112 substream->runtime->dma_area = NULL; in dsp_buffer_free()
113 substream->runtime->dma_bytes = 0; in dsp_buffer_free()
116 static int dsp_buffer_alloc(struct snd_pcm_substream *substream, int size) in dsp_buffer_alloc() argument
118 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in dsp_buffer_alloc()
122 if (substream->runtime->dma_area) { in dsp_buffer_alloc()
123 if (substream->runtime->dma_bytes > size) in dsp_buffer_alloc()
126 dsp_buffer_free(substream); in dsp_buffer_alloc()
129 substream->runtime->dma_area = vmalloc(size); in dsp_buffer_alloc()
130 if (!substream->runtime->dma_area) in dsp_buffer_alloc()
133 substream->runtime->dma_bytes = size; in dsp_buffer_alloc()
171 static int snd_tm6000_pcm_open(struct snd_pcm_substream *substream) in snd_tm6000_pcm_open() argument
173 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_pcm_open()
174 struct snd_pcm_runtime *runtime = substream->runtime; in snd_tm6000_pcm_open()
182 chip->substream = substream; in snd_tm6000_pcm_open()
196 static int snd_tm6000_close(struct snd_pcm_substream *substream) in snd_tm6000_close() argument
198 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_close()
212 struct snd_pcm_substream *substream = chip->substream; in tm6000_fillbuf() local
221 if (!size || !substream) { in tm6000_fillbuf()
226 runtime = substream->runtime; in tm6000_fillbuf()
259 snd_pcm_stream_lock(substream); in tm6000_fillbuf()
271 snd_pcm_stream_unlock(substream); in tm6000_fillbuf()
274 snd_pcm_period_elapsed(substream); in tm6000_fillbuf()
282 static int snd_tm6000_hw_params(struct snd_pcm_substream *substream, in snd_tm6000_hw_params() argument
289 rc = dsp_buffer_alloc(substream, size); in snd_tm6000_hw_params()
299 static int snd_tm6000_hw_free(struct snd_pcm_substream *substream) in snd_tm6000_hw_free() argument
301 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_hw_free()
309 dsp_buffer_free(substream); in snd_tm6000_hw_free()
316 static int snd_tm6000_prepare(struct snd_pcm_substream *substream) in snd_tm6000_prepare() argument
318 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_prepare()
345 static int snd_tm6000_card_trigger(struct snd_pcm_substream *substream, int cmd) in snd_tm6000_card_trigger() argument
347 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_card_trigger()
373 static snd_pcm_uframes_t snd_tm6000_pointer(struct snd_pcm_substream *substream) in snd_tm6000_pointer() argument
375 struct snd_tm6000_card *chip = snd_pcm_substream_chip(substream); in snd_tm6000_pointer()