Lines Matching refs:substream
26 static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_delay_compat() argument
34 err = snd_pcm_delay(substream, &delay); in snd_pcm_ioctl_delay_compat()
43 static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_rewind_compat() argument
51 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_ioctl_rewind_compat()
52 err = snd_pcm_playback_rewind(substream, frames); in snd_pcm_ioctl_rewind_compat()
54 err = snd_pcm_capture_rewind(substream, frames); in snd_pcm_ioctl_rewind_compat()
60 static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_forward_compat() argument
68 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_ioctl_forward_compat()
69 err = snd_pcm_playback_forward(substream, frames); in snd_pcm_ioctl_forward_compat()
71 err = snd_pcm_capture_forward(substream, frames); in snd_pcm_ioctl_forward_compat()
122 static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_sw_params_compat() argument
146 boundary = recalculate_boundary(substream->runtime); in snd_pcm_ioctl_sw_params_compat()
148 params.silence_size = substream->runtime->boundary; in snd_pcm_ioctl_sw_params_compat()
149 err = snd_pcm_sw_params(substream, ¶ms); in snd_pcm_ioctl_sw_params_compat()
164 static int snd_pcm_ioctl_channel_info_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_channel_info_compat() argument
175 err = snd_pcm_channel_info(substream, &info); in snd_pcm_ioctl_channel_info_compat()
188 static int snd_pcm_channel_info_user(struct snd_pcm_substream *substream,
213 static int snd_pcm_status_user_compat(struct snd_pcm_substream *substream, in snd_pcm_status_user_compat() argument
229 err = snd_pcm_status(substream, &status); in snd_pcm_status_user_compat()
277 static int snd_pcm_status_user_x32(struct snd_pcm_substream *substream, in snd_pcm_status_user_x32() argument
293 err = snd_pcm_status(substream, &status); in snd_pcm_status_user_x32()
320 static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_hw_params_compat() argument
328 if (! (runtime = substream->runtime)) in snd_pcm_ioctl_hw_params_compat()
342 err = snd_pcm_hw_refine(substream, data); in snd_pcm_ioctl_hw_params_compat()
344 err = snd_pcm_hw_params(substream, data); in snd_pcm_ioctl_hw_params_compat()
372 static int snd_pcm_ioctl_xferi_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_xferi_compat() argument
379 if (! substream->runtime) in snd_pcm_ioctl_xferi_compat()
381 if (substream->stream != dir) in snd_pcm_ioctl_xferi_compat()
383 if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) in snd_pcm_ioctl_xferi_compat()
391 err = snd_pcm_lib_write(substream, compat_ptr(buf), frames); in snd_pcm_ioctl_xferi_compat()
393 err = snd_pcm_lib_read(substream, compat_ptr(buf), frames); in snd_pcm_ioctl_xferi_compat()
416 static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_xfern_compat() argument
425 if (! substream->runtime) in snd_pcm_ioctl_xfern_compat()
427 if (substream->stream != dir) in snd_pcm_ioctl_xfern_compat()
430 if ((ch = substream->runtime->channels) > 128) in snd_pcm_ioctl_xfern_compat()
449 err = snd_pcm_lib_writev(substream, bufs, frames); in snd_pcm_ioctl_xfern_compat()
451 err = snd_pcm_lib_readv(substream, bufs, frames); in snd_pcm_ioctl_xfern_compat()
487 static int snd_pcm_ioctl_sync_ptr_compat(struct snd_pcm_substream *substream, in snd_pcm_ioctl_sync_ptr_compat() argument
490 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_ioctl_sync_ptr_compat()
507 err = snd_pcm_hwsync(substream); in snd_pcm_ioctl_sync_ptr_compat()
516 snd_pcm_stream_lock_irq(substream); in snd_pcm_ioctl_sync_ptr_compat()
531 snd_pcm_stream_unlock_irq(substream); in snd_pcm_ioctl_sync_ptr_compat()
575 static int snd_pcm_ioctl_sync_ptr_x32(struct snd_pcm_substream *substream, in snd_pcm_ioctl_sync_ptr_x32() argument
578 struct snd_pcm_runtime *runtime = substream->runtime; in snd_pcm_ioctl_sync_ptr_x32()
595 err = snd_pcm_hwsync(substream); in snd_pcm_ioctl_sync_ptr_x32()
604 snd_pcm_stream_lock_irq(substream); in snd_pcm_ioctl_sync_ptr_x32()
619 snd_pcm_stream_unlock_irq(substream); in snd_pcm_ioctl_sync_ptr_x32()
661 struct snd_pcm_substream *substream; in snd_pcm_ioctl_compat() local
667 substream = pcm_file->substream; in snd_pcm_ioctl_compat()
668 if (! substream) in snd_pcm_ioctl_compat()
695 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_pcm_ioctl_compat()
696 return snd_pcm_playback_ioctl1(file, substream, cmd, argp); in snd_pcm_ioctl_compat()
698 return snd_pcm_capture_ioctl1(file, substream, cmd, argp); in snd_pcm_ioctl_compat()
700 return snd_pcm_ioctl_hw_params_compat(substream, 1, argp); in snd_pcm_ioctl_compat()
702 return snd_pcm_ioctl_hw_params_compat(substream, 0, argp); in snd_pcm_ioctl_compat()
704 return snd_pcm_ioctl_sw_params_compat(substream, argp); in snd_pcm_ioctl_compat()
706 return snd_pcm_status_user_compat(substream, argp, false); in snd_pcm_ioctl_compat()
708 return snd_pcm_status_user_compat(substream, argp, true); in snd_pcm_ioctl_compat()
710 return snd_pcm_ioctl_sync_ptr_compat(substream, argp); in snd_pcm_ioctl_compat()
712 return snd_pcm_ioctl_channel_info_compat(substream, argp); in snd_pcm_ioctl_compat()
714 return snd_pcm_ioctl_xferi_compat(substream, SNDRV_PCM_STREAM_PLAYBACK, argp); in snd_pcm_ioctl_compat()
716 return snd_pcm_ioctl_xferi_compat(substream, SNDRV_PCM_STREAM_CAPTURE, argp); in snd_pcm_ioctl_compat()
718 return snd_pcm_ioctl_xfern_compat(substream, SNDRV_PCM_STREAM_PLAYBACK, argp); in snd_pcm_ioctl_compat()
720 return snd_pcm_ioctl_xfern_compat(substream, SNDRV_PCM_STREAM_CAPTURE, argp); in snd_pcm_ioctl_compat()
722 return snd_pcm_ioctl_delay_compat(substream, argp); in snd_pcm_ioctl_compat()
724 return snd_pcm_ioctl_rewind_compat(substream, argp); in snd_pcm_ioctl_compat()
726 return snd_pcm_ioctl_forward_compat(substream, argp); in snd_pcm_ioctl_compat()
729 return snd_pcm_status_user_x32(substream, argp, false); in snd_pcm_ioctl_compat()
731 return snd_pcm_status_user_x32(substream, argp, true); in snd_pcm_ioctl_compat()
733 return snd_pcm_ioctl_sync_ptr_x32(substream, argp); in snd_pcm_ioctl_compat()
735 return snd_pcm_ioctl_channel_info_x32(substream, argp); in snd_pcm_ioctl_compat()