Lines Matching refs:substream

433 	struct snd_pcm_substream *substream;  member
682 static int snd_cmipci_hw_params(struct snd_pcm_substream *substream, in snd_cmipci_hw_params() argument
685 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_cmipci_hw_params()
688 static int snd_cmipci_playback2_hw_params(struct snd_pcm_substream *substream, in snd_cmipci_playback2_hw_params() argument
691 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback2_hw_params()
702 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_cmipci_playback2_hw_params()
713 static int snd_cmipci_hw_free(struct snd_pcm_substream *substream) in snd_cmipci_hw_free() argument
715 return snd_pcm_lib_free_pages(substream); in snd_cmipci_hw_free()
783 struct snd_pcm_substream *substream) in snd_cmipci_pcm_prepare() argument
787 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_pcm_prepare()
941 struct snd_pcm_substream *substream) in snd_cmipci_pcm_pointer() argument
962 ptr = bytes_to_frames(substream->runtime, ptr); in snd_cmipci_pcm_pointer()
964 if (substream->runtime->channels > 2) in snd_cmipci_pcm_pointer()
965 ptr = (ptr * 2) / substream->runtime->channels; in snd_cmipci_pcm_pointer()
973 static int snd_cmipci_playback_trigger(struct snd_pcm_substream *substream, in snd_cmipci_playback_trigger() argument
976 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_trigger()
980 static snd_pcm_uframes_t snd_cmipci_playback_pointer(struct snd_pcm_substream *substream) in snd_cmipci_playback_pointer() argument
982 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_pointer()
983 return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_PLAY], substream); in snd_cmipci_playback_pointer()
992 static int snd_cmipci_capture_trigger(struct snd_pcm_substream *substream, in snd_cmipci_capture_trigger() argument
995 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_trigger()
999 static snd_pcm_uframes_t snd_cmipci_capture_pointer(struct snd_pcm_substream *substream) in snd_cmipci_capture_pointer() argument
1001 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_pointer()
1002 return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_CAPT], substream); in snd_cmipci_capture_pointer()
1296 static int snd_cmipci_playback_prepare(struct snd_pcm_substream *substream) in snd_cmipci_playback_prepare() argument
1298 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_prepare()
1299 int rate = substream->runtime->rate; in snd_cmipci_playback_prepare()
1303 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE && in snd_cmipci_playback_prepare()
1304 substream->runtime->channels == 2); in snd_cmipci_playback_prepare()
1307 if ((err = setup_spdif_playback(cm, substream, do_spdif, do_ac3)) < 0) in snd_cmipci_playback_prepare()
1309 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream); in snd_cmipci_playback_prepare()
1313 static int snd_cmipci_playback_spdif_prepare(struct snd_pcm_substream *substream) in snd_cmipci_playback_spdif_prepare() argument
1315 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_spdif_prepare()
1322 if ((err = setup_spdif_playback(cm, substream, 1, do_ac3)) < 0) in snd_cmipci_playback_spdif_prepare()
1324 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream); in snd_cmipci_playback_spdif_prepare()
1337 struct snd_pcm_runtime *runtime = rec->substream->runtime; in snd_cmipci_silence_hack()
1381 static int snd_cmipci_playback_hw_free(struct snd_pcm_substream *substream) in snd_cmipci_playback_hw_free() argument
1383 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_hw_free()
1384 setup_spdif_playback(cm, substream, 0, 0); in snd_cmipci_playback_hw_free()
1387 return snd_cmipci_hw_free(substream); in snd_cmipci_playback_hw_free()
1390 static int snd_cmipci_playback2_hw_free(struct snd_pcm_substream *substream) in snd_cmipci_playback2_hw_free() argument
1392 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback2_hw_free()
1394 return snd_cmipci_hw_free(substream); in snd_cmipci_playback2_hw_free()
1398 static int snd_cmipci_capture_prepare(struct snd_pcm_substream *substream) in snd_cmipci_capture_prepare() argument
1400 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_prepare()
1401 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream); in snd_cmipci_capture_prepare()
1405 static int snd_cmipci_capture_spdif_prepare(struct snd_pcm_substream *substream) in snd_cmipci_capture_spdif_prepare() argument
1407 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_spdif_prepare()
1412 if (substream->runtime->rate > 48000) in snd_cmipci_capture_spdif_prepare()
1417 if (snd_pcm_format_width(substream->runtime->format) > 16) in snd_cmipci_capture_spdif_prepare()
1424 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream); in snd_cmipci_capture_spdif_prepare()
1468 snd_pcm_period_elapsed(cm->channel[0].substream); in snd_cmipci_interrupt()
1470 snd_pcm_period_elapsed(cm->channel[1].substream); in snd_cmipci_interrupt()
1626 cm->channel[ch].substream = subs; in open_device_check()
1644 if (cm->channel[ch].substream) { in close_device_check()
1647 cm->channel[ch].substream = NULL; in close_device_check()
1664 static int snd_cmipci_playback_open(struct snd_pcm_substream *substream) in snd_cmipci_playback_open() argument
1666 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_open()
1667 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_playback_open()
1670 if ((err = open_device_check(cm, CM_OPEN_PLAYBACK, substream)) < 0) in snd_cmipci_playback_open()
1690 static int snd_cmipci_capture_open(struct snd_pcm_substream *substream) in snd_cmipci_capture_open() argument
1692 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_open()
1693 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_capture_open()
1696 if ((err = open_device_check(cm, CM_OPEN_CAPTURE, substream)) < 0) in snd_cmipci_capture_open()
1714 static int snd_cmipci_playback2_open(struct snd_pcm_substream *substream) in snd_cmipci_playback2_open() argument
1716 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback2_open()
1717 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_playback2_open()
1720 if ((err = open_device_check(cm, CM_OPEN_PLAYBACK2, substream)) < 0) /* use channel B */ in snd_cmipci_playback2_open()
1752 static int snd_cmipci_playback_spdif_open(struct snd_pcm_substream *substream) in snd_cmipci_playback_spdif_open() argument
1754 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_spdif_open()
1755 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_playback_spdif_open()
1758 if ((err = open_device_check(cm, CM_OPEN_SPDIF_PLAYBACK, substream)) < 0) /* use channel A */ in snd_cmipci_playback_spdif_open()
1779 static int snd_cmipci_capture_spdif_open(struct snd_pcm_substream *substream) in snd_cmipci_capture_spdif_open() argument
1781 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_spdif_open()
1782 struct snd_pcm_runtime *runtime = substream->runtime; in snd_cmipci_capture_spdif_open()
1785 if ((err = open_device_check(cm, CM_OPEN_SPDIF_CAPTURE, substream)) < 0) /* use channel B */ in snd_cmipci_capture_spdif_open()
1801 static int snd_cmipci_playback_close(struct snd_pcm_substream *substream) in snd_cmipci_playback_close() argument
1803 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_close()
1808 static int snd_cmipci_capture_close(struct snd_pcm_substream *substream) in snd_cmipci_capture_close() argument
1810 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_close()
1815 static int snd_cmipci_playback2_close(struct snd_pcm_substream *substream) in snd_cmipci_playback2_close() argument
1817 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback2_close()
1823 static int snd_cmipci_playback_spdif_close(struct snd_pcm_substream *substream) in snd_cmipci_playback_spdif_close() argument
1825 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_playback_spdif_close()
1830 static int snd_cmipci_capture_spdif_close(struct snd_pcm_substream *substream) in snd_cmipci_capture_spdif_close() argument
1832 struct cmipci *cm = snd_pcm_substream_chip(substream); in snd_cmipci_capture_spdif_close()