• Home
  • Raw
  • Download

Lines Matching refs:substream

138 static int snd_vortex_pcm_open(struct snd_pcm_substream *substream)  in snd_vortex_pcm_open()  argument
140 vortex_t *vortex = snd_pcm_substream_chip(substream); in snd_vortex_pcm_open()
141 struct snd_pcm_runtime *runtime = substream->runtime; in snd_vortex_pcm_open()
158 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_open()
160 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_A3D) { in snd_vortex_pcm_open()
164 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_SPDIF) { in snd_vortex_pcm_open()
178 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB in snd_vortex_pcm_open()
179 || VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_I2S) in snd_vortex_pcm_open()
182 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && in snd_vortex_pcm_open()
184 VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { in snd_vortex_pcm_open()
191 substream->runtime->private_data = NULL; in snd_vortex_pcm_open()
196 substream->runtime->private_data = NULL; in snd_vortex_pcm_open()
203 static int snd_vortex_pcm_close(struct snd_pcm_substream *substream) in snd_vortex_pcm_close() argument
206 stream_t *stream = (stream_t *) substream->runtime->private_data; in snd_vortex_pcm_close()
210 stream->substream = NULL; in snd_vortex_pcm_close()
213 substream->runtime->private_data = NULL; in snd_vortex_pcm_close()
219 snd_vortex_pcm_hw_params(struct snd_pcm_substream *substream, in snd_vortex_pcm_hw_params() argument
222 vortex_t *chip = snd_pcm_substream_chip(substream); in snd_vortex_pcm_hw_params()
223 stream_t *stream = (stream_t *) (substream->runtime->private_data); in snd_vortex_pcm_hw_params()
228 snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_vortex_pcm_hw_params()
239 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_hw_params()
240 int dma, type = VORTEX_PCM_TYPE(substream->pcm); in snd_vortex_pcm_hw_params()
246 substream->number); in snd_vortex_pcm_hw_params()
251 substream->stream, type, in snd_vortex_pcm_hw_params()
252 substream->number); in snd_vortex_pcm_hw_params()
257 stream = substream->runtime->private_data = &chip->dma_adb[dma]; in snd_vortex_pcm_hw_params()
258 stream->substream = substream; in snd_vortex_pcm_hw_params()
263 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { in snd_vortex_pcm_hw_params()
264 chip->pcm_vol[substream->number].active = 1; in snd_vortex_pcm_hw_params()
266 chip->pcm_vol[substream->number].kctl, 1); in snd_vortex_pcm_hw_params()
273 vortex_wt_allocroute(chip, substream->number, in snd_vortex_pcm_hw_params()
275 stream = substream->runtime->private_data = in snd_vortex_pcm_hw_params()
276 &chip->dma_wt[substream->number]; in snd_vortex_pcm_hw_params()
277 stream->dma = substream->number; in snd_vortex_pcm_hw_params()
278 stream->substream = substream; in snd_vortex_pcm_hw_params()
279 vortex_wtdma_setbuffers(chip, substream->number, in snd_vortex_pcm_hw_params()
289 static int snd_vortex_pcm_hw_free(struct snd_pcm_substream *substream) in snd_vortex_pcm_hw_free() argument
291 vortex_t *chip = snd_pcm_substream_chip(substream); in snd_vortex_pcm_hw_free()
292 stream_t *stream = (stream_t *) (substream->runtime->private_data); in snd_vortex_pcm_hw_free()
296 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_hw_free()
298 if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { in snd_vortex_pcm_hw_free()
299 chip->pcm_vol[substream->number].active = 0; in snd_vortex_pcm_hw_free()
301 chip->pcm_vol[substream->number].kctl, in snd_vortex_pcm_hw_free()
307 substream->number); in snd_vortex_pcm_hw_free()
316 substream->runtime->private_data = NULL; in snd_vortex_pcm_hw_free()
319 return snd_pcm_lib_free_pages(substream); in snd_vortex_pcm_hw_free()
323 static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream) in snd_vortex_pcm_prepare() argument
325 vortex_t *chip = snd_pcm_substream_chip(substream); in snd_vortex_pcm_prepare()
326 struct snd_pcm_runtime *runtime = substream->runtime; in snd_vortex_pcm_prepare()
327 stream_t *stream = (stream_t *) substream->runtime->private_data; in snd_vortex_pcm_prepare()
331 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_vortex_pcm_prepare()
337 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_prepare()
341 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_SPDIF) in snd_vortex_pcm_prepare()
356 static int snd_vortex_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_vortex_pcm_trigger() argument
358 vortex_t *chip = snd_pcm_substream_chip(substream); in snd_vortex_pcm_trigger()
359 stream_t *stream = (stream_t *) substream->runtime->private_data; in snd_vortex_pcm_trigger()
368 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { in snd_vortex_pcm_trigger()
383 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) in snd_vortex_pcm_trigger()
394 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) in snd_vortex_pcm_trigger()
403 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) in snd_vortex_pcm_trigger()
419 static snd_pcm_uframes_t snd_vortex_pcm_pointer(struct snd_pcm_substream *substream) in snd_vortex_pcm_pointer() argument
421 vortex_t *chip = snd_pcm_substream_chip(substream); in snd_vortex_pcm_pointer()
422 stream_t *stream = (stream_t *) substream->runtime->private_data; in snd_vortex_pcm_pointer()
427 if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) in snd_vortex_pcm_pointer()
435 current_ptr = bytes_to_frames(substream->runtime, current_ptr); in snd_vortex_pcm_pointer()
436 if (current_ptr >= substream->runtime->buffer_size) in snd_vortex_pcm_pointer()