Lines Matching refs:substream

352 			snd_pcm_period_elapsed(card->substream);  in snd_ps3_interrupt()
452 static int snd_ps3_set_avsetting(struct snd_pcm_substream *substream) in snd_ps3_set_avsetting() argument
454 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_set_avsetting()
461 substream->runtime->rate, in snd_ps3_set_avsetting()
462 snd_pcm_format_width(substream->runtime->format)); in snd_ps3_set_avsetting()
468 switch (substream->runtime->rate) { in snd_ps3_set_avsetting()
483 substream->runtime->rate); in snd_ps3_set_avsetting()
488 switch (snd_pcm_format_width(substream->runtime->format)) { in snd_ps3_set_avsetting()
497 snd_pcm_format_width(substream->runtime->format)); in snd_ps3_set_avsetting()
525 static int snd_ps3_pcm_open(struct snd_pcm_substream *substream) in snd_ps3_pcm_open() argument
527 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ps3_pcm_open()
528 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_pcm_open()
531 pcm_index = substream->pcm->device; in snd_ps3_pcm_open()
533 card->substream = substream; in snd_ps3_pcm_open()
547 static int snd_ps3_pcm_close(struct snd_pcm_substream *substream) in snd_ps3_pcm_close() argument
554 static int snd_ps3_pcm_hw_params(struct snd_pcm_substream *substream, in snd_ps3_pcm_hw_params() argument
561 snd_pcm_lib_malloc_pages(substream, size); in snd_ps3_pcm_hw_params()
565 static int snd_ps3_pcm_hw_free(struct snd_pcm_substream *substream) in snd_ps3_pcm_hw_free() argument
568 ret = snd_pcm_lib_free_pages(substream); in snd_ps3_pcm_hw_free()
572 static int snd_ps3_delay_to_bytes(struct snd_pcm_substream *substream, in snd_ps3_delay_to_bytes() argument
578 rate = substream->runtime->rate; in snd_ps3_delay_to_bytes()
579 ret = snd_pcm_format_size(substream->runtime->format, in snd_ps3_delay_to_bytes()
581 * substream->runtime->channels; in snd_ps3_delay_to_bytes()
587 snd_pcm_format_size(substream->runtime->format, rate), in snd_ps3_delay_to_bytes()
594 static int snd_ps3_pcm_prepare(struct snd_pcm_substream *substream) in snd_ps3_pcm_prepare() argument
596 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ps3_pcm_prepare()
597 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_pcm_prepare()
600 if (!snd_ps3_set_avsetting(substream)) { in snd_ps3_pcm_prepare()
609 card->silent = snd_ps3_delay_to_bytes(substream, in snd_ps3_pcm_prepare()
645 static int snd_ps3_pcm_trigger(struct snd_pcm_substream *substream, in snd_ps3_pcm_trigger() argument
648 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_pcm_trigger()
693 struct snd_pcm_substream *substream) in snd_ps3_pcm_pointer() argument
695 struct snd_ps3_card_info *card = snd_pcm_substream_chip(substream); in snd_ps3_pcm_pointer()
706 ret = bytes_to_frames(substream->runtime, bytes * 2); in snd_ps3_pcm_pointer()