Lines Matching defs:substream

23  *   When the substream stops, the ops->sync_stop() waits until the device has
96 static int virtsnd_pcm_sync_stop(struct snd_pcm_substream *substream);
99 * virtsnd_pcm_open() - Open the PCM substream.
100 * @substream: Kernel ALSA substream.
105 static int virtsnd_pcm_open(struct snd_pcm_substream *substream)
107 struct virtio_pcm *vpcm = snd_pcm_substream_chip(substream);
108 struct virtio_pcm_stream *vs = &vpcm->streams[substream->stream];
109 struct virtio_pcm_substream *vss = vs->substreams[substream->number];
111 substream->runtime->hw = vss->hw;
112 substream->private_data = vss;
114 snd_pcm_hw_constraint_integer(substream->runtime,
121 * If the substream has already been used, then the I/O queue may be in
125 return virtsnd_pcm_sync_stop(substream);
129 * virtsnd_pcm_close() - Close the PCM substream.
130 * @substream: Kernel ALSA substream.
135 static int virtsnd_pcm_close(struct snd_pcm_substream *substream)
141 * virtsnd_pcm_dev_set_params() - Set the parameters of the PCM substream on
143 * @vss: VirtIO PCM substream.
207 * virtsnd_pcm_hw_params() - Set the parameters of the PCM substream.
208 * @substream: Kernel ALSA substream.
214 static int virtsnd_pcm_hw_params(struct snd_pcm_substream *substream,
217 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
246 * virtsnd_pcm_hw_free() - Reset the parameters of the PCM substream.
247 * @substream: Kernel ALSA substream.
252 static int virtsnd_pcm_hw_free(struct snd_pcm_substream *substream)
254 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
264 * virtsnd_pcm_prepare() - Prepare the PCM substream.
265 * @substream: Kernel ALSA substream.
270 static int virtsnd_pcm_prepare(struct snd_pcm_substream *substream)
272 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
283 vss->buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
286 struct snd_pcm_runtime *runtime = substream->runtime;
287 unsigned int buffer_bytes = snd_pcm_lib_buffer_bytes(substream);
288 unsigned int period_bytes = snd_pcm_lib_period_bytes(substream);
305 snd_pcm_lib_buffer_bytes(substream);
316 * virtsnd_pcm_trigger() - Process command for the PCM substream.
317 * @substream: Kernel ALSA substream.
320 * Context: Any context. Takes and releases the VirtIO substream spinlock.
324 static int virtsnd_pcm_trigger(struct snd_pcm_substream *substream, int command)
326 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
383 * virtsnd_pcm_sync_stop() - Synchronous PCM substream stop.
384 * @substream: Kernel ALSA substream.
389 * Context: Process context. Takes and releases the VirtIO substream spinlock.
392 static int virtsnd_pcm_sync_stop(struct snd_pcm_substream *substream)
394 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
418 * indication that the substream has been released.
437 * substream for playback.
438 * @substream: Kernel ALSA substream.
444 virtsnd_pcm_pb_pointer(struct snd_pcm_substream *substream)
446 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
448 return snd_pcm_indirect_playback_pointer(substream,
455 * substream for capture.
456 * @substream: Kernel ALSA substream.
462 virtsnd_pcm_cp_pointer(struct snd_pcm_substream *substream)
464 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
466 return snd_pcm_indirect_capture_pointer(substream,
471 static void virtsnd_pcm_trans_copy(struct snd_pcm_substream *substream,
474 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
479 static int virtsnd_pcm_pb_ack(struct snd_pcm_substream *substream)
481 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
489 rc = snd_pcm_indirect_playback_transfer(substream, &vss->pcm_indirect,
498 static int virtsnd_pcm_cp_ack(struct snd_pcm_substream *substream)
500 struct virtio_pcm_substream *vss = snd_pcm_substream_chip(substream);
508 rc = snd_pcm_indirect_capture_transfer(substream, &vss->pcm_indirect,
517 /* PCM substream operators map. */