Commit Graph

260 Commits (70e522a02838e52ca007d3f183171fd9324eceb4)

Author SHA1 Message Date
Mauro Carvalho Chehab 39e1256bc4 V4L/DVB: tm6000: Use an enum for extension type
In order to better document and be sure that the values are used
at the proper places, convert extension type into an enum and
name it as "type", instead of "id".

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:52 -03:00
Mauro Carvalho Chehab 54b78608c6 V4L/DVB: tm6000-alsa: rework audio buffer allocation/deallocation
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:51 -03:00
Mauro Carvalho Chehab 0e57ff8d5c V4L/DVB: tm6000: Avoid OOPS when loading tm6000-alsa module
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:50 -03:00
Timofey Trofimov 52e0a72a0c V4L/DVB: Staging: tm6000: Fix coding style issues
Fixed coding style issues founded by checkpatch.pl in files:
tm6000-alsa.c,tm6000-cards, tm6000-core.c, tm6000-dvb.c, tm6000-i2c.c,
tm6000-stds.c, tm6000-usb-isoc.h, tm6000.h

[mchehab@redhat.com: Fix some compilation breakages]
Signed-off-by: Timofey Trofimov <tumoxep@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:44 -03:00
Stefan Ringel cee3926f5f V4L/DVB: tm6000: move dvb into a separate kern module
move dvb into a separate kern module

[mchehab@redhat.com: Fix several compilation breakages]

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:43 -03:00
Stefan Ringel d77057f250 V4L/DVB: tm6000: rewrite init and fini
rewrite tm6000_audio_init and tm6000_audio_fini

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:42 -03:00
Dmitri Belimov 53ff4c7900 V4L/DVB: tm6000: Fix Video decoder initialization
Fix video decoder overflow and avoid junk audio packets
when TV signal is lost.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:41 -03:00
Stefan Ringel 83cb9a504c V4L/DVB: tm6000: rewrite copy_streams
Merge function copy streams() and copy_packets() into a new function
copy_streams(), fixing the bugs.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 14:05:40 -03:00
Tejun Heo 4ef09889d7 v4l-dvb: update gfp/slab.h includes
Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28 10:19:18 +10:00
Stefan Ringel 7e2d9820c3 V4L/DVB: tm6000: add DVB support for tuner xc5000
[mchehab@redhat.com: Fix compilation breakage due to duplicate cfg config delaration without {}]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:07 -03:00
Stefan Ringel dcf5d3aa08 V4L/DVB: tm6000: set variable dev_mode in function tm6000_start_stream
set variable dev_mode in function tm6000_start_stream and check mode

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:06 -03:00
Stefan Ringel 71d67f739e V4L/DVB: tm6000: Properly select the tuners
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:05 -03:00
Stefan Ringel f36cc0342d V4L/DVB: tm6000: Add control to the power led
Turn power led off, if device is disconnected

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:03 -03:00
Stefan Ringel 5a4b55e2c2 V4L/DVB: tm6000: bugfix stabilizing urb data
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:02 -03:00
Stefan Ringel 4b6ed9fd0b V4L/DVB: tm6000: bugfix video image
bugfix: Avoid loosing frames, causing image delays on some of the image lines.

[mchehab@redhat.com: Fix compilation breakage by merging with the patch fix]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:22:01 -03:00
Stefan Ringel 3569417e5a V4L/DVB: tm6000: add vbi message inside the type switch
add case line for vbi message

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:21:59 -03:00
Stefan Ringel 0f9bdbc2da V4L/DVB: tm6000: bugfix incorrect size
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:21:58 -03:00
Dmitri Belimov 2a15ac7ad6 V4L/DVB: tm6000, reset I2C bus function
Add new function for reset I2C bus. Rework some code for use this function.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:21:57 -03:00
Stefan Ringel b9eb39d8f4 V4L/DVB: tm6000: Remove an extra ; symbol
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:21:55 -03:00
Stefan Ringel 0439db75c1 V4L/DVB: tm6000: add extension module support
add module init over tm6000 extension

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01 01:21:54 -03:00
Mauro Carvalho Chehab e8d0416796 V4L/DVB (13554a): v4l: Use the video_drvdata function in drivers
Fix all device drivers to use the video_drvdata function instead of
maintaining a local list of minor to private data mappings. Call
video_set_drvdata to register the driver private pointer when not
already done.

Where applicable, the local list of mappings is completely removed when
it becomes unused.

[mchehab.redhat.com: patch broke into two. This one changes just tm6000]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:18 -03:00
Stefan Ringel 3c7c5e9e89 V4L/DVB: tm6000: bugfix image position
bugfix incorrect image and line position in videobuffer

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:17 -03:00
Stefan Ringel 9986da291b V4L/DVB: tm6000: README - add vbi
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:16 -03:00
Dmitri Belimov 1b0e48ad55 V4L/DVB: Rework for support xc5000
Set correct GPIO number for BEHOLD_WANDER/VOYAGER
Add xc5000 callback function
Small rework tm6000_cards_setup function
Small rework tm6000_config_tuner, build mode_mask by config information
Rework for support xc5000 silicon tuner
Add some information messages for more better understand an errors.

[mchehab@redhat.com: Fix CodingStyle and merge conflicts]
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:41 -03:00
Mauro Carvalho Chehab 5a11b6fe5d Fix compilation breakage with tm6000
Randy Dunlap <randy.dunlap@oracle.com>  reported a breakage while compiling
drivers/staging/tm6000, due to this change:
    commit 1c1b78bee1a94f98deeb9c24b21c4812e191646c
    Author: Greg Kroah-Hartman <gregkh@suse.de>
    Date:   Thu Apr 29 15:46:07 2010 -0700

    USB: remove unused usb_buffer_alloc and usb_buffer_free macros

    Now that all callers are converted over, remove the compatibility
    functions and all is good.

As the function got renamed, the rename should also be applied at
tm6000.

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:23 -03:00
Mauro Carvalho Chehab 6bc4631dbc V4L/DVB: tm6000: update the todo list
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:22 -03:00
Mauro Carvalho Chehab 4223871357 V4L/DVB: Fix color format with tm6010
The values for the fourcc format were correct, but applied to the
wrong register. With this change, video is now barely working again with
tm6000.

While here, let's remove, for now, the memset. This way, people can
have some image when testing this device.

Yet to be fixed: parts of the image frame are missed. As we don't clean
the buffers anymore, this is "recovered" by repeating the values from a
previous frame. The quality is bad, since the image pixels will contain
data from some previous frames, generating weird delay artifacts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:22 -03:00
Roel Van Nyen 9d5164da8d V4L/DVB: tm6000: fix coding style issues of tm6000-cards.c
fix coding style issues

[mchehab@redhat.com: Fix conflicts with other patches]
Signed-off-by: Roel Van Nyen <roel.vannyen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:21 -03:00
Stefan Ringel e18f58c626 V4L/DVB: tm6000: renaming firmware
renaming tm6000-xc3028.fw to xc3028-v24.fw

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:20 -03:00
Stefan Ringel 120756e10e V4L/DVB: tm6000: bugfix analog init for tm6010
- change values in function tm6000_set_fourcc_format
- disable digital source
- add vbi and audio init

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:20 -03:00
Mauro Carvalho Chehab 801dd3b32d V4L/DVB: tm6000: Don't copy outside the buffer
tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
BUG: unable to handle kernel paging request at 000000000100f700
IP: [<ffffffffa007ee79>] tm6000_irq_callback+0x51e/0xac7 [tm6000]

(gdb) list * tm6000_irq_callback+0x51e
0x2e79 is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:363).
358                                             dev->isoc_ctl.tmp_buf_len--;
359                                     }
360                                     if (dev->isoc_ctl.tmp_buf_len) {
361                                             memcpy (&header,p,
362                                                     dev->isoc_ctl.tmp_buf_l$
363                                             memcpy (((u8 *)header)+
364                                                     dev->isoc_ctl.tmp_buf,
365                                                     ptr,
366                                                     4-dev->isoc_ctl.tmp_buf$
367                                             ptr+=4-dev->isoc_ctl.tmp_buf_le$

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:19 -03:00
Mauro Carvalho Chehab f4b727b3ae V4L/DVB: tm6000: Fix a panic if buffer become NULL
Changing a video standard takes a long time to happen on tm6000, since it
needs to load another firmware, and the i2c implementation on this device
is really slow. When the driver tries to change the video standard, a
kernel panic is produced:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
IP: [<ffffffffa0c7b48a>] tm6000_irq_callback+0x57f/0xac2 [tm6000]
...
Kernel panic - not syncing: Fatal exception in interrupt

By inspecting it with gdb:

(gdb) list *tm6000_irq_callback+0x57f
0x348a is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:202).
197             /* FIXME: move to tm6000-isoc */
198             static int last_line = -2, start_line = -2, last_field = -2;
199
200             /* FIXME: this is the hardcoded window size
201              */
202             unsigned int linewidth = (*buf)->vb.width << 1;
203
204             if (!dev->isoc_ctl.cmd) {
205                     c = (header >> 24) & 0xff;
206

Clearly, it was the trial to access *buf, at line 202 that caused the
Panic.

As ioctl is serialized, While S_STD is handled,QBUF/DQBUF won't be called.
So, the driver will run out of the buffers, and *buf will become NULL.

As, on tm6000, the same URB can contain more than one video buffer, it is
likely to hit a condition where no new buffer is available whily copying
the streams. The fix is to leave the URB copy loop, if there's no more buffers
are available.

The same bug could also be produced by an application that is not fast enough
to request new video buffers.

The same bug were reported by Bee Hock Goh <beehock@gmail.com>.

Thanks-to: Bee Hock Goh <beehock@gmail.com> for reporting the bug
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:19 -03:00
Mauro Carvalho Chehab 6ae635c4f3 V4L/DVB: tm6000: Properly set alternate when preparing to stream
Although the code is getting the better alternates, it is not really using
it. Get the interface/alternate numbers and use it where needed.

This patch implements also one small fix at the last_line set, as
proposed by Bee Hock Goh <behock@gmail.com>.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:18 -03:00
Bee Hock Goh 1ebf2c7f78 V4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loading
Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:18 -03:00
Dmitri Belimov 20dead8da8 V4L/DVB: tm6000: fix i2c read
Set correct limit for I2C packet.
Use different method for the tm5600/tm6000 and tm6010 to read word.

[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:17 -03:00
Mauro Carvalho Chehab af9d9cfd54 V4L/DVB: tm6000: fix compilation due to the lack of a semicolon
Add a missing semicolon to fix this error:

In file included from drivers/staging/tm6000/tm6000-cards.c:32:
drivers/staging/tm6000/tm6000.h:123: error: two or more data types in
declaration specifiers

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:36 -03:00
Bee Hock Goh c16dd82b48 V4L/DVB: TM6000: Fix code which cause memory corruption
The driver was doing malloc when buf is null causing memory corruption.

The analog part is still pretty much broken but at least fixing this
will stop it from crashing the machine when streamon.

Signed-off-by: Bee Hock Goh <beehock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:33 -03:00
Stefan Ringel 2f79088486 V4L/DVB: tm6000: request labeling board version check
request labeling board version check

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:32 -03:00
Stefan Ringel f1434f4e90 V4L/DVB: tm6000: tm6000_i2c_xfer: request labeling
labeling the request after tuner reading and writeing

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:31 -03:00
Stefan Ringel b57f432c28 V4L/DVB: tm6000: add gpios for tm6010 generic board
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:28 -03:00
Stefan Ringel 2edab1ee86 V4L/DVB: tm6000: add gpios to board struct
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:28 -03:00
Stefan Ringel 32a2232bfd V4L/DVB: tm6000: switch to gpio strcut
switch to a gpio structure

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:57:27 -03:00
Mauro Carvalho Chehab 2415a2c14e V4L/DVB: tm6000: replace occurences of req05 magic by a naming alias
Yet another naming replace magic thanks to perl scripts. This time, it
is done with:

cat tm6000-regs.h |perl -ne 'if (m/(TM6010_REQ[^\s]+)\s+0x([a-f0-9]+)\,
0x([a-f0-9]+)/) { $name="$1"; $req=$2; $val=$3; printf
"s/REQ_${req}_SET_GET_USBREG, 0x[0]*$3,/$1,/\n" }'  >a; for i in tm*.c;
do sed -f a $i >b && mv b $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:12 -03:00
Mauro Carvalho Chehab d9a7240736 V4L/DVB: tm6000: add request to registers of the group 05
Yet another script magic. This time, the change were generated by this
script:

cat tm6000-regs.h |perl -ne 'if (m/^(\#define TM6010_REQ)(05)([^\s]+)(\s+)0x([A-F0-9].)/) { \
$name="$1$2$3"; $sp=$4; $req=$2; $val=$5; $val=~tr/A-F/a-f/; \
printf "$name%s0x%s, 0x%s\n", $sp, $req, $val; } else { print $_ }' \
>a; mv a tm6000-regs.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:11 -03:00
Mauro Carvalho Chehab f7d110c68c V4L/DVB: tm6000: Replace naming convention for registers of req 05 group
After looking at the "magic" registers, it is clear that usb registers
belong to request 5.

Replace them with this script:

cat /tmp/reg3 |perl -ne 'if (m/define (TM6000_U_)([^\s]+)\s+0x([A-F0-9].)/) { \
$name=$2; $val=$3; printf "s,$1$2,TM6010_REQ05_R%s_%s,g\n", $val, $name; }' >a;
sed -f a tm6000-regs.h >b; mv b tm6000-regs.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:10 -03:00
Mauro Carvalho Chehab 9afec493e2 V4L/DVB: tm6000: Replace all magic values by a register alias
Instead of using magic pairs of req/reg, replace them by the defined
values.

This patch were generated by the following script:

cat tm6000-regs.h |perl -ne 'if (m/(TM6010_REQ[^\s]+)\s+0x([a-f0-9]+)\,
0x([a-f0-9]+)/) { $name="$1"; $req=$2; $val=$3; printf
"s/REQ_${req}_SET_GET_AVREG[_BIT]*, 0x[0]*$3,/$1,/\n" }'  >a; for i in
tm*.c; do sed -f a $i >b && mv b $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:09 -03:00
Mauro Carvalho Chehab 77012fb995 V4L/DVB: tm6000: Add request at Req07/Req08 register definitions
Use a pair Req/Reg for all registers at req07 and req08 groups. This
makes easier to replace them at the code with a script and helps to
avoid using the wrong req with some register.

This change were generated by this script:

if (m/^(\#define TM6010_REQ)([0-9].)([^\s]+)(\s+)0x([A-F0-9].)/) {
$name="$1$2$3"; $sp=$4; $req=$2; $val=$5; $val=~tr/A-F/a-f/; printf
"$name%s0x%s, 0x%s\n", $sp, $req, $val; } else { print $_ }

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:09 -03:00
Mauro Carvalho Chehab c4bccf5e78 V4L/DVB: tm6000: Replace all Req 8 group of regs with another naming convention
According with the original patch that added the register names, those
are related to tm6010, so name it properly as such. Also, clearly
indicates when a register belongs to Request 0x08 and add its register
value at the name. This makes easier to double check if the proper
register is used along the driver.

This patch were made with the help of this simple perl script, applied
over the definitions of the last register groups:

if (m/define (TM6000_)([^\s]+)\s+0x([A-F0-9].)/) { $name=$2;
$val=$3; printf "s,$1$2,TM6010_REQ08_R%s_%s,g\n", $val, $name; }

And were manually adjusted to fix a few minor issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:08 -03:00
Mauro Carvalho Chehab b8e286260e V4L/DVB: tm6000: Replace all Req 7 group of regs with another naming convention
According with the original patch that added the register names, those
are related to tm6010, so name it properly as such. Also, clearly
indicates when a register belongs to Request 0x07 and add its register
value at the name. This makes easier to double check if the proper
register is used along the driver.

This patch were made with the help of this simple perl script:

if (m/define (TM6000_)([^\s]+)\s+0x([A-F0-9].)/) { $name=$2; $val=$3;
printf "s,$1$2,TM6010_REQ07_R%s_%s,g\n", $val, $name; }

And were manually adjusted to fix a few minor issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:07 -03:00
Stefan Ringel 8b0d2a0527 V4L/DVB: tm6000: add new hybrid-stick
-add Hauppauge WinTV HVR 900H/WinTV USB2-Stick
	vid/pid
	0x2040/6601
	0x2040/6610
	0x2040/6611

-add Terratec Cinergy Hybrid-Stick
	vid/pid
	0x0ccd/0x00a5

-add Twinhan TU501(704D1)
	vid/pid
	0x13d3/0x3240
	0x13d3/0x3241
	0x13d3/0x3243
	0x13d3/0x3264

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:02 -03:00
Dmitri Belimov 723fb9b79b V4L/DVB: tm6000 register defines
Add defines for all registers of the tm6000 module.
This defines made by doc for TM6010, need look docs for TM6000 and TM5600
Some registers can be different.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:32 -03:00
Stefan Ringel 02512fe33e V4L/DVB: tm6000: bugfix reading problems with demodulator zl10353
Reading from zl10353 with tm6000 has a bug. For example:

regs  w/o patch  with patch

0x06     0x00        0x7f
0x07     0x33        0x30
0x08     0x00        0x00
0x09     0x58        0x50
0x0f     0x31        0x28
0x10     0x00        0x84

This patch provides the workaround for the bug

[mchehab@redhat.com: Fix merge conflict and add a comment at the workaround]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:08 -03:00
Stefan Ringel 4e11502d45 V4L/DVB: tm6000: add send and recv function
Split the i2c send and receive functions on separate functions

[mchehab@redhat.com: CodingStyle and fix the logic for more than 2 read values]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:08 -03:00
Dmitri Belimov e28f49b0b2 V4L/DVB: tm6000: fix some info messages
Fix some messages for add information about TM6010

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:07 -03:00
Stefan Ringel 685b122906 V4L/DVB: tm6000: fix i2c addr test
The i2c addr on I2C core is specified on 7-bit format, but tm6000
expects it on 8-bit format.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:06 -03:00
Stefan Ringel 89eeda6711 V4L/DVB: tm6000: remove hack.c hack.h, switch to zl10353 module
"hack"  module were a temporary file with some zl10353 magic. This is not needed anymore.
Just remove it.

[mchehab@redhat.com: CodingStyle fixes]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:05 -03:00
Stefan Ringel 49e5e03c9c V4L/DVB: tm6000: change version to 0.0.2
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:04 -03:00
Stefan Ringel 606d47dae4 V4L/DVB: tm6000: special request for all tuner
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:04 -03:00
Stefan Ringel 38d75a7908 V4L/DVB: tm6000: reset the numbers of feeds to 8
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:03 -03:00
Stefan Ringel 439e7c1482 V4L/DVB: tm6000: add card setup for terratec cinergy hybrid
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:02 -03:00
Stefan Ringel 583c871467 V4L/DVB: tm6000: add different tuner reset for terratec
[mchehab@redhat.com: Fix CodingStyle]
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:01 -03:00
Stefan Ringel d46ca93255 V4L/DVB: tm6000: add additional init register for tm6010
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:01 -03:00
Mauro Carvalho Chehab dfd36d83d9 V4L/DVB: tm6000: fix mutex lock unbalance
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:00 -03:00
Mauro Carvalho Chehab 762e17eb52 V4L/DVB: tm6000: only register after initialized
Udev calls an utility when it senses a v4l device. So, register needs
to be delayed, otherwise it may cause block conditions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:59 -03:00
Julia Lawall f8960ee7a4 V4L/DVB: drivers/staging/tm6000/tm6000-video.c: correct NULL test
Test the just-allocated value for NULL rather than some other value.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,y;
statement S;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
(
if ((x) == NULL) S
|
if (
-   y
+   x
       == NULL)
 S
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:58 -03:00
Randy Dunlap 29ec15e90b V4L/DVB: tm6000: fix build errors
(1) tm6000 uses usb_*() interfaces, so it should depend on USB.

drivers/built-in.o: In function `tm6000_usb_disconnect':
tm6000-cards.c:(.text+0x4abb44): undefined reference to `usb_put_dev'
drivers/built-in.o: In function `tm6000_usb_probe':
tm6000-cards.c:(.text+0x4ac923): undefined reference to `usb_get_dev'
tm6000-cards.c:(.text+0x4ac93c): undefined reference to `usb_set_interface'
drivers/built-in.o: In function `tm6000_read_write_usb':
(.text+0x4ad274): undefined reference to `usb_control_msg'
drivers/built-in.o: In function `tm6000_uninit_isoc':
tm6000-video.c:(.text+0x4b00d5): undefined reference to `usb_kill_urb'
tm6000-video.c:(.text+0x4b00e4): undefined reference to `usb_unlink_urb'
tm6000-video.c:(.text+0x4b013c): undefined reference to `usb_buffer_free'
tm6000-video.c:(.text+0x4b014b): undefined reference to `usb_free_urb'
drivers/built-in.o: In function `tm6000_prepare_isoc':
tm6000-video.c:(.text+0x4b0773): undefined reference to `usb_alloc_urb'
tm6000-video.c:(.text+0x4b0835): undefined reference to `usb_buffer_alloc'
drivers/built-in.o: In function `tm6000_irq_callback':
tm6000-video.c:(.text+0x4b1ad3): undefined reference to `usb_submit_urb'
drivers/built-in.o: In function `tm6000_module_init':
tm6000-cards.c:(.init.text+0x24499): undefined reference to `usb_register_driver'
drivers/built-in.o: In function `tm6000_module_exit':
tm6000-cards.c:(.exit.text+0x5cb0): undefined reference to `usb_deregister'

(2) tm6000-alsa uses interfaces from tm6000-core, so when they are
both built as modules, the core interfaces need to be exported.

ERROR: "tm6000_set_reg" [drivers/staging/tm6000/tm6000-alsa.ko] undefined!
ERROR: "tm6000_get_reg" [drivers/staging/tm6000/tm6000-alsa.ko] undefined!

Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, 	linux-media@vger.kernel.org
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:57 -03:00
Mauro Carvalho Chehab e3ee9e5ec1 V4L/DVB: tm6000: move board-specific init to tm6000-cards
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:57 -03:00
Mauro Carvalho Chehab 591a0d35a8 V4L/DVB: tm6000: Allow tm6000 driver compilation
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:56 -03:00
Stefan Ringel caa0d36cc7 V4L/DVB: tm6000: add a different set param values
Fix several parameter sets, in order to make dvb work

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:55 -03:00
Stefan Ringel 08e60ba0c1 V4L/DVB: tm6000: Fix several bugs at the usb DVB transfer
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:54 -03:00
Stefan Ringel 3a5de48a87 V4L/DVB: tm6000: remove unused function
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:53 -03:00
Stefan Ringel 58b2f4bd5f V4L/DVB: tm6000: add tuner parameter for DVB devices
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:52 -03:00
Stefan Ringel e78c8f22b5 V4L/DVB: tm6000: add tuner callback for dvb frontend
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:51 -03:00
Stefan Ringel 20cabed421 V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
After sending an i2c command, tm6010 needs a reset, in order to properly
work.

While here, add the missing I2C_CLASS_TV_DIGITAL i2c class.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:51 -03:00
Stefan Ringel 7b96640e8f V4L/DVB: tm6000: typo fix: the identifer string is wrong
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:50 -03:00
Stefan Ringel 80af6bb73e V4L/DVB: tm6000: fix: avoid unregister the driver after success
After successfully running tm6000_init_dev, due to a lack of a return(),
the driver runs the error code, unregistering the device.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:49 -03:00
Mauro Carvalho Chehab 04574a6881 V4L/DVB: tm6000: add Terratec Cinergy Hybrid XE
[mchehab@redhat.com: moved the defines for the two beholder boards to a separate commit ]

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:48 -03:00
Mauro Carvalho Chehab 9d3aeb5f00 V4L-DVB: tm6000: add missing BEHOLDER board definitions
The missing of those board definitions break compilation

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:47 -03:00
Stefan Ringel c733a4d5b8 V4L/DVB: tm6000: add digital init for tm6010
The init sequence requires extra initialization for tm6010 in digital
mode.

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:47 -03:00
Stefan Ringel 7dcc51b734 V4L/DVB: tm6000: fix driver compilation
The name of xc5000.h include file were wrong

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:46 -03:00
Laurent Pinchart 833724afc0 V4L/DVB (13556a): v4l: Remove unneeded video_device::minor assignments
Now that the video_device registration is tested using
video_is_registered(), drivers don't need to initialize the
video_device::minor field to -1 anymore.

Remove those unneeded assignments.

[mchehab.redhat.com: apply just the tm6000 changes on a separate patch]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:44 -03:00
Mauro Carvalho Chehab 0a34df5359 V4L/DVB (13555a): v4l: Use video_device_node_name() instead of the minor number
Instead of using the minor number in kernel log messages, use the device
node name as returned by the video_device_node_name() function. This
makes debug, informational and error messages easier to understand for
end users.

[mchehab.redhat.com: apply just the tm6000 changes on a separate patch]

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:43:18 -03:00
Dmitri Belimov 1eefd763fb V4L/DVB (13403): Add new TV cards of Beholder
Add new TV cards of Beholder for autodetect.

With my best regards, Dmitry.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:27 -03:00
Mauro Carvalho Chehab bfc42b9a48 tm6000: Remove legacy code to work with older kernel versions
Such code has no space upstream and prevents tm6000 from compiling.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:26 -03:00
Mauro Carvalho Chehab 1fade8d9fc V4L/DVB (12854): tm6000: i2c addresses should now be specified in 7bit formats
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:25 -03:00
Mauro Carvalho Chehab 64d339d42d V4L/DVB (12853): tm6000: Fix almost all warnings at the driver
Onr warning is left, since it is there for a purpose:
tm6000-core.c:218: warning: ISO C90 forbids mixed declarations and code

It indicates a place where a temporary hack were added. Tests are needed to be sure that
we can remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:25 -03:00
Mauro Carvalho Chehab 427f7facb3 V4L/DVB (12852): tm6000: Fix compilation against 2.6.31
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:24 -03:00
Mauro Carvalho Chehab 77d966a25a V4L/DVB (12848): tm6000: Add README with todo list
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:23 -03:00
Mauro Carvalho Chehab e8a4845d2a V4L/DVB (12845): tm6000: more buffer handling fixes
Before this patch, we were writing outside vmalloced buffer

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:21 -03:00
Mauro Carvalho Chehab 1f9305b7a5 V4L/DVB (12844): tm6000: avoid writing on a floating pointer
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:21 -03:00
Mauro Carvalho Chehab edecce0a31 V4L/DVB (12843): tm6000: cleanup: remove a test debug code
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:20 -03:00
Mauro Carvalho Chehab 721f507b69 V4L/DVB (12842): tm6000: avoid kernel panic while retrieving the filling buffer
Instead of storing next buf on a temp var, saved over URB
processing, restore it using get_next_buf.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:19 -03:00
Mauro Carvalho Chehab 2a8145d4b8 V4L/DVB (12841): tm6000: Fix compilation with newer v4l2-dev API
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:18 -03:00
Mauro Carvalho Chehab df7c1d9a4a V4L/DVB (12840): tm6000: add support for HVR900H
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:18 -03:00
Mauro Carvalho Chehab 8ae1fc6e10 V4L/DVB (12839): tm6000: Another trial to fix analog streaming
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:17 -03:00
Mauro Carvalho Chehab 717ecd2b9a V4L/DVB (12838): tm6000: Fix color support on tm6010
TM6010 uses some different registers for format support.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:16 -03:00
Maykel Moya 1b4c5b1f05 V4L/DVB (12837): tm6000: make tree buildable
Signed-off-by: Maykel Moya <moya@infomed.sld.cu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:15 -03:00
Mauro Carvalho Chehab ed0236afa2 V4L/DVB (12836): tm6000: revert to an old way to copy video
The new way is causing machine hangups. This one works.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:15 -03:00
Mauro Carvalho Chehab c144c03715 V4L/DVB (12835): tm6000: Cleanups to work like em28xx-video
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:14 -03:00
Mauro Carvalho Chehab 576d5739a4 V4L/DVB (12834): tm6000: Fix two warnings
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:13 -03:00
Mauro Carvalho Chehab 6ad6e88a15 V4L/DVB (12833): tm6000: add a proper init code for -alsa
Uses about the same initialization code as defined on usbaudio.c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:12 -03:00
Mauro Carvalho Chehab 44351aa0ee V4L/DVB (12832): tm6000: allow compilation of tm6000-alsa module
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:11 -03:00
Mauro Carvalho Chehab 7ca30c524e V4L/DVB (12831): tm6000: Convert cx88-alsa into tm6000-alsa
- Remove cx88 specific setups;
- Add tm6000 specific start/stop commands;
- Do CodingStyle cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:11 -03:00
Mauro Carvalho Chehab d72d50670e V4L/DVB (12830): tm6000: copy cx88-alsa as tm6000-alsa
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:10 -03:00
Mauro Carvalho Chehab ee1fc07c9f V4L/DVB (12829): tm6000: several changes on usb preparation trying to avoid -EPROTO errors
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:09 -03:00
Mauro Carvalho Chehab c4acf48cad V4L/DVB (12828): tm6000: fixes several CodingStyle and do some cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:08 -03:00
Mauro Carvalho Chehab 204193d959 V4L/DVB (12827): tm6000: fix image hangs
A previous committed patch hanged image output. This patch corrects this issue.
It also warrants that buffer is updated for each frame0+frame1 frame set.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:08 -03:00
Mauro Carvalho Chehab e381a81010 V4L/DVB (12826): tm6000: adds 10ms delay between two consecutive i2c write ops
tm6000 original driver seems to use a delay between two consecutive i2c write
operations.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:07 -03:00
Mauro Carvalho Chehab 2d5024a9e9 V4L/DVB (12825): tm6000: I2C reading operations is not reliable on tm6000
tm6000 sometimes can't read from i2c, but this is currently required for
tuner-xc2028 to work.

This patch adds an option to tuner-xc2028 to not rely on i2c reading.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:06 -03:00
Mauro Carvalho Chehab 6eb5c8a6c8 V4L/DVB (12823): tm6000: Uses another method for handling incomplete packets
This requires a little more memory, and some memcpy to work, but the logic is
simpler than the previous method.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:05 -03:00
Mauro Carvalho Chehab 29c389be1c V4L/DVB (12822): tm6000: Add support for tm6010
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:04 -03:00
Chris Pascoe e30b9d6c64 V4L/DVB (12821): tm6000: update USB request names and clean up i2c routine
Update the descriptions of the USB request types so that they match what
we now know they do.

Rework the i2c_xfer function so that it is more explicit what sort of I2C
transfers it is that the tm6000 can't perform.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:03 -03:00
Christopher Pascoe cf9e1509c2 V4L/DVB (12820): tm6000: fix i2c readings
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:02 -03:00
Mauro Carvalho Chehab 3716ae3ed7 V4L/DVB (12819): tm6000: mts parameter has changed on tuner-xc2028.c
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:02 -03:00
Michel Ludwig 70bfae5aaf V4L/DVB (12818): tm6000: Use dvb_frontend_detach instead of single symbol_put commands
Thanks to Mike Krufky for pointed that one out. Also include some minor
cleanups.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:01 -03:00
Michel Ludwig e762d420b4 V4L/DVB (12817): tm6000: add a missing symbol_put
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:40:00 -03:00
Michel Ludwig 5b74c2c739 V4L/DVB (12816): tm6000: fix tm6000 attach method and fix a few CodingStyles
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:59 -03:00
Mauro Carvalho Chehab 47878f163f V4L/DVB (12815): tm6000: follow videobuf API changes
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:58 -03:00
Mauro Carvalho Chehab d4e15bcd3d V4L/DVB (12814): tm6000: fix eeprom reading on tm6000
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:57 -03:00
Mauro Carvalho Chehab 28cb88caae V4L/DVB (12813): tm6000: all read messages should use prev_reg
read messages with length>1 where using the wrong register.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:56 -03:00
Michel Ludwig b1ce40b139 V4L/DVB (12812): tm6000: fix build dependencies for tm6000 and tuner-xc2028
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:56 -03:00
Mauro Carvalho Chehab 0ef4b05a4f V4L/DVB (12811): tm6000: a few registers is needed from the sif/noif setings
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:55 -03:00
Mauro Carvalho Chehab cc27a8c275 V4L/DVB (12810): tm6000: Avoid sending xc3028 setups for other tuners
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:54 -03:00
Mauro Carvalho Chehab 2c9a95ba17 V4L/DVB (12809): tm6000: Remove an old hack
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:53 -03:00
Mauro Carvalho Chehab 5200401ad8 V4L/DVB (12808): tm6000: Move analog tv standards to tm6000-stds
tm5600/6000/6010 requires a large config table for video standards. Better to
move this to their own file.

Also added register settings for tm6010 (needs testing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:52 -03:00
Mauro Carvalho Chehab d544f2c33f V4L/DVB (12807): tm6000: Properly select xc2028 parameters
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:52 -03:00
Mauro Carvalho Chehab 7594304ee7 V4L/DVB (12806): tm6000: Select VIDEO_TUNER for tm6000 devices
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:51 -03:00
Mauro Carvalho Chehab c1a1641450 V4L/DVB (12805): tm6000: Fix a memory leak at tm6000-video
if a transfer buffer allocation fails, the last allocated urb is leaked
(it hasn't been stored in dev->urb[] yet so tm6000_uninit_isoc misses
it). The patch also includes a small typo fix.

Thanks to Florin Malita <fmalita@gmail.com> for pointing this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:50 -03:00
Michel Ludwig 2b971af238 V4L/DVB (12804): tm6000: Build the module properly if CONFIG_VIDEO_TM6000_DVB is selected.
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:49 -03:00
Mauro Carvalho Chehab 7f9b1412f5 V4L/DVB (12803): tm6000: make tm6000_devused static
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:48 -03:00
Mauro Carvalho Chehab 106bdbe24e V4L/DVB (12802): tm6000: adds command to enable audio output at tm6000
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:47 -03:00
Michel Ludwig 4386136d29 V4L/DVB (12801): tm6000: Add support for ADSTech Mini Dual TV (PTV-339).
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:46 -03:00
Mauro Carvalho Chehab a228618c1a V4L/DVB (12800): tm6000: fix tm6000 analog video buffer handling
Previously, there were no sync between video buffer filling and received
URBs. So, the presented image were a mix of frame and frame-1. Now, a
filled buffer should contain only data for that frame.

allocates a maximum of 64 KB per each URB area. This fixed two bugs:

- Sometimes, there were no available continuos block of about 1 MB;
- Image weren't not properly updated, since parts of the URBs aren't
  updated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:45 -03:00
Mauro Carvalho Chehab cc6c60d912 V4L/DVB (12799): tm6000: avoid troubles if a header is broken on separate URBs
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:44 -03:00
Mauro Carvalho Chehab e2c9500d10 V4L/DVB (12798): tm6000: Split header processing from header find
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:44 -03:00
Mauro Carvalho Chehab c13dd70411 V4L/DVB (12797): tm6000: Allow selecting audio bitrate
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:43 -03:00
Mauro Carvalho Chehab 7e2fdf025c V4L/DVB (12796): tm6000: Add a hack for PAL standards
The common code is not properly working. This hack should do the work
for now.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:42 -03:00
Mauro Carvalho Chehab 71e7cfae31 V4L/DVB (12795): tm6000: Fix buffering size
At the first time an application were called, resolutions were wrong.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:41 -03:00
Mauro Carvalho Chehab 4475c04443 V4L/DVB (12794): tm6000: handle also PAL/SECAM resolutions
Fix the resolutions for 625 line video standards (european PAL/SECAM)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:41 -03:00
Mauro Carvalho Chehab 88894cba79 V4L/DVB (12793): tm6000: On some kernels, eeprom reading were generating a bug
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:40 -03:00
Mauro Carvalho Chehab dc6a02aa35 V4L/DVB (12791): tm6000: fix poll() method
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:39 -03:00
Mauro Carvalho Chehab 5f796752e8 V4L/DVB (12790): tm6000: check for errors on usb->status
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:38 -03:00
Mauro Carvalho Chehab 5c0d0b21fd V4L/DVB (12789): tm6000: fix DVB dependency
Compilation were causing errors, if DVB_CORE weren't selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:38 -03:00
Michel Ludwig 3169c9b26f V4L/DVB (12788): tm6000: Add initial DVB-T support
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:37 -03:00
Michel Ludwig a4cf976c77 V4L/DVB (12786): tm6000: Remove code dealing with the ZL10353
Remove code dealing with the ZL10353 as this is all handled by the ZL10353
module.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:36 -03:00
Michel Ludwig fb31ab4532 V4L/DVB (12785): tm6000: allow user gpio address for tuner reset
Modify tuner_callback to user the device's GPIO address field
for tuner reset.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:35 -03:00
Mauro Carvalho Chehab ec50e8e6f1 V4L/DVB (12784): tm6000: Some cleanups at the driver
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:35 -03:00
Michel Ludwig 90d5802795 V4L/DVB (12783): tm6000: add xc2028/3028 to dvb
Add experimental DVB frontend tuner interface to xc2028/3028

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:34 -03:00
Michel Ludwig 95a838243b V4L/DVB (12782): tm6000: Correct some device capabilities
Add tuner reset GPIO and demodulator address fields to the tm6000_core
struct.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:33 -03:00
Mauro Carvalho Chehab c85cba3fe6 V4L/DVB (12781): tm6000: Start adding support for GPIO device-specific parameters
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:39:32 -03:00