Lines Matching refs:subs
416 static int snd_mixart_trigger(struct snd_pcm_substream *subs, int cmd) in snd_mixart_trigger() argument
418 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_trigger()
423 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_START\n"); in snd_mixart_trigger()
440 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_TRIGGER_STOP\n"); in snd_mixart_trigger()
447 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_PUSH\n"); in snd_mixart_trigger()
452 dev_dbg(subs->pcm->card->dev, "SNDRV_PCM_PAUSE_RELEASE\n"); in snd_mixart_trigger()
477 static int snd_mixart_prepare(struct snd_pcm_substream *subs) in snd_mixart_prepare() argument
479 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_prepare()
480 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_prepare()
491 chip->mgr->sample_rate = subs->runtime->rate; in snd_mixart_prepare()
495 if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) ) in snd_mixart_prepare()
590 static int snd_mixart_hw_params(struct snd_pcm_substream *subs, in snd_mixart_hw_params() argument
593 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_hw_params()
595 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_hw_params()
611 if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) in snd_mixart_hw_params()
612 mixart_update_playback_stream_level(chip, is_aes, subs->number); in snd_mixart_hw_params()
626 if (subs->runtime->buffer_changed) { in snd_mixart_hw_params()
628 …PER_CARD) + (stream->pcm_number * (MIXART_PLAYBACK_STREAMS+MIXART_CAPTURE_STREAMS)) + subs->number; in snd_mixart_hw_params()
629 if( subs->stream == SNDRV_PCM_STREAM_CAPTURE ) { in snd_mixart_hw_params()
634 bufferinfo[i].buffer_address = subs->runtime->dma_addr; in snd_mixart_hw_params()
635 bufferinfo[i].available_length = subs->runtime->dma_bytes; in snd_mixart_hw_params()
642 subs->number); in snd_mixart_hw_params()
649 static int snd_mixart_hw_free(struct snd_pcm_substream *subs) in snd_mixart_hw_free() argument
651 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_hw_free()
704 static int snd_mixart_playback_open(struct snd_pcm_substream *subs) in snd_mixart_playback_open() argument
706 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_playback_open()
708 struct snd_pcm_runtime *runtime = subs->runtime; in snd_mixart_playback_open()
709 struct snd_pcm *pcm = subs->pcm; in snd_mixart_playback_open()
727 chip->chip_idx, pcm_number, subs->number); in snd_mixart_playback_open()
730 stream = &(chip->playback_stream[pcm_number][subs->number]); in snd_mixart_playback_open()
736 chip->chip_idx, pcm_number, subs->number); in snd_mixart_playback_open()
761 stream->substream = subs; in snd_mixart_playback_open()
783 static int snd_mixart_capture_open(struct snd_pcm_substream *subs) in snd_mixart_capture_open() argument
785 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_capture_open()
787 struct snd_pcm_runtime *runtime = subs->runtime; in snd_mixart_capture_open()
788 struct snd_pcm *pcm = subs->pcm; in snd_mixart_capture_open()
808 chip->chip_idx, pcm_number, subs->number); in snd_mixart_capture_open()
817 chip->chip_idx, pcm_number, subs->number); in snd_mixart_capture_open()
842 stream->substream = subs; in snd_mixart_capture_open()
865 static int snd_mixart_close(struct snd_pcm_substream *subs) in snd_mixart_close() argument
867 struct snd_mixart *chip = snd_pcm_substream_chip(subs); in snd_mixart_close()
869 struct mixart_stream *stream = subs->runtime->private_data; in snd_mixart_close()
874 chip->chip_idx, stream->pcm_number, subs->number); in snd_mixart_close()
898 static snd_pcm_uframes_t snd_mixart_stream_pointer(struct snd_pcm_substream *subs) in snd_mixart_stream_pointer() argument
900 struct snd_pcm_runtime *runtime = subs->runtime; in snd_mixart_stream_pointer()
931 struct snd_pcm_substream *subs; in preallocate_buffers()
936 for (subs = pcm->streams[stream].substream; subs; subs = subs->next, idx++) in preallocate_buffers()
938 subs->dma_device.id = subs->pcm->device << 16 | in preallocate_buffers()
939 subs->stream << 8 | (subs->number + 1) | in preallocate_buffers()