Commit Graph

382 Commits

Author SHA1 Message Date
Robert Krakora
9c06210b89 V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled
Trace:  (Provided by Douglas)

BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
in_atomic():0, irqs_disabled():1
Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
 [<c04246d8>] __might_sleep+0xc6/0xcb
 [<c058c8b0>] usb_kill_urb+0x1a/0xd8
 [<c0488e68>] ? __kmalloc+0x9b/0xfc
 [<c0488e85>] ? __kmalloc+0xb8/0xfc
 [<c058cd5a>] ? usb_alloc_urb+0xf/0x31
 [<f8dd638c>] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
 [<f8dd6573>] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
 [<f8dd65e1>] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
 [<f8aa8674>] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
 [<f8aa85d7>] snd_pcm_action_single+0x25/0x4b [snd_pcm]
 [<f8aa9833>] snd_pcm_action+0x6a/0x76 [snd_pcm]
 [<f8aa98f5>] snd_pcm_start+0x14/0x16 [snd_pcm]
 [<f8aae10e>] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
 [<f8aac5a3>] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
 [<f8aae4a7>] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
 [<f8aad774>] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
 [<f89feeb6>] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
 [<f89fef9c>] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
 [<c064169d>] ? _cond_resched+0x8/0x32
 [<f89ff0be>] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
 [<f89fefb8>] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
 [<c048c6e2>] vfs_read+0x81/0xdc
 [<c048c7d6>] sys_read+0x3b/0x60
 [<c04039bf>] sysenter_do_call+0x12/0x34
 =======================

The culprit in the trace is snd_pcm_action() which invokes a spin lock
which disables pre-emption which disables an IRQ which causes the
__might_sleep() function to fail the irqs_disabled() test.  Since
pre-emption is enabled then it is safe to de-allocate the memory if
you first unlink each URB.  In this instance you are safe since
pre-emption is disabled.  If pre-emption and irqs are not disabled then
call usb_kill_urb(), else call usb_unlink_urb().

Thanks to Douglas for tracking down this bug originally!!!

[dougsland@redhat.com: Fixed codyingstyle]
Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 09:01:06 -02:00
Devin Heitmueller
8760e5b6d1 V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown
Revert a change made in change 9743 which resulted in a kernel panic in some
cases on shutdown of the audio stream.

First discovered when working on the Pinnacle 880e support, and later
reproduced by a user on the mailing list with the HVR-900 as well.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:40 -02:00
Robert Krakora
6e7b9ea093 V4L/DVB (10257): em28xx: Fix for KWorld 330U Board
Fix for KWorld 330U Board

Many thanks to Devin and Mauro!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:18 -02:00
Robert Krakora
7e4b15e420 V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97
Fix for KWorld 330U AC97

Many thanks to Devin and Mauro again!!!

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:39:09 -02:00
Robert Krakora
53d12e5a56 V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition
em28xx: Fix audio URB transfer buffer memory leak and race
condition/corruption of capture pointer

Leak fix kindly contributed by Pádraig Brady.

Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:38:43 -02:00
Hans Verkuil
32929fb4c7 V4L/DVB (10243): em28xx: fix compile warning
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Mauro Carvalho Chehab
8866f9cf8d V4L/DVB (10228): em28xx: fix audio output PCM IN selection
Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
currently, the PCM IN selection is not set by the driver. This patch allows
specifying the PCM IN expected output, via board description table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:39 -02:00
Mauro Carvalho Chehab
24c3c41584 V4L/DVB (10192): em28xx: fix input selection
em28xx were trying to access the third input entry, even for boards that
don't support it.

This patch reviews the input mux selection fixing this bug and a few
other troubles, like not validating the input on one userspace ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:36 -02:00
Julia Lawall
2230c3c803 V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc
This patch extends 134179823b by using
usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk,
and usb_endpoint_xfer_int in the negated case as well.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ !usb_endpoint_xfer_control(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\))
+ !usb_endpoint_xfer_isoc(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\))
+ !usb_endpoint_xfer_bulk(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\))
+ !usb_endpoint_xfer_int(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07 22:18:56 -02:00
Mauro Carvalho Chehab
26cdc76b2c V4L/DVB (10177): Fix sparse warnings on em28xx
/home/v4l/master/v4l/em28xx-core.c:396:25: warning: symbol 'outputs' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-input.c:324:6: warning: symbol 'em28xx_ir_start' was not declared. Should it be static?
/home/v4l/master/v4l/em28xx-cards.c:1925:5: warning: symbol 'em28xx_init_dev' was not declared. Should it be static?

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07 22:18:55 -02:00
Mauro Carvalho Chehab
9baed99ee7 V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
Some devices require different setups on struct_audio. Due to that, we
may need to change some fields at dev.adev during device probe. So, this
patch moves the dynamic memory allocation of adev at em28xx-alsa to the
dynamic allocation of struct em28xx dev that happens during device
probe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:55 -02:00
Mauro Carvalho Chehab
87ea5f9d38 V4L/DVB (10160): em28xx: update chip id for em2710
em2710 uses the same chip ID as em2820 (0x12).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:14:28 -02:00
Hans Verkuil
aecde8b53b V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.

Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.

Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:52 -02:00
Hans Verkuil
bec43661b1 V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Introduce a struct v4l2_file_operations for v4l2 drivers.

Remove the unnecessary inode argument.

Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.

Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:12 -02:00
Julia Lawall
134179823b V4L/DVB (10130): use USB API functions rather than constants
This set of patches introduces calls to the following set of functions:

usb_endpoint_dir_in(epd)
usb_endpoint_dir_out(epd)
usb_endpoint_is_bulk_in(epd)
usb_endpoint_is_bulk_out(epd)
usb_endpoint_is_int_in(epd)
usb_endpoint_is_int_out(epd)
usb_endpoint_is_isoc_in(epd)
usb_endpoint_is_isoc_out(epd)
usb_endpoint_num(epd)
usb_endpoint_type(epd)
usb_endpoint_xfer_bulk(epd)
usb_endpoint_xfer_control(epd)
usb_endpoint_xfer_int(epd)
usb_endpoint_xfer_isoc(epd)

In some cases, introducing one of these functions is not possible, and it
just replaces an explicit integer value by one of the following constants:

USB_ENDPOINT_XFER_BULK
USB_ENDPOINT_XFER_CONTROL
USB_ENDPOINT_XFER_INT
USB_ENDPOINT_XFER_ISOC

An extract of the semantic patch that makes these changes is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r1@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
- \(USB_ENDPOINT_XFER_CONTROL\|0\))
+ usb_endpoint_xfer_control(epd)

@r5@ struct usb_endpoint_descriptor *epd; @@

- ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
-  \(USB_DIR_IN\|0x80\))
+ usb_endpoint_dir_in(epd)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:40 -02:00
Devin Heitmueller
de84830e69 V4L/DVB (10125): em28xx: Don't do AC97 vendor detection for i2s audio devices
The current code was trying to query the AC97 registers for the vendor
information even if it was clearly not a AC97 audio device (resulting in errors
in the dmesg output).  This was due to a bug in the way we did the check.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:38 -02:00
Devin Heitmueller
3fbf930951 V4L/DVB (10124): em28xx: expand output formats available
Add additional output formats, which will be useful for the Pinnacle PCTV
Ultimate 880e integration with the saa7136.

Thanks to Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:38 -02:00
Devin Heitmueller
54d79e3398 V4L/DVB (10123): em28xx: fix reversed definitions of I2S audio modes
Noticed when doing the audio support for the Pinnacle PCTV HD Ultimate 808e
that the modes were incorrect (the 808e uses I2S in 5 sample mode)

Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:37 -02:00
Devin Heitmueller
62f3e69bd5 V4L/DVB (10122): em28xx: don't load em28xx-alsa for em2870 based devices
Like the em2874, the em2870 does not have any analog support, so don't bother
loading the em28xx-alsa module.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:37 -02:00
Devin Heitmueller
7ed3a7a311 V4L/DVB (10121): em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profile
The Pinnacle 80e cannot be supported since Micronas yanked their driver
support for the drx-j chipset at the last minute.  Remove the device profile
since it cannot work without the drx driver and it being there is only likely
to confuse people into thinking the device is supported but not working.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:36 -02:00
Devin Heitmueller
e890759220 V4L/DVB (10120): em28xx: remove redundant Pinnacle Dazzle DVC 100 profile
The DVC 100 profile is redundant since we already have an existing identical
profile named "Pinnacle Dazzle DVC 90/DVC 100"

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:36 -02:00
Devin Heitmueller
ed14e1c2f4 V4L/DVB (10119): em28xx: fix corrupted XCLK value
Correct problem introduced during the board refactoring where the XCLK
frequency would get zero'd out.  The sequence of events was as follows:

em28xx_pre_card_setup() called em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration
em28xx_pre_card_setup() would set the dev->board.xclk if not set
em28xx_pre_card_setup() would set the XCLK register based on dev->board.xclk
...
em28xx_card_setup() would call em28xx_set_model()
em28xx_set_model() would memcpy to dev->board configuration (clearing out
 value of dev->board.xclk set in em28xx_pre_card_setup)
...
em28xx_audio_analog_set() sets the XCLK register based on dev->board.xclk
 (which now contains zero)

The change sets the default XCLK and I2C Clock fields in the board definition
inside of em28xx_set_model() so that subsequent calls do not cause the
values to be overwritten.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:35 -02:00
Douglas Schilling Landgraf
5609cfd232 V4L/DVB (10056): em28xx: Add snapshot button on Pixelview Prolink PlayTV USB 2.0
Added snapshot feature for Pixelview Prolink PlayTV USB 2.0

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:10 -02:00
Douglas Schilling Landgraf
1e1addd57b V4L/DVB (10055): em28xx: Add entry for PixelView PlayTV Box 4
Added board PixelView PlayTV Box 4
Thanks to Vildenei Negrao Pereira <neodarkaman@brturbo.com.br> for testing and data collection.

Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:40:09 -02:00
Mauro Carvalho Chehab
2e5ef2dfc4 V4L/DVB (9980): em28xx: simplify analog logic
Now, just two routines are enough for analog: the first one configs the analog
part and register V4L2 devices, and the second one release analog devices.

After this patch, it will be easier to transform em28xx-video into an em28xx
extension, loaded only on analog devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:38 -02:00
Mauro Carvalho Chehab
1a23f81b7d V4L/DVB (9979): em28xx: move usb probe code to a proper place
em28xx-video were holding several code that are not specific to V4L2
interface.

This patch moves the core code for em28xx-core, and usb probing code
into em28xx-cards.

This opens the possibility of breaking em28xx into a core module and a
V4L2 module, loaded only on devices that have analog interfaces.

Some cleanup may be done at em28xx-cards to optimize the config code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:37 -02:00
Mauro Carvalho Chehab
14983d8163 V4L/DVB (9970): em28xx: Allow get/set registers for debug on i2c slave chips
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:34 -02:00
Mauro Carvalho Chehab
531c98e718 V4L/DVB (9953): em28xx: Add suport for debugging AC97 anciliary chips
The em28xx driver can be coupled to an anciliary AC97 chip. This patch
allows read/write AC97 registers directly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:27 -02:00
Mauro Carvalho Chehab
b6070f0756 V4L/DVB (9931): em28xx: de-obfuscate vidioc_g_ctrl logic
vidioc_g_ctrl() were using an uneeded confusing logic. Instead, use the
direct approach.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:22 -02:00
Mauro Carvalho Chehab
5db0b5e1ad V4L/DVB (9930): em28xx: Fix bad locks on error condition
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:21 -02:00
Mauro Carvalho Chehab
bddcf63313 V4L/DVB (9927): em28xx: use a more standard way to specify video formats
This patch uses the same code for enumberating video formats that are
present on cx88, bttv and saa7134 drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:20 -02:00
Mauro Carvalho Chehab
381aaba91d V4L/DVB (9926): em28xx: Fix a bug that were putting xc2028/3028 tuner to sleep
The changeset 78aa52a159cf introduced a bug on em28xx: buffer setup should be
awaking xc3028. Instead, since we didn't specify the tuner mode, the device
were going to sleep, due to the lack of tuner mode when asking tuner to handle
VIDIOC_S_FREQUENCY:

xc2028 0-0061: Device is Xceive 3028 version 1.0, firmware version 2.7
xc2028 0-0061: divisor= 00 00 14 d0 (freq=83.250)
xc2028 0-0061: Putting xc2028/3028 into poweroff mode.
xc2028 0-0061: Printing sleep stack trace:
Pid: 10936, comm: mplayer Tainted: P   M      2.6.27.8 #1

Call Trace:
 [<ffffffffa0b759ea>] xc2028_sleep+0x89/0x1ab [tuner_xc2028]
 [<ffffffffa0b48fb9>] tuner_s_frequency+0xf5/0x165 [tuner]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:20 -02:00
Devin Heitmueller
c665f4dd99 V4L/DVB (9922): em28xx: don't assume every eb1a:2820 reference design is a Prolink PlayTV USB2
Don't operate under the assumption that every device that uses the em2820
default USB ID is a Prolink PlayTV USB.  We have an eeprom hash, so use that,
since otherwise we cannot support other devices with the 2820 default USB ID
(such as the ADS Tech Instant TV USB USBAV-704)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:18 -02:00
Devin Heitmueller
b1fa26c66c V4L/DVB (9921): em28xx: add chip id for em2874
Add the em2870 to the list of known em28xx chip ids.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:18 -02:00
Mauro Carvalho Chehab
efc52a9484 V4L/DVB (9912): em28xx: fix/improve em28xx locking schema
Changes/fixes on em28xx dev->lock:

- em28xx_init_dev() were unlocking without a previous lock;

- some read ioctls need to lock after the removal of KBL, since a write
  may be happening at the same time an ioctl is reading;

- keep the device locked during all device initialization;

- lock/unlock while reading/writing registers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:14 -02:00
Mauro Carvalho Chehab
cf8c91c3e7 V4L/DVB (9911): em28xx: vidioc_try_fmt_vid_cap() doesn't need any lock
vidioc_try_fmt_vid_cap() just checks if a given resolution is supported.
It doesn't touch on struct em28xx device descriptor. so, there's no need
to lock.

While there, use unlikely() for those values that aren't likely to
occur.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:14 -02:00
Mauro Carvalho Chehab
29b59417c5 V4L/DVB (9910): em28xx: move res_get locks to the caller routines
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:13 -02:00
Mauro Carvalho Chehab
7831364f33 V4L/DVB (9909): em28xx: move dev->lock from res_free to the caller routines
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:39:13 -02:00
Mauro Carvalho Chehab
be2c6db122 V4L/DVB (9799): em28xx: fix Kworld Hybrid 330 (A316) support
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:28 -02:00
Douglas Schilling Landgraf
f89bc32974 V4L/DVB (9793): em28xx: Add specific entry for WinTV-HVR 850
Added specific entry for WinTV-HVR 850

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:25 -02:00
Mauro Carvalho Chehab
eb6c96345d V4L/DVB (9770): em28xx: turn off tuner when not used
em28xx devices generally get hot when xc3028 tuner is powered on. This
patch solves this by turning power off when the device is not used, at the
expense of having a higher load time, when calling a TV application.

Since firmware load happens on 1 or 2 seconds on most devices, this is not a pain.

Also, it helps to save the planet by saving some power :)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:15 -02:00
Mauro Carvalho Chehab
9e5d6760c2 V4L/DVB (9756): em28xx: Improve register log format
Change log format to look more like URB transactions. In fact, setup and
IN/OUT transactions are merged. This helps to debug the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:14 -02:00
Mauro Carvalho Chehab
8c2399895d V4L/DVB (9767): em28xx: improve board description messages
Print manufacturer/product info from USB device and also card entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab
6a18eaf61a V4L/DVB (9766): em28xx: improve probe messages
Prints usb speed used by em28xx interface. While there, fixes USB ID's
endiannes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab
017ab4b1e2 V4L/DVB (9765): em28xx: move tuner gpio's to the cards struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab
2fe3e2ee72 V4L/DVB (9764): em28xx: Add support for suspend the device when not used
Several chips may be turned off when the device is not used, like audio,
video and dvb demods. This patch adds a gpio callback at the core
structs to allow turning off such devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:43 -02:00
Mauro Carvalho Chehab
f502e86184 V4L/DVB (9763): em28xx: fix gpio settings
A previous changeset moved gpio from em28xx struct into em28xx_board.
However, the driver were not updated to properly honor those gpio's.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab
1c67e76f71 V4L/DVB (9762): em28xx: fix tuner absent entries
Before this patch, several devices without tuner were kept the value 0
for tuner_type. However, this means TUNER_TEMIC_PAL. Replace those
entries for the proper TUNER_ABSENT value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab
a5942b5c26 V4L/DVB (9761): em28xx: replace magic numbers for mux aliases
Instead of using magic vmux/amux, let's use an alias where possible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00
Mauro Carvalho Chehab
122b77e59e V4L/DVB (9760): em28xx: move gpio lines into board table description
Instead of a large, ugly switch specifying the gpio tables for each
device, let's move it into the boards struct. This also helps to see
what boards have already the gpio's for DVB.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:42 -02:00