Lines Matching refs:substream

247 	struct snd_pcm_substream *substream;	/* assigned PCM substream */  member
357 struct snd_pcm_substream *substream, in atiixp_build_dma_packets() argument
388 addr = (u32)substream->runtime->dma_addr; in atiixp_build_dma_packets()
417 struct snd_pcm_substream *substream) in atiixp_clear_dma_packets() argument
661 static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substream) in snd_atiixp_pcm_pointer() argument
663 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_pointer()
664 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_pointer()
688 if (! dma->substream || ! dma->running) in snd_atiixp_xrun_dma()
691 snd_pcm_stop_xrun(dma->substream); in snd_atiixp_xrun_dma()
699 if (! dma->substream || ! dma->running) in snd_atiixp_update_dma()
701 snd_pcm_period_elapsed(dma->substream); in snd_atiixp_update_dma()
721 static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) in snd_atiixp_pcm_trigger() argument
723 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_trigger()
724 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_trigger()
868 static int snd_atiixp_spdif_prepare(struct snd_pcm_substream *substream) in snd_atiixp_spdif_prepare() argument
870 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_spdif_prepare()
884 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? in snd_atiixp_spdif_prepare()
895 static int snd_atiixp_playback_prepare(struct snd_pcm_substream *substream) in snd_atiixp_playback_prepare() argument
897 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_prepare()
902 switch (substream->runtime->channels) { in snd_atiixp_playback_prepare()
926 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? in snd_atiixp_playback_prepare()
933 substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0); in snd_atiixp_playback_prepare()
940 static int snd_atiixp_capture_prepare(struct snd_pcm_substream *substream) in snd_atiixp_capture_prepare() argument
942 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_capture_prepare()
946 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE ? in snd_atiixp_capture_prepare()
955 static int snd_atiixp_pcm_hw_params(struct snd_pcm_substream *substream, in snd_atiixp_pcm_hw_params() argument
958 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_hw_params()
959 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_hw_params()
962 err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_atiixp_pcm_hw_params()
965 dma->buf_addr = substream->runtime->dma_addr; in snd_atiixp_pcm_hw_params()
968 err = atiixp_build_dma_packets(chip, dma, substream, in snd_atiixp_pcm_hw_params()
993 static int snd_atiixp_pcm_hw_free(struct snd_pcm_substream *substream) in snd_atiixp_pcm_hw_free() argument
995 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_hw_free()
996 struct atiixp_dma *dma = substream->runtime->private_data; in snd_atiixp_pcm_hw_free()
1003 atiixp_clear_dma_packets(chip, dma, substream); in snd_atiixp_pcm_hw_free()
1004 snd_pcm_lib_free_pages(substream); in snd_atiixp_pcm_hw_free()
1032 static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream, in snd_atiixp_pcm_open() argument
1035 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_open()
1036 struct snd_pcm_runtime *runtime = substream->runtime; in snd_atiixp_pcm_open()
1044 dma->substream = substream; in snd_atiixp_pcm_open()
1067 static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream, in snd_atiixp_pcm_close() argument
1070 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_pcm_close()
1077 dma->substream = NULL; in snd_atiixp_pcm_close()
1084 static int snd_atiixp_playback_open(struct snd_pcm_substream *substream) in snd_atiixp_playback_open() argument
1086 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_open()
1090 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0); in snd_atiixp_playback_open()
1094 substream->runtime->hw.channels_max = chip->max_channels; in snd_atiixp_playback_open()
1097 snd_pcm_hw_constraint_step(substream->runtime, 0, in snd_atiixp_playback_open()
1102 static int snd_atiixp_playback_close(struct snd_pcm_substream *substream) in snd_atiixp_playback_close() argument
1104 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_playback_close()
1107 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); in snd_atiixp_playback_close()
1112 static int snd_atiixp_capture_open(struct snd_pcm_substream *substream) in snd_atiixp_capture_open() argument
1114 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_capture_open()
1115 return snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_CAPTURE], 1); in snd_atiixp_capture_open()
1118 static int snd_atiixp_capture_close(struct snd_pcm_substream *substream) in snd_atiixp_capture_close() argument
1120 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_capture_close()
1121 return snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_CAPTURE]); in snd_atiixp_capture_close()
1124 static int snd_atiixp_spdif_open(struct snd_pcm_substream *substream) in snd_atiixp_spdif_open() argument
1126 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_spdif_open()
1130 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 2); in snd_atiixp_spdif_open()
1132 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_SPDIF], -1); in snd_atiixp_spdif_open()
1137 static int snd_atiixp_spdif_close(struct snd_pcm_substream *substream) in snd_atiixp_spdif_close() argument
1139 struct atiixp *chip = snd_pcm_substream_chip(substream); in snd_atiixp_spdif_close()
1143 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); in snd_atiixp_spdif_close()
1145 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_SPDIF]); in snd_atiixp_spdif_close()
1485 if (dma->substream && dma->running) in snd_atiixp_suspend()
1512 if (dma->substream && dma->suspended) { in snd_atiixp_resume()
1514 dma->substream->ops->prepare(dma->substream); in snd_atiixp_resume()