Lines Matching refs:substream
560 static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substream, in snd_ca0106_pcm_open_playback_channel() argument
563 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_open_playback_channel()
566 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_open_playback_channel()
574 epcm->substream = substream; in snd_ca0106_pcm_open_playback_channel()
596 snd_pcm_set_sync(substream); in snd_ca0106_pcm_open_playback_channel()
611 static int snd_ca0106_pcm_close_playback(struct snd_pcm_substream *substream) in snd_ca0106_pcm_close_playback() argument
613 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_close_playback()
614 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_close_playback()
632 static int snd_ca0106_pcm_open_playback_front(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_playback_front() argument
634 return snd_ca0106_pcm_open_playback_channel(substream, PCM_FRONT_CHANNEL); in snd_ca0106_pcm_open_playback_front()
637 static int snd_ca0106_pcm_open_playback_center_lfe(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_playback_center_lfe() argument
639 return snd_ca0106_pcm_open_playback_channel(substream, PCM_CENTER_LFE_CHANNEL); in snd_ca0106_pcm_open_playback_center_lfe()
642 static int snd_ca0106_pcm_open_playback_unknown(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_playback_unknown() argument
644 return snd_ca0106_pcm_open_playback_channel(substream, PCM_UNKNOWN_CHANNEL); in snd_ca0106_pcm_open_playback_unknown()
647 static int snd_ca0106_pcm_open_playback_rear(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_playback_rear() argument
649 return snd_ca0106_pcm_open_playback_channel(substream, PCM_REAR_CHANNEL); in snd_ca0106_pcm_open_playback_rear()
653 static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substream, in snd_ca0106_pcm_open_capture_channel() argument
656 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_open_capture_channel()
659 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_open_capture_channel()
669 epcm->substream = substream; in snd_ca0106_pcm_open_capture_channel()
696 static int snd_ca0106_pcm_close_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_close_capture() argument
698 struct snd_ca0106 *chip = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_close_capture()
699 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_close_capture()
706 static int snd_ca0106_pcm_open_0_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_0_capture() argument
708 return snd_ca0106_pcm_open_capture_channel(substream, 0); in snd_ca0106_pcm_open_0_capture()
711 static int snd_ca0106_pcm_open_1_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_1_capture() argument
713 return snd_ca0106_pcm_open_capture_channel(substream, 1); in snd_ca0106_pcm_open_1_capture()
716 static int snd_ca0106_pcm_open_2_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_2_capture() argument
718 return snd_ca0106_pcm_open_capture_channel(substream, 2); in snd_ca0106_pcm_open_2_capture()
721 static int snd_ca0106_pcm_open_3_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_open_3_capture() argument
723 return snd_ca0106_pcm_open_capture_channel(substream, 3); in snd_ca0106_pcm_open_3_capture()
727 static int snd_ca0106_pcm_hw_params_playback(struct snd_pcm_substream *substream, in snd_ca0106_pcm_hw_params_playback() argument
730 return snd_pcm_lib_malloc_pages(substream, in snd_ca0106_pcm_hw_params_playback()
735 static int snd_ca0106_pcm_hw_free_playback(struct snd_pcm_substream *substream) in snd_ca0106_pcm_hw_free_playback() argument
737 return snd_pcm_lib_free_pages(substream); in snd_ca0106_pcm_hw_free_playback()
741 static int snd_ca0106_pcm_hw_params_capture(struct snd_pcm_substream *substream, in snd_ca0106_pcm_hw_params_capture() argument
744 return snd_pcm_lib_malloc_pages(substream, in snd_ca0106_pcm_hw_params_capture()
749 static int snd_ca0106_pcm_hw_free_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_hw_free_capture() argument
751 return snd_pcm_lib_free_pages(substream); in snd_ca0106_pcm_hw_free_capture()
755 static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) in snd_ca0106_pcm_prepare_playback() argument
757 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_prepare_playback()
758 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_prepare_playback()
868 static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_prepare_capture() argument
870 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_prepare_capture()
871 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_prepare_capture()
959 static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream, in snd_ca0106_pcm_trigger_playback() argument
962 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_trigger_playback()
984 snd_pcm_group_for_each_entry(s, substream) { in snd_ca0106_pcm_trigger_playback()
995 snd_pcm_trigger_done(s, substream); in snd_ca0106_pcm_trigger_playback()
1026 static int snd_ca0106_pcm_trigger_capture(struct snd_pcm_substream *substream, in snd_ca0106_pcm_trigger_capture() argument
1029 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_trigger_capture()
1030 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_trigger_capture()
1055 snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream) in snd_ca0106_pcm_pointer_playback() argument
1057 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_pointer_playback()
1058 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_pointer_playback()
1085 snd_ca0106_pcm_pointer_capture(struct snd_pcm_substream *substream) in snd_ca0106_pcm_pointer_capture() argument
1087 struct snd_ca0106 *emu = snd_pcm_substream_chip(substream); in snd_ca0106_pcm_pointer_capture()
1088 struct snd_pcm_runtime *runtime = substream->runtime; in snd_ca0106_pcm_pointer_capture()
1304 snd_pcm_period_elapsed(pchannel->epcm->substream); in snd_ca0106_interrupt()
1320 snd_pcm_period_elapsed(pchannel->epcm->substream); in snd_ca0106_interrupt()
1368 struct snd_pcm_substream *substream; in snd_ca0106_pcm() local
1404 for(substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; in snd_ca0106_pcm()
1405 substream; in snd_ca0106_pcm()
1406 substream = substream->next) { in snd_ca0106_pcm()
1407 if ((err = snd_pcm_lib_preallocate_pages(substream, in snd_ca0106_pcm()
1414 for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in snd_ca0106_pcm()
1415 substream; in snd_ca0106_pcm()
1416 substream = substream->next) { in snd_ca0106_pcm()
1417 if ((err = snd_pcm_lib_preallocate_pages(substream, in snd_ca0106_pcm()