Lines Matching refs:subs
626 struct snd_pcm_substream *subs = stream->substream; in pcxhr_update_r_buffer() local
627 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_update_r_buffer()
629 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE); in pcxhr_update_r_buffer()
630 stream_num = is_capture ? 0 : subs->number; in pcxhr_update_r_buffer()
635 chip->chip_idx, (void *)(long)subs->runtime->dma_addr, in pcxhr_update_r_buffer()
636 subs->runtime->dma_bytes, subs->number); in pcxhr_update_r_buffer()
643 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000); in pcxhr_update_r_buffer()
645 rmh.cmd[1] = subs->runtime->dma_bytes * 8; in pcxhr_update_r_buffer()
647 rmh.cmd[2] = subs->runtime->dma_addr >> 24; in pcxhr_update_r_buffer()
651 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD; in pcxhr_update_r_buffer()
823 static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) in pcxhr_trigger() argument
827 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_trigger()
832 if (snd_pcm_stream_linked(subs)) { in pcxhr_trigger()
833 snd_pcm_group_for_each_entry(s, subs) { in pcxhr_trigger()
839 snd_pcm_trigger_done(s, subs); in pcxhr_trigger()
843 stream = subs->runtime->private_data; in pcxhr_trigger()
860 snd_pcm_group_for_each_entry(s, subs) { in pcxhr_trigger()
865 snd_pcm_trigger_done(s, subs); in pcxhr_trigger()
899 static int pcxhr_prepare(struct snd_pcm_substream *subs) in pcxhr_prepare() argument
901 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_prepare()
907 subs->runtime->period_size, subs->runtime->periods, in pcxhr_prepare()
908 subs->runtime->buffer_size); in pcxhr_prepare()
915 if (mgr->sample_rate != subs->runtime->rate) { in pcxhr_prepare()
916 err = pcxhr_set_clock(mgr, subs->runtime->rate); in pcxhr_prepare()
922 mgr->sample_rate = subs->runtime->rate; in pcxhr_prepare()
935 static int pcxhr_hw_params(struct snd_pcm_substream *subs, in pcxhr_hw_params() argument
938 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_hw_params()
940 struct pcxhr_stream *stream = subs->runtime->private_data; in pcxhr_hw_params()
985 static int pcxhr_open(struct snd_pcm_substream *subs) in pcxhr_open() argument
987 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_open()
989 struct snd_pcm_runtime *runtime = subs->runtime; in pcxhr_open()
998 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) { in pcxhr_open()
1000 __func__, chip->chip_idx, subs->number); in pcxhr_open()
1001 stream = &chip->playback_stream[subs->number]; in pcxhr_open()
1004 __func__, chip->chip_idx, subs->number); in pcxhr_open()
1009 stream = &chip->capture_stream[subs->number]; in pcxhr_open()
1014 __func__, chip->chip_idx, subs->number); in pcxhr_open()
1052 stream->substream = subs; in pcxhr_open()
1062 snd_pcm_set_sync(subs); in pcxhr_open()
1071 static int pcxhr_close(struct snd_pcm_substream *subs) in pcxhr_close() argument
1073 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_close()
1075 struct pcxhr_stream *stream = subs->runtime->private_data; in pcxhr_close()
1080 chip->chip_idx, subs->number); in pcxhr_close()
1097 static snd_pcm_uframes_t pcxhr_stream_pointer(struct snd_pcm_substream *subs) in pcxhr_stream_pointer() argument
1101 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs); in pcxhr_stream_pointer()
1102 struct snd_pcm_runtime *runtime = subs->runtime; in pcxhr_stream_pointer()