summaryrefslogtreecommitdiff
path: root/drivers/staging/tm6000
AgeCommit message (Collapse)Author
2010-08-31staging: Drop unnecessary null testJulia Lawall
list_for_each_entry binds its first argument to a non-null value, and thus any null test on the value of that argument is superfluous. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ iterator I; expression x; statement S; @@ I(x,...) { <... - if (x != NULL || ...) S ...> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02V4L/DVB: tm6000-input: Make checkpatch.pl happyMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: add ir supportStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Partially revert some copybuf logicMauro Carvalho Chehab
Partially revert changeset 0208bef609242a2d50b95edc713a41566cae500b: As pointed by Stefan Ringel <stefan.ringel@arcor.de>, many packets become damaged by this change. That means that the "size" field of Video/VBI is not presenting 180 bytes, as it should be expected. Thanks-to: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Be sure that the new buffer is emptyMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Fix copybuf continue logicMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: audio packet has always 180 bytesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Improve set bitrate routines used by alsaMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000-alsa: Implement a routine to store data received from URBMauro Carvalho Chehab
Implements the fillbuf callback to store data received via URB data transfers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000-alsa: Fix several bugs at the driver initialization codeMauro Carvalho Chehab
There are several missing things at the driver, preventing, for example, the code to start/stop DMA to actually work. Fix them before implementing a routine to store data at the audio buffers. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: avoid unknown symbol tm6000_debugMauro Carvalho Chehab
Reported by Stefan Ringel. Thanks-to: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Add a callback code for buffer fillMauro Carvalho Chehab
Implements a callback to be used by tm6000-alsa, in order to allow filling audio data packets. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Use an enum for extension typeMauro Carvalho Chehab
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-02V4L/DVB: tm6000-alsa: rework audio buffer allocation/deallocationMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: tm6000: Avoid OOPS when loading tm6000-alsa moduleMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: Staging: tm6000: Fix coding style issuesTimofey Trofimov
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-02V4L/DVB: tm6000: move dvb into a separate kern moduleStefan Ringel
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-02V4L/DVB: tm6000: rewrite init and finiStefan Ringel
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-02V4L/DVB: tm6000: Fix Video decoder initializationDmitri Belimov
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-02V4L/DVB: tm6000: rewrite copy_streamsStefan Ringel
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-06-28v4l-dvb: update gfp/slab.h includesTejun Heo
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-01V4L/DVB: tm6000: add DVB support for tuner xc5000Stefan Ringel
[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-01V4L/DVB: tm6000: set variable dev_mode in function tm6000_start_streamStefan Ringel
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-01V4L/DVB: tm6000: Properly select the tunersStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: tm6000: Add control to the power ledStefan Ringel
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-01V4L/DVB: tm6000: bugfix stabilizing urb dataStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: tm6000: bugfix video imageStefan Ringel
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-01V4L/DVB: tm6000: add vbi message inside the type switchStefan Ringel
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-01V4L/DVB: tm6000: bugfix incorrect sizeStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: tm6000, reset I2C bus functionDmitri Belimov
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-01V4L/DVB: tm6000: Remove an extra ; symbolStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-06-01V4L/DVB: tm6000: add extension module supportStefan Ringel
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-05-19V4L/DVB (13554a): v4l: Use the video_drvdata function in driversMauro Carvalho Chehab
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-19V4L/DVB: tm6000: bugfix image positionStefan Ringel
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-19V4L/DVB: tm6000: README - add vbiStefan Ringel
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: Rework for support xc5000Dmitri Belimov
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-19Fix compilation breakage with tm6000Mauro Carvalho Chehab
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-19V4L/DVB: tm6000: update the todo listMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: Fix color format with tm6010Mauro Carvalho Chehab
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-19V4L/DVB: tm6000: fix coding style issues of tm6000-cards.cRoel Van Nyen
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-19V4L/DVB: tm6000: renaming firmwareStefan Ringel
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-19V4L/DVB: tm6000: bugfix analog init for tm6010Stefan Ringel
- 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-19V4L/DVB: tm6000: Don't copy outside the bufferMauro Carvalho Chehab
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-19V4L/DVB: tm6000: Fix a panic if buffer become NULLMauro Carvalho Chehab
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-19V4L/DVB: tm6000: Properly set alternate when preparing to streamMauro Carvalho Chehab
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-19V4L/DVB: tm6000: Add additional GPIO for UT821 during frmware loadingBee Hock Goh
Signed-off-by: Bee Hock Goh <beehock@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19V4L/DVB: tm6000: fix i2c readDmitri Belimov
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-19V4L/DVB: tm6000: fix compilation due to the lack of a semicolonMauro Carvalho Chehab
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-19V4L/DVB: TM6000: Fix code which cause memory corruptionBee Hock Goh
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-19V4L/DVB: tm6000: request labeling board version checkStefan Ringel
request labeling board version check Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>