Searched refs:as102_dev (Results 1 - 2 of 2) sorted by relevance

/linux-4.4.14/drivers/media/usb/as102/
H A Das102_drv.c146 struct as102_dev_t *as102_dev = demux->priv; as102_dvb_dmx_start_feed() local
148 if (mutex_lock_interruptible(&as102_dev->sem)) as102_dvb_dmx_start_feed()
152 as10x_pid_filter(as102_dev, dvbdmxfeed->index, as102_dvb_dmx_start_feed()
155 if (as102_dev->streaming++ == 0) as102_dvb_dmx_start_feed()
156 ret = as102_start_stream(as102_dev); as102_dvb_dmx_start_feed()
158 mutex_unlock(&as102_dev->sem); as102_dvb_dmx_start_feed()
165 struct as102_dev_t *as102_dev = demux->priv; as102_dvb_dmx_stop_feed() local
167 if (mutex_lock_interruptible(&as102_dev->sem)) as102_dvb_dmx_stop_feed()
170 if (--as102_dev->streaming == 0) as102_dvb_dmx_stop_feed()
171 as102_stop_stream(as102_dev); as102_dvb_dmx_stop_feed()
174 as10x_pid_filter(as102_dev, dvbdmxfeed->index, as102_dvb_dmx_stop_feed()
177 mutex_unlock(&as102_dev->sem); as102_dvb_dmx_stop_feed()
294 int as102_dvb_register(struct as102_dev_t *as102_dev) as102_dvb_register() argument
296 struct device *dev = &as102_dev->bus_adap.usb_dev->dev; as102_dvb_register()
299 ret = dvb_register_adapter(&as102_dev->dvb_adap, as102_dvb_register()
300 as102_dev->name, THIS_MODULE, as102_dvb_register()
308 as102_dev->dvb_dmx.priv = as102_dev; as102_dvb_register()
309 as102_dev->dvb_dmx.filternum = pid_filtering ? 16 : 256; as102_dvb_register()
310 as102_dev->dvb_dmx.feednum = 256; as102_dvb_register()
311 as102_dev->dvb_dmx.start_feed = as102_dvb_dmx_start_feed; as102_dvb_register()
312 as102_dev->dvb_dmx.stop_feed = as102_dvb_dmx_stop_feed; as102_dvb_register()
314 as102_dev->dvb_dmx.dmx.capabilities = DMX_TS_FILTERING | as102_dvb_register()
317 as102_dev->dvb_dmxdev.filternum = as102_dev->dvb_dmx.filternum; as102_dvb_register()
318 as102_dev->dvb_dmxdev.demux = &as102_dev->dvb_dmx.dmx; as102_dvb_register()
319 as102_dev->dvb_dmxdev.capabilities = 0; as102_dvb_register()
321 ret = dvb_dmx_init(&as102_dev->dvb_dmx); as102_dvb_register()
327 ret = dvb_dmxdev_init(&as102_dev->dvb_dmxdev, &as102_dev->dvb_adap); as102_dvb_register()
335 as102_dev->dvb_fe = dvb_attach(as102_attach, as102_dev->name, as102_dvb_register()
337 &as102_dev->bus_adap, as102_dvb_register()
338 as102_dev->elna_cfg); as102_dvb_register()
339 if (!as102_dev->dvb_fe) { as102_dvb_register()
346 ret = dvb_register_frontend(&as102_dev->dvb_adap, as102_dev->dvb_fe); as102_dvb_register()
354 mutex_init(&as102_dev->bus_adap.lock); as102_dvb_register()
357 mutex_init(&as102_dev->sem); as102_dvb_register()
364 try_then_request_module(as102_fw_upload(&as102_dev->bus_adap), as102_dvb_register()
367 pr_info("Registered device %s", as102_dev->name); as102_dvb_register()
371 dvb_dmxdev_release(&as102_dev->dvb_dmxdev); as102_dvb_register()
373 dvb_dmx_release(&as102_dev->dvb_dmx); as102_dvb_register()
375 dvb_unregister_adapter(&as102_dev->dvb_adap); as102_dvb_register()
379 void as102_dvb_unregister(struct as102_dev_t *as102_dev) as102_dvb_unregister() argument
382 dvb_unregister_frontend(as102_dev->dvb_fe); as102_dvb_unregister()
385 dvb_frontend_detach(as102_dev->dvb_fe); as102_dvb_unregister()
388 dvb_dmxdev_release(&as102_dev->dvb_dmxdev); as102_dvb_unregister()
389 dvb_dmx_release(&as102_dev->dvb_dmx); as102_dvb_unregister()
392 dvb_unregister_adapter(&as102_dev->dvb_adap); as102_dvb_unregister()
394 pr_info("Unregistered device %s", as102_dev->name); as102_dvb_unregister()
H A Das102_usb_drv.c222 struct as102_dev_t *as102_dev = urb->context; as102_urb_stream_irq() local
225 dvb_dmx_swfilter(&as102_dev->dvb_dmx, as102_urb_stream_irq()
234 if (as102_dev->streaming) as102_urb_stream_irq()
235 as102_submit_urb_stream(as102_dev, urb); as102_urb_stream_irq()
314 struct as102_dev_t *as102_dev; as102_usb_release() local
316 as102_dev = container_of(kref, struct as102_dev_t, kref); as102_usb_release()
317 if (as102_dev != NULL) { as102_usb_release()
318 usb_put_dev(as102_dev->bus_adap.usb_dev); as102_usb_release()
319 kfree(as102_dev); as102_usb_release()
325 struct as102_dev_t *as102_dev; as102_usb_disconnect() local
328 as102_dev = usb_get_intfdata(intf); as102_usb_disconnect()
331 as102_dvb_unregister(as102_dev); as102_usb_disconnect()
334 as102_free_usb_stream_buffer(as102_dev); as102_usb_disconnect()
342 kref_put(&as102_dev->kref, as102_usb_release); as102_usb_disconnect()
351 struct as102_dev_t *as102_dev; as102_usb_probe() local
361 as102_dev = kzalloc(sizeof(struct as102_dev_t), GFP_KERNEL); as102_usb_probe()
362 if (as102_dev == NULL) as102_usb_probe()
368 as102_dev->name = as102_device_names[i]; as102_usb_probe()
369 as102_dev->elna_cfg = as102_elna_cfg[i]; as102_usb_probe()
373 if (as102_dev->name == NULL) as102_usb_probe()
374 as102_dev->name = "Unknown AS102 device"; as102_usb_probe()
377 as102_dev->bus_adap.ops = &as102_priv_ops; as102_usb_probe()
380 as102_dev->bus_adap.cmd = &as102_dev->bus_adap.token.usb.c; as102_usb_probe()
381 as102_dev->bus_adap.rsp = &as102_dev->bus_adap.token.usb.r; as102_usb_probe()
384 kref_init(&as102_dev->kref); as102_usb_probe()
387 usb_set_intfdata(intf, (void *) as102_dev); as102_usb_probe()
390 as102_dev->bus_adap.usb_dev = usb_get_dev(interface_to_usbdev(intf)); as102_usb_probe()
405 ret = as102_alloc_usb_stream_buffer(as102_dev); as102_usb_probe()
410 ret = as102_dvb_register(as102_dev); as102_usb_probe()
417 as102_free_usb_stream_buffer(as102_dev); as102_usb_probe()
421 usb_put_dev(as102_dev->bus_adap.usb_dev); as102_usb_probe()
423 kfree(as102_dev); as102_usb_probe()

Completed in 96 milliseconds