Lines Matching refs:substream

41 azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream)
45 s = snd_hdac_stream_assign(azx_bus(chip), substream);
58 to_hda_pcm_stream(struct snd_pcm_substream *substream)
60 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
61 return &apcm->info->stream[substream->stream];
64 static u64 azx_adjust_codec_delay(struct snd_pcm_substream *substream,
67 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
68 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
74 codec_frames = hinfo->ops.get_delay(hinfo, apcm->codec, substream);
76 substream->runtime->rate);
78 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
88 static int azx_pcm_close(struct snd_pcm_substream *substream)
90 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
91 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
93 struct azx_dev *azx_dev = get_azx_dev(substream);
99 hinfo->ops.close(hinfo, apcm->codec, substream);
106 static int azx_pcm_hw_params(struct snd_pcm_substream *substream,
109 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
111 struct azx_dev *azx_dev = get_azx_dev(substream);
137 static int azx_pcm_hw_free(struct snd_pcm_substream *substream)
139 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
140 struct azx_dev *azx_dev = get_azx_dev(substream);
141 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
148 snd_hda_codec_cleanup(apcm->codec, hinfo, substream);
155 static int azx_pcm_prepare(struct snd_pcm_substream *substream)
157 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
159 struct azx_dev *azx_dev = get_azx_dev(substream);
160 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
161 struct snd_pcm_runtime *runtime = substream->runtime;
199 azx_dev->core.format_val, substream);
208 static int azx_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
210 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
220 azx_dev = get_azx_dev(substream);
247 snd_pcm_group_for_each_entry(s, substream) {
248 if (s->pcm->card != substream->pcm->card)
252 snd_pcm_trigger_done(s, substream);
260 snd_pcm_group_for_each_entry(s, substream) {
261 if (s->pcm->card != substream->pcm->card)
299 struct snd_pcm_substream *substream = azx_dev->core.substream;
301 int stream = substream->stream;
312 if (substream->runtime) {
313 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
314 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
320 substream);
321 substream->runtime->delay = delay;
329 static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream)
331 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
333 struct azx_dev *azx_dev = get_azx_dev(substream);
334 return bytes_to_frames(substream->runtime,
373 struct snd_pcm_substream *substream = ctx;
374 struct azx_dev *azx_dev = get_azx_dev(substream);
375 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
386 runtime = substream->runtime;
388 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
479 static int azx_get_crosststamp(struct snd_pcm_substream *substream,
483 substream, NULL, xtstamp);
496 static int azx_get_time_info(struct snd_pcm_substream *substream,
501 struct azx_dev *azx_dev = get_azx_dev(substream);
502 struct snd_pcm_runtime *runtime = substream->runtime;
507 if ((substream->runtime->hw.info & SNDRV_PCM_INFO_HAS_LINK_ATIME) &&
510 snd_pcm_gettime(substream->runtime, system_ts);
514 nsec = azx_adjust_codec_delay(substream, nsec);
524 ret = azx_get_crosststamp(substream, &xtstamp);
583 static int azx_pcm_open(struct snd_pcm_substream *substream)
585 struct azx_pcm *apcm = snd_pcm_substream_chip(substream);
586 struct hda_pcm_stream *hinfo = to_hda_pcm_stream(substream);
589 struct snd_pcm_runtime *runtime = substream->runtime;
595 azx_dev = azx_assign_device(chip, substream);
639 err = hinfo->ops.open(hinfo, apcm->codec, substream);
654 hinfo->ops.close(hinfo, apcm->codec, substream);
661 if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
666 snd_pcm_set_sync(substream);
1065 snd_pcm_period_elapsed(azx_stream(azx_dev)->substream);