Lines Matching refs:subs
627 struct snd_pcm_substream *subs = stream->substream;
628 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
630 is_capture = (subs->stream == SNDRV_PCM_STREAM_CAPTURE);
631 stream_num = is_capture ? 0 : subs->number;
634 "pcxhr_update_r_buffer(pcm%c%d) : addr(%p) bytes(%zx) subs(%d)\n",
636 chip->chip_idx, (void *)(long)subs->runtime->dma_addr,
637 subs->runtime->dma_bytes, subs->number);
644 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000);
646 rmh.cmd[1] = subs->runtime->dma_bytes * 8;
648 rmh.cmd[2] = subs->runtime->dma_addr >> 24;
652 rmh.cmd[3] = subs->runtime->dma_addr & MASK_DSP_WORD;
825 static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd)
829 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
834 if (snd_pcm_stream_linked(subs)) {
835 snd_pcm_group_for_each_entry(s, subs) {
841 snd_pcm_trigger_done(s, subs);
845 stream = subs->runtime->private_data;
862 snd_pcm_group_for_each_entry(s, subs) {
867 snd_pcm_trigger_done(s, subs);
901 static int pcxhr_prepare(struct snd_pcm_substream *subs)
903 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
909 subs->runtime->period_size, subs->runtime->periods,
910 subs->runtime->buffer_size);
917 if (mgr->sample_rate != subs->runtime->rate) {
918 err = pcxhr_set_clock(mgr, subs->runtime->rate);
924 mgr->sample_rate = subs->runtime->rate;
937 static int pcxhr_hw_params(struct snd_pcm_substream *subs,
940 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
942 struct pcxhr_stream *stream = subs->runtime->private_data;
987 static int pcxhr_open(struct snd_pcm_substream *subs)
989 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
991 struct snd_pcm_runtime *runtime = subs->runtime;
1000 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) {
1001 dev_dbg(chip->card->dev, "pcxhr_open playback chip%d subs%d\n",
1002 chip->chip_idx, subs->number);
1003 stream = &chip->playback_stream[subs->number];
1005 dev_dbg(chip->card->dev, "pcxhr_open capture chip%d subs%d\n",
1006 chip->chip_idx, subs->number);
1011 stream = &chip->capture_stream[subs->number];
1015 dev_err(chip->card->dev, "pcxhr_open chip%d subs%d in use\n",
1016 chip->chip_idx, subs->number);
1054 stream->substream = subs;
1064 snd_pcm_set_sync(subs);
1073 static int pcxhr_close(struct snd_pcm_substream *subs)
1075 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
1077 struct pcxhr_stream *stream = subs->runtime->private_data;
1081 dev_dbg(chip->card->dev, "pcxhr_close chip%d subs%d\n",
1082 chip->chip_idx, subs->number);
1099 static snd_pcm_uframes_t pcxhr_stream_pointer(struct snd_pcm_substream *subs)
1103 struct snd_pcxhr *chip = snd_pcm_substream_chip(subs);
1104 struct snd_pcm_runtime *runtime = subs->runtime;