Lines Matching refs:substream

46 	struct snd_pcm_substream *substream;  member
74 static int snd_gf1_pcm_block_change(struct snd_pcm_substream *substream, in snd_gf1_pcm_block_change() argument
80 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_block_change()
106 static void snd_gf1_pcm_trigger_up(struct snd_pcm_substream *substream) in snd_gf1_pcm_trigger_up() argument
108 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_trigger_up()
207 runtime = pcmp->substream->runtime; in snd_gf1_pcm_interrupt_wave()
256 snd_pcm_period_elapsed(pcmp->substream); in snd_gf1_pcm_interrupt_wave()
262 snd_gf1_pcm_block_change(pcmp->substream, end, pcmp->memory + (end / 2), pcmp->block_size / 2); in snd_gf1_pcm_interrupt_wave()
263 …snd_gf1_pcm_block_change(pcmp->substream, end + (pcmp->block_size / 2), pcmp->memory + (pcmp->dma_… in snd_gf1_pcm_interrupt_wave()
265 snd_gf1_pcm_block_change(pcmp->substream, end, pcmp->memory + end, pcmp->block_size); in snd_gf1_pcm_interrupt_wave()
290 if (pcmp->substream == NULL) in snd_gf1_pcm_interrupt_volume()
356 static int snd_gf1_pcm_playback_copy(struct snd_pcm_substream *substream, in snd_gf1_pcm_playback_copy() argument
362 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_copy()
375 return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); in snd_gf1_pcm_playback_copy()
388 static int snd_gf1_pcm_playback_silence(struct snd_pcm_substream *substream, in snd_gf1_pcm_playback_silence() argument
393 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_silence()
405 return snd_gf1_pcm_block_change(substream, bpos, pcmp->memory + bpos, len); in snd_gf1_pcm_playback_silence()
418 static int snd_gf1_pcm_playback_hw_params(struct snd_pcm_substream *substream, in snd_gf1_pcm_playback_hw_params() argument
421 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_playback_hw_params()
422 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_params()
426 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_gf1_pcm_playback_hw_params()
467 static int snd_gf1_pcm_playback_hw_free(struct snd_pcm_substream *substream) in snd_gf1_pcm_playback_hw_free() argument
469 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_hw_free()
472 snd_pcm_lib_free_pages(substream); in snd_gf1_pcm_playback_hw_free()
488 static int snd_gf1_pcm_playback_prepare(struct snd_pcm_substream *substream) in snd_gf1_pcm_playback_prepare() argument
490 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_prepare()
494 pcmp->dma_size = snd_pcm_lib_buffer_bytes(substream); in snd_gf1_pcm_playback_prepare()
495 pcmp->block_size = snd_pcm_lib_period_bytes(substream); in snd_gf1_pcm_playback_prepare()
500 static int snd_gf1_pcm_playback_trigger(struct snd_pcm_substream *substream, in snd_gf1_pcm_playback_trigger() argument
503 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_playback_trigger()
504 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_trigger()
509 snd_gf1_pcm_trigger_up(substream); in snd_gf1_pcm_playback_trigger()
526 static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *substream) in snd_gf1_pcm_playback_pointer() argument
528 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_playback_pointer()
529 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_pointer()
540 if (substream->runtime->channels > 1) in snd_gf1_pcm_playback_pointer()
560 static int snd_gf1_pcm_capture_hw_params(struct snd_pcm_substream *substream, in snd_gf1_pcm_capture_hw_params() argument
563 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_hw_params()
575 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_gf1_pcm_capture_hw_params()
578 static int snd_gf1_pcm_capture_hw_free(struct snd_pcm_substream *substream) in snd_gf1_pcm_capture_hw_free() argument
580 return snd_pcm_lib_free_pages(substream); in snd_gf1_pcm_capture_hw_free()
583 static int snd_gf1_pcm_capture_prepare(struct snd_pcm_substream *substream) in snd_gf1_pcm_capture_prepare() argument
585 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_prepare()
586 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_prepare()
595 static int snd_gf1_pcm_capture_trigger(struct snd_pcm_substream *substream, in snd_gf1_pcm_capture_trigger() argument
598 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_trigger()
616 static snd_pcm_uframes_t snd_gf1_pcm_capture_pointer(struct snd_pcm_substream *substream) in snd_gf1_pcm_capture_pointer() argument
618 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_pointer()
620 pos = bytes_to_frames(substream->runtime, (gus->c_pos + pos) % gus->c_dma_size); in snd_gf1_pcm_capture_pointer()
677 static int snd_gf1_pcm_playback_open(struct snd_pcm_substream *substream) in snd_gf1_pcm_playback_open() argument
680 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_playback_open()
681 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_open()
702 pcmp->substream = substream; in snd_gf1_pcm_playback_open()
710 static int snd_gf1_pcm_playback_close(struct snd_pcm_substream *substream) in snd_gf1_pcm_playback_close() argument
712 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_playback_close()
713 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_playback_close()
723 static int snd_gf1_pcm_capture_open(struct snd_pcm_substream *substream) in snd_gf1_pcm_capture_open() argument
725 struct snd_pcm_runtime *runtime = substream->runtime; in snd_gf1_pcm_capture_open()
726 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_open()
729 gus->pcm_cap_substream = substream; in snd_gf1_pcm_capture_open()
730 substream->runtime->hw = snd_gf1_pcm_capture; in snd_gf1_pcm_capture_open()
738 static int snd_gf1_pcm_capture_close(struct snd_pcm_substream *substream) in snd_gf1_pcm_capture_close() argument
740 struct snd_gus_card *gus = snd_pcm_substream_chip(substream); in snd_gf1_pcm_capture_close()
857 struct snd_pcm_substream *substream; in snd_gf1_pcm_new() local
874 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_gf1_pcm_new()
875 snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, in snd_gf1_pcm_new()
885 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, in snd_gf1_pcm_new()