Lines Matching refs:usbtv
67 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_pcm_open()
78 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_pcm_close()
90 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_prepare()
100 struct usbtv *chip = urb->context; in usbtv_audio_urb_received()
172 static int usbtv_audio_start(struct usbtv *chip) in usbtv_audio_start()
231 static int usbtv_audio_stop(struct usbtv *chip) in usbtv_audio_stop()
256 void usbtv_audio_suspend(struct usbtv *usbtv) in usbtv_audio_suspend() argument
258 if (atomic_read(&usbtv->snd_stream) && usbtv->snd_bulk_urb) in usbtv_audio_suspend()
259 usb_kill_urb(usbtv->snd_bulk_urb); in usbtv_audio_suspend()
262 void usbtv_audio_resume(struct usbtv *usbtv) in usbtv_audio_resume() argument
264 if (atomic_read(&usbtv->snd_stream) && usbtv->snd_bulk_urb) in usbtv_audio_resume()
265 usb_submit_urb(usbtv->snd_bulk_urb, GFP_ATOMIC); in usbtv_audio_resume()
270 struct usbtv *chip = container_of(work, struct usbtv, snd_trigger); in snd_usbtv_trigger()
283 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_card_trigger()
307 struct usbtv *chip = snd_pcm_substream_chip(substream); in snd_usbtv_pointer()
320 int usbtv_audio_init(struct usbtv *usbtv) in usbtv_audio_init() argument
326 INIT_WORK(&usbtv->snd_trigger, snd_usbtv_trigger); in usbtv_audio_init()
327 atomic_set(&usbtv->snd_stream, 0); in usbtv_audio_init()
329 rv = snd_card_new(&usbtv->udev->dev, SNDRV_DEFAULT_IDX1, "usbtv", in usbtv_audio_init()
334 strscpy(card->driver, usbtv->dev->driver->name, sizeof(card->driver)); in usbtv_audio_init()
337 "USBTV Audio at bus %d device %d", usbtv->udev->bus->busnum, in usbtv_audio_init()
338 usbtv->udev->devnum); in usbtv_audio_init()
340 snd_card_set_dev(card, usbtv->dev); in usbtv_audio_init()
342 usbtv->snd = card; in usbtv_audio_init()
350 pcm->private_data = usbtv; in usbtv_audio_init()
363 usbtv->snd = NULL; in usbtv_audio_init()
369 void usbtv_audio_free(struct usbtv *usbtv) in usbtv_audio_free() argument
371 cancel_work_sync(&usbtv->snd_trigger); in usbtv_audio_free()
373 if (usbtv->snd && usbtv->udev) { in usbtv_audio_free()
374 snd_card_free_when_closed(usbtv->snd); in usbtv_audio_free()
375 usbtv->snd = NULL; in usbtv_audio_free()