Lines Matching defs:substream

415 	struct snd_pcm_substream *substream;
664 static int snd_cmipci_playback2_hw_params(struct snd_pcm_substream *substream,
667 struct cmipci *cm = snd_pcm_substream_chip(substream);
754 struct snd_pcm_substream *substream)
758 struct snd_pcm_runtime *runtime = substream->runtime;
912 struct snd_pcm_substream *substream)
933 ptr = bytes_to_frames(substream->runtime, ptr);
935 if (substream->runtime->channels > 2)
936 ptr = (ptr * 2) / substream->runtime->channels;
944 static int snd_cmipci_playback_trigger(struct snd_pcm_substream *substream,
947 struct cmipci *cm = snd_pcm_substream_chip(substream);
951 static snd_pcm_uframes_t snd_cmipci_playback_pointer(struct snd_pcm_substream *substream)
953 struct cmipci *cm = snd_pcm_substream_chip(substream);
954 return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_PLAY], substream);
963 static int snd_cmipci_capture_trigger(struct snd_pcm_substream *substream,
966 struct cmipci *cm = snd_pcm_substream_chip(substream);
970 static snd_pcm_uframes_t snd_cmipci_capture_pointer(struct snd_pcm_substream *substream)
972 struct cmipci *cm = snd_pcm_substream_chip(substream);
973 return snd_cmipci_pcm_pointer(cm, &cm->channel[CM_CH_CAPT], substream);
1269 static int snd_cmipci_playback_prepare(struct snd_pcm_substream *substream)
1271 struct cmipci *cm = snd_pcm_substream_chip(substream);
1272 int rate = substream->runtime->rate;
1276 substream->runtime->format == SNDRV_PCM_FORMAT_S16_LE &&
1277 substream->runtime->channels == 2);
1280 err = setup_spdif_playback(cm, substream, do_spdif, do_ac3);
1283 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
1287 static int snd_cmipci_playback_spdif_prepare(struct snd_pcm_substream *substream)
1289 struct cmipci *cm = snd_pcm_substream_chip(substream);
1296 err = setup_spdif_playback(cm, substream, 1, do_ac3);
1299 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_PLAY], substream);
1312 struct snd_pcm_runtime *runtime = rec->substream->runtime;
1356 static int snd_cmipci_playback_hw_free(struct snd_pcm_substream *substream)
1358 struct cmipci *cm = snd_pcm_substream_chip(substream);
1359 setup_spdif_playback(cm, substream, 0, 0);
1365 static int snd_cmipci_playback2_hw_free(struct snd_pcm_substream *substream)
1367 struct cmipci *cm = snd_pcm_substream_chip(substream);
1373 static int snd_cmipci_capture_prepare(struct snd_pcm_substream *substream)
1375 struct cmipci *cm = snd_pcm_substream_chip(substream);
1376 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream);
1380 static int snd_cmipci_capture_spdif_prepare(struct snd_pcm_substream *substream)
1382 struct cmipci *cm = snd_pcm_substream_chip(substream);
1387 if (substream->runtime->rate > 48000)
1392 if (snd_pcm_format_width(substream->runtime->format) > 16)
1399 return snd_cmipci_pcm_prepare(cm, &cm->channel[CM_CH_CAPT], substream);
1443 snd_pcm_period_elapsed(cm->channel[0].substream);
1445 snd_pcm_period_elapsed(cm->channel[1].substream);
1601 cm->channel[ch].substream = subs;
1619 if (cm->channel[ch].substream) {
1622 cm->channel[ch].substream = NULL;
1639 static int snd_cmipci_playback_open(struct snd_pcm_substream *substream)
1641 struct cmipci *cm = snd_pcm_substream_chip(substream);
1642 struct snd_pcm_runtime *runtime = substream->runtime;
1645 err = open_device_check(cm, CM_OPEN_PLAYBACK, substream);
1666 static int snd_cmipci_capture_open(struct snd_pcm_substream *substream)
1668 struct cmipci *cm = snd_pcm_substream_chip(substream);
1669 struct snd_pcm_runtime *runtime = substream->runtime;
1672 err = open_device_check(cm, CM_OPEN_CAPTURE, substream);
1691 static int snd_cmipci_playback2_open(struct snd_pcm_substream *substream)
1693 struct cmipci *cm = snd_pcm_substream_chip(substream);
1694 struct snd_pcm_runtime *runtime = substream->runtime;
1698 err = open_device_check(cm, CM_OPEN_PLAYBACK2, substream);
1731 static int snd_cmipci_playback_spdif_open(struct snd_pcm_substream *substream)
1733 struct cmipci *cm = snd_pcm_substream_chip(substream);
1734 struct snd_pcm_runtime *runtime = substream->runtime;
1738 err = open_device_check(cm, CM_OPEN_SPDIF_PLAYBACK, substream);
1760 static int snd_cmipci_capture_spdif_open(struct snd_pcm_substream *substream)
1762 struct cmipci *cm = snd_pcm_substream_chip(substream);
1763 struct snd_pcm_runtime *runtime = substream->runtime;
1767 err = open_device_check(cm, CM_OPEN_SPDIF_CAPTURE, substream);
1784 static int snd_cmipci_playback_close(struct snd_pcm_substream *substream)
1786 struct cmipci *cm = snd_pcm_substream_chip(substream);
1791 static int snd_cmipci_capture_close(struct snd_pcm_substream *substream)
1793 struct cmipci *cm = snd_pcm_substream_chip(substream);
1798 static int snd_cmipci_playback2_close(struct snd_pcm_substream *substream)
1800 struct cmipci *cm = snd_pcm_substream_chip(substream);
1806 static int snd_cmipci_playback_spdif_close(struct snd_pcm_substream *substream)
1808 struct cmipci *cm = snd_pcm_substream_chip(substream);
1813 static int snd_cmipci_capture_spdif_close(struct snd_pcm_substream *substream)
1815 struct cmipci *cm = snd_pcm_substream_chip(substream);