Lines Matching refs:subs

640 	struct snd_pcm_substream *subs = stream->substream;  in pcxhr_update_r_buffer()  local
641 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_update_r_buffer()
643 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); in pcxhr_update_r_buffer()
644 stream_num = is_capture ? 0 : subs->number; in pcxhr_update_r_buffer()
649 chip->chip_idx, (void *)(long)subs->runtime->dma_addr, in pcxhr_update_r_buffer()
650 subs->runtime->dma_bytes, subs->number); in pcxhr_update_r_buffer()
657 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000); in pcxhr_update_r_buffer()
659 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer()
661 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer()
665 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer()
838 static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) in pcxhr_trigger() argument
842 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_trigger()
847 if (snd_pcm_stream_linked(subs)) { in pcxhr_trigger()
848 snd_pcm_group_for_each_entry(s, subs) { in pcxhr_trigger()
854 snd_pcm_trigger_done(s, subs); in pcxhr_trigger()
858 stream = subs->runtime->private_data; in pcxhr_trigger()
875 snd_pcm_group_for_each_entry(s, subs) { in pcxhr_trigger()
880 snd_pcm_trigger_done(s, subs); in pcxhr_trigger()
914 static int pcxhr_prepare(struct snd_pcm_substream *subs) in pcxhr_prepare() argument
916 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_prepare()
922 subs->runtime->period_size, subs->runtime->periods, in pcxhr_prepare()
923 subs->runtime->buffer_size); in pcxhr_prepare()
930 if (mgr->sample_rate != subs->runtime->rate) { in pcxhr_prepare()
931 err = pcxhr_set_clock(mgr, subs->runtime->rate); in pcxhr_prepare()
937 mgr->sample_rate = subs->runtime->rate; in pcxhr_prepare()
950 static int pcxhr_hw_params(struct snd_pcm_substream *subs, in pcxhr_hw_params() argument
953 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_hw_params()
955 struct pcxhr_stream *stream = subs->runtime->private_data; in pcxhr_hw_params()
972 err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw)); in pcxhr_hw_params()
979 static int pcxhr_hw_free(struct snd_pcm_substream *subs) in pcxhr_hw_free() argument
981 snd_pcm_lib_free_pages(subs); in pcxhr_hw_free()
1016 static int pcxhr_open(struct snd_pcm_substream *subs) in pcxhr_open() argument
1018 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_open()
1020 struct snd_pcm_runtime *runtime = subs->runtime; in pcxhr_open()
1029 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) { in pcxhr_open()
1031 chip->chip_idx, subs->number); in pcxhr_open()
1032 stream = &chip->playback_stream[subs->number]; in pcxhr_open()
1035 chip->chip_idx, subs->number); in pcxhr_open()
1040 stream = &chip->capture_stream[subs->number]; in pcxhr_open()
1045 chip->chip_idx, subs->number); in pcxhr_open()
1083 stream->substream = subs; in pcxhr_open()
1093 snd_pcm_set_sync(subs); in pcxhr_open()
1102 static int pcxhr_close(struct snd_pcm_substream *subs) in pcxhr_close() argument
1104 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_close()
1106 struct pcxhr_stream *stream = subs->runtime->private_data; in pcxhr_close()
1111 chip->chip_idx, subs->number); in pcxhr_close()
1128 static snd_pcm_uframes_t pcxhr_stream_pointer(struct snd_pcm_substream *subs) in pcxhr_stream_pointer() argument
1132 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_stream_pointer()
1133 struct snd_pcm_runtime *runtime = subs->runtime; in pcxhr_stream_pointer()