Lines Matching refs:substream
223 struct snd_pcm_substream *substream; /* assigned PCM substream */ member
326 struct snd_pcm_substream *substream, in atiixp_build_dma_packets() argument
355 addr = (u32)substream->runtime->dma_addr; in atiixp_build_dma_packets()
385 struct snd_pcm_substream *substream) in atiixp_clear_dma_packets() argument
610 static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substream) in snd_atiixp_pcm_pointer() argument
612 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_pointer()
613 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_pointer()
638 if (! dma->substream || ! dma->running) in snd_atiixp_xrun_dma()
641 snd_pcm_stop_xrun(dma->substream); in snd_atiixp_xrun_dma()
650 if (! dma->substream || ! dma->running) in snd_atiixp_update_dma()
652 snd_pcm_period_elapsed(dma->substream); in snd_atiixp_update_dma()
671 static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_atiixp_pcm_trigger() argument
673 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_trigger()
674 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_trigger()
768 static int snd_atiixp_playback_prepare(struct snd_pcm_substream *substream) in snd_atiixp_playback_prepare() argument
770 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_prepare()
784 static int snd_atiixp_capture_prepare(struct snd_pcm_substream *substream) in snd_atiixp_capture_prepare() argument
792 static int snd_atiixp_pcm_hw_params(struct snd_pcm_substream *substream, in snd_atiixp_pcm_hw_params() argument
795 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_hw_params()
796 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_hw_params()
800 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_atiixp_pcm_hw_params()
803 dma->buf_addr = substream->runtime->dma_addr; in snd_atiixp_pcm_hw_params()
806 err = atiixp_build_dma_packets(chip, dma, substream, in snd_atiixp_pcm_hw_params()
823 static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream) in snd_atiixp_pcm_hw_free() argument
825 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_hw_free()
826 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_hw_free()
828 atiixp_clear_dma_packets(chip, dma, substream); in snd_atiixp_pcm_hw_free()
829 snd_pcm_lib_free_pages(substream); in snd_atiixp_pcm_hw_free()
857 static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream, in snd_atiixp_pcm_open() argument
860 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_open()
861 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_open()
875 dma->substream = substream; in snd_atiixp_pcm_open()
896 static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream, in snd_atiixp_pcm_close() argument
899 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_close()
906 dma->substream = NULL; in snd_atiixp_pcm_close()
913 static int snd_atiixp_playback_open(struct snd_pcm_substream *substream) in snd_atiixp_playback_open() argument
915 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_open()
919 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0); in snd_atiixp_playback_open()
926 static int snd_atiixp_playback_close(struct snd_pcm_substream *substream) in snd_atiixp_playback_close() argument
928 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_close()
931 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); in snd_atiixp_playback_close()
936 static int snd_atiixp_capture_open(struct snd_pcm_substream *substream) in snd_atiixp_capture_open() argument
938 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_capture_open()
939 return snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_CAPTURE], 1); in snd_atiixp_capture_open()
942 static int snd_atiixp_capture_close(struct snd_pcm_substream *substream) in snd_atiixp_capture_close() argument
944 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); in snd_atiixp_capture_close()
945 return snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_CAPTURE]); in snd_atiixp_capture_close()