Lines Matching refs:sub

65 	           struct snd_pcm_substream *sub)  in activate_substream()  argument
69 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) in activate_substream()
70 cdev->sub_playback[sub->number] = sub; in activate_substream()
72 cdev->sub_capture[sub->number] = sub; in activate_substream()
79 struct snd_pcm_substream *sub) in deactivate_substream() argument
84 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) in deactivate_substream()
85 cdev->sub_playback[sub->number] = NULL; in deactivate_substream()
87 cdev->sub_capture[sub->number] = NULL; in deactivate_substream()
183 static int snd_usb_caiaq_pcm_hw_params(struct snd_pcm_substream *sub, in snd_usb_caiaq_pcm_hw_params() argument
186 return snd_pcm_lib_alloc_vmalloc_buffer(sub, in snd_usb_caiaq_pcm_hw_params()
190 static int snd_usb_caiaq_pcm_hw_free(struct snd_pcm_substream *sub) in snd_usb_caiaq_pcm_hw_free() argument
192 struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(sub); in snd_usb_caiaq_pcm_hw_free()
193 deactivate_substream(cdev, sub); in snd_usb_caiaq_pcm_hw_free()
194 return snd_pcm_lib_free_vmalloc_buffer(sub); in snd_usb_caiaq_pcm_hw_free()
291 static int snd_usb_caiaq_pcm_trigger(struct snd_pcm_substream *sub, int cmd) in snd_usb_caiaq_pcm_trigger() argument
293 struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(sub); in snd_usb_caiaq_pcm_trigger()
296 dev_dbg(dev, "%s(%p) cmd %d\n", __func__, sub, cmd); in snd_usb_caiaq_pcm_trigger()
301 activate_substream(cdev, sub); in snd_usb_caiaq_pcm_trigger()
305 deactivate_substream(cdev, sub); in snd_usb_caiaq_pcm_trigger()
315 snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub) in snd_usb_caiaq_pcm_pointer() argument
317 int index = sub->number; in snd_usb_caiaq_pcm_pointer()
318 struct snd_usb_caiaqdev *cdev = snd_pcm_substream_chip(sub); in snd_usb_caiaq_pcm_pointer()
328 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) in snd_usb_caiaq_pcm_pointer()
329 ptr = bytes_to_frames(sub->runtime, in snd_usb_caiaq_pcm_pointer()
332 ptr = bytes_to_frames(sub->runtime, in snd_usb_caiaq_pcm_pointer()
358 struct snd_pcm_substream *sub; in check_for_elapsed_periods() local
361 sub = subs[stream]; in check_for_elapsed_periods()
362 if (!sub) in check_for_elapsed_periods()
365 pb = snd_pcm_lib_period_bytes(sub); in check_for_elapsed_periods()
366 cnt = (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in check_for_elapsed_periods()
371 snd_pcm_period_elapsed(sub); in check_for_elapsed_periods()
382 struct snd_pcm_substream *sub; in read_in_urb_mode0() local
390 sub = cdev->sub_capture[stream]; in read_in_urb_mode0()
391 if (sub) { in read_in_urb_mode0()
392 struct snd_pcm_runtime *rt = sub->runtime; in read_in_urb_mode0()
411 struct snd_pcm_substream *sub; in read_in_urb_mode2() local
434 sub = cdev->sub_capture[stream]; in read_in_urb_mode2()
438 if (sub) { in read_in_urb_mode2()
439 struct snd_pcm_runtime *rt = sub->runtime; in read_in_urb_mode2()
466 struct snd_pcm_substream *sub = cdev->sub_capture[stream]; in read_in_urb_mode3() local
470 if (sub && !cdev->input_panic) { in read_in_urb_mode3()
471 struct snd_pcm_runtime *rt = sub->runtime; in read_in_urb_mode3()
545 struct snd_pcm_substream *sub; in fill_out_urb_mode_0() local
550 sub = cdev->sub_playback[stream]; in fill_out_urb_mode_0()
551 if (sub) { in fill_out_urb_mode_0()
552 struct snd_pcm_runtime *rt = sub->runtime; in fill_out_urb_mode_0()
583 struct snd_pcm_substream *sub = cdev->sub_playback[stream]; in fill_out_urb_mode_3() local
587 if (sub) { in fill_out_urb_mode_3()
588 struct snd_pcm_runtime *rt = sub->runtime; in fill_out_urb_mode_3()