Lines Matching refs:substream

414 				struct snd_pcm_substream *substream,  in snd_es18xx_rate_set()  argument
418 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_rate_set()
448 static int snd_es18xx_playback_hw_params(struct snd_pcm_substream *substream, in snd_es18xx_playback_hw_params() argument
451 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_hw_params()
460 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) { in snd_es18xx_playback_hw_params()
471 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_es18xx_playback_hw_params()
476 static int snd_es18xx_pcm_hw_free(struct snd_pcm_substream *substream) in snd_es18xx_pcm_hw_free() argument
478 return snd_pcm_lib_free_pages(substream); in snd_es18xx_pcm_hw_free()
482 struct snd_pcm_substream *substream) in snd_es18xx_playback1_prepare() argument
484 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback1_prepare()
485 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_es18xx_playback1_prepare()
486 unsigned int count = snd_pcm_lib_period_bytes(substream); in snd_es18xx_playback1_prepare()
488 snd_es18xx_rate_set(chip, substream, DAC2); in snd_es18xx_playback1_prepare()
508 struct snd_pcm_substream *substream, in snd_es18xx_playback1_trigger() argument
557 static int snd_es18xx_capture_hw_params(struct snd_pcm_substream *substream, in snd_es18xx_capture_hw_params() argument
560 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_hw_params()
575 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_es18xx_capture_hw_params()
580 static int snd_es18xx_capture_prepare(struct snd_pcm_substream *substream) in snd_es18xx_capture_prepare() argument
582 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_prepare()
583 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_capture_prepare()
584 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_es18xx_capture_prepare()
585 unsigned int count = snd_pcm_lib_period_bytes(substream); in snd_es18xx_capture_prepare()
592 snd_es18xx_rate_set(chip, substream, ADC1); in snd_es18xx_capture_prepare()
617 static int snd_es18xx_capture_trigger(struct snd_pcm_substream *substream, in snd_es18xx_capture_trigger() argument
620 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_trigger()
647 struct snd_pcm_substream *substream) in snd_es18xx_playback2_prepare() argument
649 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback2_prepare()
650 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_es18xx_playback2_prepare()
651 unsigned int count = snd_pcm_lib_period_bytes(substream); in snd_es18xx_playback2_prepare()
658 snd_es18xx_rate_set(chip, substream, DAC1); in snd_es18xx_playback2_prepare()
682 struct snd_pcm_substream *substream, in snd_es18xx_playback2_trigger() argument
721 static int snd_es18xx_playback_prepare(struct snd_pcm_substream *substream) in snd_es18xx_playback_prepare() argument
723 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_prepare()
724 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) in snd_es18xx_playback_prepare()
725 return snd_es18xx_playback1_prepare(chip, substream); in snd_es18xx_playback_prepare()
727 return snd_es18xx_playback2_prepare(chip, substream); in snd_es18xx_playback_prepare()
730 static int snd_es18xx_playback_trigger(struct snd_pcm_substream *substream, in snd_es18xx_playback_trigger() argument
733 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_trigger()
734 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) in snd_es18xx_playback_trigger()
735 return snd_es18xx_playback1_trigger(chip, substream, cmd); in snd_es18xx_playback_trigger()
737 return snd_es18xx_playback2_trigger(chip, substream, cmd); in snd_es18xx_playback_trigger()
810 static snd_pcm_uframes_t snd_es18xx_playback_pointer(struct snd_pcm_substream *substream) in snd_es18xx_playback_pointer() argument
812 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_pointer()
813 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_es18xx_playback_pointer()
816 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) { in snd_es18xx_playback_pointer()
829 static snd_pcm_uframes_t snd_es18xx_capture_pointer(struct snd_pcm_substream *substream) in snd_es18xx_capture_pointer() argument
831 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_pointer()
832 unsigned int size = snd_pcm_lib_buffer_bytes(substream); in snd_es18xx_capture_pointer()
881 static int snd_es18xx_playback_open(struct snd_pcm_substream *substream) in snd_es18xx_playback_open() argument
883 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_playback_open()
884 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_open()
886 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) { in snd_es18xx_playback_open()
891 chip->playback_a_substream = substream; in snd_es18xx_playback_open()
892 } else if (substream->number <= 1) { in snd_es18xx_playback_open()
895 chip->playback_b_substream = substream; in snd_es18xx_playback_open()
900 substream->runtime->hw = snd_es18xx_playback; in snd_es18xx_playback_open()
906 static int snd_es18xx_capture_open(struct snd_pcm_substream *substream) in snd_es18xx_capture_open() argument
908 struct snd_pcm_runtime *runtime = substream->runtime; in snd_es18xx_capture_open()
909 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_open()
917 chip->capture_a_substream = substream; in snd_es18xx_capture_open()
918 substream->runtime->hw = snd_es18xx_capture; in snd_es18xx_capture_open()
924 static int snd_es18xx_playback_close(struct snd_pcm_substream *substream) in snd_es18xx_playback_close() argument
926 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_playback_close()
928 if (substream->number == 0 && (chip->caps & ES18XX_PCM2)) in snd_es18xx_playback_close()
933 snd_pcm_lib_free_pages(substream); in snd_es18xx_playback_close()
937 static int snd_es18xx_capture_close(struct snd_pcm_substream *substream) in snd_es18xx_capture_close() argument
939 struct snd_es18xx *chip = snd_pcm_substream_chip(substream); in snd_es18xx_capture_close()
942 snd_pcm_lib_free_pages(substream); in snd_es18xx_capture_close()