summaryrefslogtreecommitdiff
path: root/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
AgeCommit message (Collapse)Author
2013-03-23[media] dvb_usb_v2: rework USB streaming logicAntti Palosaari
Control flow order changed a little bit. HW PID filter is now disabled also when streaming is stopped - earlier it was just set only when streaming was started. Control flow is now: * set streaming status bit * submit USB streaming packets * enable HW PID filter * ask device to start streaming * N x add PID to device HW PID filter ... streaming video ... * N x remove PID from device HW PID filter * ask device to stop streaming * disable HW PID filter * kill USB streaming packets * clear streaming status bit Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb_usb_v2: make checkpatch.pl happyAntti Palosaari
New checkpatch version likes to see strings not to split multiple lines even those are exceeding 80 line length. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb_usb_v2: replace Kernel userspace lock with wait queueAntti Palosaari
There was sync mutex which was held over userspace. That is very wrong and could cause deadlock if different userspace process is used to "unlock". Wait queue seems to be correct solution for that kind of synchronizing issue so use it instead. lock debug gives following bug report: ================================================ [ BUG: lock held when returning to user space! ] 3.9.0-rc1+ #38 Tainted: G O ------------------------------------------------ tzap/4614 is leaving the kernel with locks still held! 1 lock held by tzap/4614: Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] dvb_usb_v2: use IS_ENABLED() macroAntti Palosaari
replace: #if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE) with: #if IS_ENABLED(CONFIG_RC_CORE) Reported-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] dvb_usb_v2: change rc polling active/deactive logicAntti Palosaari
Use own flag to mark when rc polling is active/deactive and make decisions, like start/stop polling on suspend/resume, against that. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] dvb_usb_v2: use dummy function defines instead stub functionsAntti Palosaari
I think it is better (cheaper) to use dummy defines for functions that has no meaning when remote controller is disabled by Kconfig. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06[media] dvb_usb_v2: make remote controller optionalAntti Palosaari
Make it possible to compile dvb_usb_v2 driver without the remote controller (RC-core). Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28Merge remote-tracking branch 'linus/master' into staging/for_v3.8Mauro Carvalho Chehab
* linus/master: (1428 commits) futex: avoid wake_futex() for a PI futex_q watchdog: using u64 in get_sample_period() writeback: put unused inodes to LRU after writeback completion mm: vmscan: check for fatal signals iff the process was throttled Revert "mm: remove __GFP_NO_KSWAPD" proc: check vma->vm_file before dereferencing UAPI: strip the _UAPI prefix from header guards during header installation include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID Linux 3.7-rc7 powerpc/eeh: Do not invalidate PE properly ALSA: hda - Fix build without CONFIG_PM of/address: sparc: Declare of_iomap as an extern function for sparc again PM / QoS: fix wrong error-checking condition bnx2x: remove redundant warning log vxlan: fix command usage in its doc 8139cp: revert "set ring address before enabling receiver" MPI: Fix compilation on MIPS with GCC 4.4 and newer MIPS: Fix crash that occurs when function tracing is enabled MIPS: Merge overlapping bootmem ranges jbd: Fix lock ordering bug in journal_unmap_buffer() ...
2012-11-08[media] dvb_usb_v2: fix pid_filter callback error loggingAntti Palosaari
Code block braces were missing which leds broken error logging and compiler warning. drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usb_ctrl_feed': drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:291:12: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Milan Tuma <milan.olin@seznam.cz> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] dvb-usb-v2: get rid of warning: no previous prototypeMauro Carvalho Chehab
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:227:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:239:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:372:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:444:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:460:5: warning: no previous prototype for 'dvb_usbv2_device_power_ctrl' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:557:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:626:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:115:5: warning: no previous prototype for 'usb_urb_free_urbs' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:208:5: warning: no previous prototype for 'usb_free_stream_buffers' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:226:5: warning: no previous prototype for 'usb_alloc_stream_buffers' [-Wmissing-prototypes] Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27[media] dvb_usb_v2: fix error handling for .tuner_attach()Antti Palosaari
fe was not set NULL after it was destroyed in tuner attach fail error case. Due to that it was destroyed again and Kernel oopsed. Reported-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27[media] dvb_usb_v2: call streaming_ctrl() before kill urbsAntti Palosaari
Logically it is better ask hardware to stop streaming before killing urbs carrying stream. Earlier it was just opposite. Now code runs: * submit urbs * start streaming ** streaming ongoing ** * stop streaming * kill urbs Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: .reset_resume() supportAntti Palosaari
Add .reset_resume() support. Also some other small changes for suspend / resume. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_frontend: implement suspend / resumeAntti Palosaari
Move initial suspend / resume support from dvb_usb_v2 to dvb_frontend as it is dvb general feature that could be used all dvb devices. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] dvb_usb_v2: implement power-management for suspendAntti Palosaari
Put device full sleep on suspend, wake-up it on resume and acquire retune in order to return same television channel. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb-usb: move it to drivers/media/usb/dvb-usbMauro Carvalho Chehab
As media/dvb will be removed, move it to a proper place. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>