Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:25:34 +0000 (09:25 -0300)]
[media] az6007: handle CI during suspend/resume
The dvb-usb-v2 core doesn't know anything about CI. So, the
driver needs to handle it by hand. This patch stops CI just
before stopping URB's/RC, and restarts it before URB/RC start.
It should be noticed that suspend/resume is not yet working properly,
as the PM model requires the implementation of reset_resume:
dvb_usb_az6007 1-6:1.0: no reset_resume for driver dvb_usb_az6007?
But this is not implemented there at dvb-usb-v2 yet.
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:23:17 +0000 (09:23 -0300)]
[media] az6007: make all functions static
There's no reason why those functions shouldn't be static.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 5 Aug 2012 12:22:23 +0000 (09:22 -0300)]
[media] az6007: rename "st" to "state" at az6007_power_ctrl()
On all other parts, this var is called state. So, use the same
name here, to be consistent.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 5 Aug 2012 03:10:13 +0000 (00:10 -0300)]
[media] az6007: Fix the number of parameters for QAM setup
Remove those warning messages:
[ 121.696758] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params:
[ 121.703401] drxk: 02 00 00 00 10 00 07 00 03 02 ..........
[ 121.703587] drxk: Warning -22 on QAMDemodulatorCommand
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 5 Aug 2012 00:39:41 +0000 (21:39 -0300)]
[media] az6007: fix the I2C W+R logic
The test for I2C W+R will never be true. Fix it.
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:05:34 +0000 (16:05 -0300)]
[media] az6007: convert it to use dvb-usb-v2
Change it to use dvb-usb-v2. The driver should be working as before.
The only functional changes should be at the driver debug logs.
This driver needs the cypress firmware load, so, auto-selects it.
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:05:13 +0000 (16:05 -0300)]
[media] dvb-usb-v2: Don't ask user to select Cypress firmware module
The dvb-usb-v2 cypress firmware module is not optional, as drivers
won't work without it. So, instead of opening a menu for the user to
manually select, let the drivers that need it to select, hiding this
option from the Kconfig menu.
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 4 Aug 2012 19:03:04 +0000 (16:03 -0300)]
[media] dvb-usb-v2: Fix cypress firmware compilation
ERROR: "usbv2_cypress_load_firmware" [drivers/media/dvb/dvb-usb-v2/dvb-usb-az6007.ko] undefined!
Cypress fimware will never be compiled properly, as the Makefile rule
is wrong.
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Mon, 30 Jul 2012 07:37:30 +0000 (04:37 -0300)]
[media] media: i.MX27: Fix mx2_emmaprp mem2mem driver clocks
This driver wasn't converted to the new clock framework
(
e038ed50a4a767add205094c035b6943e7b30140).
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Thu, 26 Jul 2012 08:57:30 +0000 (05:57 -0300)]
[media] i.MX27: Visstrim_M10: Add support for deinterlacing driver
Visstrim_M10 have a tvp5150 whose video output must be deinterlaced.
The new mem2mem deinterlacing driver is very useful for that purpose.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 6 Aug 2012 12:06:34 +0000 (09:06 -0300)]
[media] m2m-deinterlace: fix two warnings
drivers/media/video/m2m-deinterlace.c: In function ‘deinterlace_issue_dma’:
drivers/media/video/m2m-deinterlace.c:363:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘dma_addr_t’ [-Wformat]
drivers/media/video/m2m-deinterlace.c:363:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
Cc: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Thu, 26 Jul 2012 08:55:18 +0000 (05:55 -0300)]
[media] media: Add mem2mem deinterlacing driver
Some video decoders such as tvp5150 provide separate
video fields (V4L2_FIELD_SEQ_TB/BT). This driver uses
dmaengine to convert this format to V4L2_FIELD_INTERLACED_TB/BT
(weaving) or V4L2_FIELD_NONE (line doubling) so that the
image can be displayed or processed.
Of course there will be combing effect in the image but this
can be accepted for some low quality applications.
Currently only YUV420 and YUYV formats are supported but
it can be extended later.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Thu, 26 Jul 2012 08:54:19 +0000 (05:54 -0300)]
[media] Visstrim M10: Add support for Coda
Support the codadx6 that is included in
the i.MX27 SoC.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Thu, 26 Jul 2012 08:53:35 +0000 (05:53 -0300)]
[media] media: coda: Add driver for Coda video codec
Coda is a range of video codecs from Chips&Media that
support H.264, H.263, MPEG4 and other video standards.
Currently only support for the codadx6 included in the
i.MX27 SoC is added. H.264 and MPEG4 video encoding
are the only supported capabilities by now.
[mchehab@redhat.com: Add missing include linux/of.h]
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Reviewed-by: Philipp Zabel<p.zabel@pengutronix.de>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Javier Martin [Thu, 26 Jul 2012 08:45:32 +0000 (05:45 -0300)]
[media] i.MX: coda: Add platform support for coda in i.MX27
i.MX27 SoC include a codadx6 codec that is able to encode
and decode H.264, H.263 and MPEG4.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 5 Aug 2012 22:50:15 +0000 (19:50 -0300)]
[media] move dvb-usb-ids.h to dvb-core
While this header were meant to be used just by dvb-usb driver, it
is now being used also by dvb-usb-v2 and cx231xx. So, move it to a
better place.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 2 Aug 2012 00:38:46 +0000 (21:38 -0300)]
[media] dvb_usbv2: rename dvb_usb_firmware to cypress_firmware
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 25 Jul 2012 00:21:04 +0000 (21:21 -0300)]
[media] af9015: remote controller fixes
1)
AF9015 remote controller query will fail rarely due to register
access failures and dvb_usb_v2 will stop rc polling when error
returned. Add logic to allow errors until two consecutive errors
occurs.
2)
Remote controller key map was not loaded in case of key map was set as
a device property. Fix it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 9 Jul 2012 17:59:28 +0000 (14:59 -0300)]
[media] dvb_usb_v2: move from dvb-usb to dvb-usb-v2
Move to own directory.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 26 Jun 2012 21:25:51 +0000 (18:25 -0300)]
[media] gl861: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 26 Jun 2012 03:17:04 +0000 (00:17 -0300)]
[media] mxl111sf: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 5 Jul 2012 22:57:07 +0000 (19:57 -0300)]
[media] dvb_usb_v2: register device even no remote keymap defined
It failed to register device when remote keymap was not set.
Fix it to register device even keymap is NULL. In that case
just skip remote registration.
Driver should set RC_MAP_EMPTY to enable remote in case of
there is remote receiver but default keymap is unknown.
Reported-by: pierigno <pierigno@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 27 Jun 2012 02:01:31 +0000 (23:01 -0300)]
[media] dvb_usb_v2: remove usb_clear_halt() from stream
It works no longer as it was designed since we can change streaming
configuration during device operation.
Maybe it should be performed conditionally on cases when streaming
endpoint is changed. Anyhow, let it out now and add later if needed.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 27 Jun 2012 01:49:19 +0000 (22:49 -0300)]
[media] dvb_usb_v2: do not try to remove non-existent adapter
Check that adapter exists before trying to remove it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 27 Jun 2012 01:44:00 +0000 (22:44 -0300)]
[media] dvb_usb_v2: use dev_* logging macros
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 26 Jun 2012 03:04:33 +0000 (00:04 -0300)]
[media] dvb_usb_v2: change streaming control callback parameter
Pass frontend instead of adapter as some drivers need to make
decisions based frontend.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 21 Jun 2012 05:57:34 +0000 (02:57 -0300)]
[media] dvb_usb_v2: fix power_ctrl() callback error handling
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 21 Jun 2012 02:09:41 +0000 (23:09 -0300)]
[media] dvb_usb_v2: update copyrights
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 21 Jun 2012 01:47:15 +0000 (22:47 -0300)]
[media] dvb_usb_v2: remove unused variable
It was left from the legacy remote controller we do not support.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 21 Jun 2012 01:22:14 +0000 (22:22 -0300)]
[media] dvb_usb_v2: update header dvb_usb.h comments
Comment briefly all used structures and variables.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 20 Jun 2012 23:27:42 +0000 (20:27 -0300)]
[media] dvb_usb_v2: refactor dvb_usbv2_generic_rw()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 20 Jun 2012 03:32:53 +0000 (00:32 -0300)]
[media] dvb_usb_v2: multiple small tweaks around the code
Naming, small code changes, debug writings, etc.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 20 Jun 2012 01:31:04 +0000 (22:31 -0300)]
[media] dvb_usb_v2: move dvb_usbv2_generic_rw() debugs behind define
It is nice to have this debug, but as it generates very huge amount
of traffic, better to make it conditional. Use define macro to disable
it as I did not find out how to use dynamic debugs to dump variable
length buffers like that.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 20 Jun 2012 01:21:34 +0000 (22:21 -0300)]
[media] dvb_usb_v2: merge files dvb_usb_init.c and dvb_usb_dvb.c
Merge files dvb_usb_init.c and dvb_usb_dvb.c to dvb_usb_core.c.
It is still under 1000 lines of code after all the optimization
so put it one file.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 20 Jun 2012 00:47:42 +0000 (21:47 -0300)]
[media] dvb_usb_v2: refactor dvb_usb_ctrl_feed() logic
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 19 Jun 2012 23:03:02 +0000 (20:03 -0300)]
[media] dvb_usb_v2: remove num_adapters_initialized variable
We can live easily without it so remove it, make code and binary
few bytes smaller.
>From struct dvb_usb_device variable int num_adapters_initialized.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 19 Jun 2012 02:42:53 +0000 (23:42 -0300)]
[media] dvb_usb_v2: use identify_state() to resolve firmware name
Merge get_firmware_name() to identify_state().
It is wise to resolve firmware name in that routine as it does
decision wether or not to load firmware at all. It is one very
rarely needed callback less.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 19 Jun 2012 01:54:16 +0000 (22:54 -0300)]
[media] dvb_usb_v2: merge get_ts_config() to get_usb_stream_config()
Piggypag TS type callback to USB stream callback and change
callback name slightly to fit better.
Both of those are rather rare callback and has a relation. Transport
Stream, TS, is input stream and USB stream is output stream of
DVB USB bridge.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 23:09:07 +0000 (20:09 -0300)]
[media] dvb_usb_v2: use container_of() for adapter to device
We dont need that pointer as we can use container_of() macro thus
remove it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 22:58:44 +0000 (19:58 -0300)]
[media] ec168: use DVB UDB macros
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 22:50:16 +0000 (19:50 -0300)]
[media] ce6230: use DVB USB macros
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 22:44:08 +0000 (19:44 -0300)]
[media] au6610: use DVB USB macros
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 22:39:02 +0000 (19:39 -0300)]
[media] anysee: use DVB USB macros
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 02:42:11 +0000 (23:42 -0300)]
[media] dvb_usb_v2: git rid of dvb_usb_adapter state variable
We can live without it easily.
Also USB data stream complete callback checks for feedcount
seems to be quite redundant so remove those also.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 18 Jun 2012 02:15:03 +0000 (23:15 -0300)]
[media] af9035: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 17 Jun 2012 03:27:00 +0000 (00:27 -0300)]
[media] dvb_usb_v2: use lock to sync feed and frontend control
There was synchronization problem when streaming was stopped.
Frontend was ran down before stream which causes problems.
Use mutex to synchronization. Now it looks like that:
LOCK
start frontend
UNLOCK
LOCK
start streaming
[...]
stop streaming
UNLOCK
LOCK
stop frontend
UNLOCK
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 21:13:06 +0000 (18:13 -0300)]
[media] af9015: use helper macros for some pointers
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 20:58:53 +0000 (17:58 -0300)]
[media] dvb_usb_v2: helper macros for device/adapter/frontend pointers
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 19:25:22 +0000 (16:25 -0300)]
[media] af9015: update USB streaming configuration logic
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 19:02:57 +0000 (16:02 -0300)]
[media] dvb_usb_v2: change USB stream config logic
Initial / default USB stream configuration is now set always as a
dvb_usb_device_properties. Dynamic configuration is done top of
that if callback .get_usb_stream_config() exists. Default values
are set when callback is called so callback needs only change
values that are different than default.
In addition of that define two macros DVB_USB_STREAM_BULK() and
DVB_USB_STREAM_ISOC() for filling struct usb_data_stream_properties
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 16:56:37 +0000 (13:56 -0300)]
[media] dvb_usb_v2: add macros to fill USB stream properties
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sat, 16 Jun 2012 00:17:04 +0000 (21:17 -0300)]
[media] dvb_usb_v2: .read_mac_address() callback changes
Give DVB adapter as a parameter for callback. MAC address is
adapter property and it could be (at least in theory) there
is devices having multiple adapters and all has own MAC.
Also add error handling. If callback fails error is returned
which leads device unregister.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 15 Jun 2012 23:46:44 +0000 (20:46 -0300)]
[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_adapter
We can live easily without that variable.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 15 Jun 2012 05:10:50 +0000 (02:10 -0300)]
[media] dvb_usb_v2: move fe_ioctl_override() callback
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 15 Jun 2012 04:38:28 +0000 (01:38 -0300)]
[media] dvb_usb_v2: get rid of dvb_usb_device state
Remove state from struct dvb_usb_device as we can live without.
Add some debug logs.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 15 Jun 2012 03:52:42 +0000 (00:52 -0300)]
[media] dvb_usb_v2: simplify remote init/exit logic
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 15 Jun 2012 03:29:36 +0000 (00:29 -0300)]
[media] dvb_usb_v2: try to remove all adapters on exit
It did not removed adapter on error case as .num_adapters_initialized
was set after success adapter initialization. It should be safe to
try remove all possible adapters in any-case.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 14 Jun 2012 23:07:02 +0000 (20:07 -0300)]
[media] dvb_usb_v2: do not release USB interface when device reconnects
USB core will call disconnect and remove driver for us as device
will disconnect itself. After that it is loaded again as a new
device but it is warm and no firmware loading needed.
Reported-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Malcolm Priestley [Wed, 13 Jun 2012 21:24:32 +0000 (18:24 -0300)]
[media] dvb_usb_v2: return the download ret in dvb_usb_download_firmware
The first being this patch, no return value from dvb_usb_download_firmware
causes system wide dead lock with COLD disconnect as system attempts to continue
to warm state.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 14 Jun 2012 07:56:09 +0000 (04:56 -0300)]
[media] anysee: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 14 Jun 2012 05:44:47 +0000 (02:44 -0300)]
[media] dvb_usb_v2: attach tuners later
It is more than nice to have all those frontend pointers when
attaching tuner to the frontend in question. Make that possible
attaching tuners after dvb_register_frontend()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 14 Jun 2012 02:33:16 +0000 (23:33 -0300)]
[media] ce6230: various small changes
Small changes like log writings. No functionality changes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 14 Jun 2012 02:03:08 +0000 (23:03 -0300)]
[media] ce6230: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 13 Jun 2012 02:19:40 +0000 (23:19 -0300)]
[media] dvb_usb_v2: move remote controller to the main file
It is only three functions so move it to the main.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 13 Jun 2012 01:49:54 +0000 (22:49 -0300)]
[media] au6610: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 13 Jun 2012 01:16:12 +0000 (22:16 -0300)]
[media] ec168: re-implement firmware loading
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 13 Jun 2012 00:16:52 +0000 (21:16 -0300)]
[media] dvb_usb_v2: do not check active fe when stop streaming
Do not check active frontend as it could be already shutdown.
Add some more debugs.
It turns out that device is put sleep earlier than streaming
is stopped in some cases. That is because streaming is running
different task and there is no locking.
Maybe some locking could be good idea to force stop streaming
before device is shut down. I can guess there could be problems
in someday cases like chip is sleep but streaming control is
requested after that...
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 23:40:21 +0000 (20:40 -0300)]
[media] ec168: switch Kernel pr_* logging
Change logging.
Some minor text and error number changes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 19:45:54 +0000 (16:45 -0300)]
[media] ec168: convert to new DVB USB
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 19:25:01 +0000 (16:25 -0300)]
[media] dvb_usb_v2: use pointers to properties
Use pointers to properties as device and adapter properties are
constant. No need to embed and copy those structures.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 05:20:01 +0000 (02:20 -0300)]
[media] af9015: suspend/resume
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 04:34:22 +0000 (01:34 -0300)]
[media] dvb_usb_v2: use keyword const for USB ID table
Let optimize that code to the text segment.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 04:05:20 +0000 (01:05 -0300)]
[media] dvb_usb_v2: move few callbacks one level up
Move frontend_attach, tuner_attach, frontend_ctrl and streaming_ctrl
from adapter to device.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 12 Jun 2012 02:35:09 +0000 (23:35 -0300)]
[media] dvb_usb_v2: Cypress firmware download module
Firmware handling routines for various Cypress chips.
Cypress AN2135
Cypress AN2235
Cypress FX2
These were split out from general DVB USB module by
Patrick Boettcher. I did only small changes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 11 Jun 2012 20:47:04 +0000 (17:47 -0300)]
[media] dvb_usb_v2: suspend/resume stop/start USB streaming
Stop remote polling and USB streaming before suspend and resume
those when back to normal operation.
It is far away from complete implementation, but at least it does
not hang system anymore on suspend while streaming is ongoing.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 03:46:22 +0000 (00:46 -0300)]
[media] dvb_usb_v2: add .disconnect() callback
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 02:42:47 +0000 (23:42 -0300)]
[media] dvb_usb_v2: probe/disconnect error handling
In my understanding we never call .disconnect() when .probe()
returns error. Change .probe() to return error all cases it cannot
handle given interface and simplify .disconnect() handling.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 02:24:29 +0000 (23:24 -0300)]
[media] dvb_usb_v2: misc cleanup changes
Error handling, remove unneeded stuff, renaming, etc.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 00:37:11 +0000 (21:37 -0300)]
[media] dvb_usb_v2: I2C adapter cleanup changes
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 00:22:06 +0000 (21:22 -0300)]
[media] af9015: use USB core soft_unbind
I think it is better to allow driver finish pending operations and
disconnect device. Killing all ongoing USB transfers could have very
bad effect, even break hardware in worst case.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 23:36:35 +0000 (20:36 -0300)]
[media] af9015: switch to new DVB-USB
Almost all hacks are now removed and much less code.
Reducing af9015 driver code from 2084 to 1609, it is almost
500 LOC less!
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 1 Aug 2012 17:44:06 +0000 (14:44 -0300)]
[media] dvb_usb_v2: enable compile
Compilation was disabled as it was failing with allyesconfig.
Rename duplicate functions and enable building.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 10 Jun 2012 00:11:28 +0000 (21:11 -0300)]
[media] dvb_usb_v2: do not free resources until delayed init is done
It was possible to free resources by unloading module while
initialization was still ongoing on delayed work.
Use PID to make decision on .disconnect() if caller is our
work or some other as work also calls .disconnect() in error
case. There could be better solution still...
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 21:37:42 +0000 (18:37 -0300)]
[media] dvb_usb_v2: fix dvb_usb_generic_rw() debug
Debug prints write operation data instead of read data was
intention.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 20:52:06 +0000 (17:52 -0300)]
[media] dvb_usb_v2: add missing new line for log writings
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 20:34:41 +0000 (17:34 -0300)]
[media] dvb_usb_v2: add .bInterfaceNumber match
There is no USB match flag for used USB interface. It is rather
common there is multiple interfaces offering different services.
For example one for television and one for remote controller.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 19:23:40 +0000 (16:23 -0300)]
[media] dvb_usb_v2: rename device_init/device_exit to probe/disconnect
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 18:40:25 +0000 (15:40 -0300)]
[media] dvb_usb_v2: move I2C adapter code to different file
No worth to keep it on own file as it is only 30 LOC.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Thu, 7 Jun 2012 01:46:38 +0000 (22:46 -0300)]
[media] dvb_usb_v2: use Kernel logging (pr_debug/pr_err/pr_info)
Use Kernel logging insteads of own macros.
Get rid of old debugs and use dynamic debug.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 6 Jun 2012 20:52:51 +0000 (17:52 -0300)]
[media] dvb_usb_v2: unregister all frontends in error case
Unregister all if there is any error meet during
frontend initialization.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 6 Jun 2012 18:01:32 +0000 (15:01 -0300)]
[media] dvb_usb_v2: remove usb_clear_halt()
Calling usb_clear_halt() during device init is not correct.
2 of 7 AF9015 devices I have timeouts next USB control message
after usb_clear_halt(). It was originally performed between
tuner_attach() and rc_query() and likely not causing problems
since rc_query() is repeated continously. None could see it when
first rc_query() failed...
Secondly it was not called for .generic_bulk_ctrl_endpoint_response.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Wed, 6 Jun 2012 03:05:06 +0000 (00:05 -0300)]
[media] dvb_usb_v2: refactor delayed init
Move work to the struct dvb_usb_device that we can access
it inside .disconnect().
Also many other minor changes.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 5 Jun 2012 23:37:46 +0000 (20:37 -0300)]
[media] dvb_usb_v2: ensure driver_info is not null
It could be null in case of driver does not set it
properly, like missing dynamic ID handling.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 5 Jun 2012 02:15:26 +0000 (23:15 -0300)]
[media] dvb_usb_v2: frontend switching changes
Some error checking changes and refactoring.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Tue, 5 Jun 2012 01:18:34 +0000 (22:18 -0300)]
[media] dvb_usb_v2: remove various unneeded variables
Adapter priv is not really needed, use device priv instead.
There is only driver or two using that.
Device caps are not needed. There was only "has I2C adapter"
capability defined. It is useless as we can see same just
checking existence of i2c_algo callback.
And also remove some totally not used at all variables.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 4 Jun 2012 23:55:34 +0000 (20:55 -0300)]
[media] dvb_usb_v2: use dynamic debugs
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 4 Jun 2012 23:12:55 +0000 (20:12 -0300)]
[media] dvb_usb_v2: add macro for filling usb_device_id table entry
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Mon, 4 Jun 2012 19:36:09 +0000 (16:36 -0300)]
[media] dvb_usb_v2: clean firmware downloading routines
Remove Cypress USB-interface firmware downloading routines.
That is common module and having single vendor chip routines
in common module is wrong. Just move those elsewhere.
Move single function out from the dvb_usb_firmware.c and
remove that file.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 3 Jun 2012 18:49:45 +0000 (15:49 -0300)]
[media] dvb_usb_v2: delay firmware download as it blocks module init
Delay firmware download and whole driver initialization using
workqueue. udev causes problems when blocking firmware download
was done during module init. This will likely resolve all
DVB USB firmware downloading issues we have had during recent years.
Fixes bug in case of DVB USB driver:
https://bugzilla.redhat.com/show_bug.cgi?id=827538
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 1 Jun 2012 22:53:14 +0000 (19:53 -0300)]
[media] dvb_usb_v2: remove .num_frontends
It is no longer needed because all frontends are attached as a one go.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>