summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18
AgeCommit message (Collapse)Author
2009-09-15merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-07cx18: Eliminate warning about discarding 'const' is assignment for IR initAndy Walls
From: Andy Walls <awalls@radix.net> i2c-kbd-i2c allows a bridge driver to pass information about IR configuration, but uses a "void *" to pass along what is essentially constant data. This change casts a const * to a void * to remove the warning. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-09-05cx18: ir-kbd-i2c initialization data should point to a persistent objectAndy Walls
From: Andy Walls <awalls@radix.net> ir-kbd-i2c's ir_probe() function can be called much later (i.e. at ir-kbd-i2c module load), than the lifetime of a struct IR_i2c_init_data allocated off of the stack in cx18_i2c_new_ir() at registration time. Make sure we pass a pointer to a persistent IR_i2c_init_data object at i2c registration time. Thanks to Brain Rogers for pointing out a solution, and Dustin Mitchell for testing against a 2.6.30 kernel. Reported-by: Dustin Mitchell <soxslayer@gmail.com> Reported-by: Brian Rogers <brian@xyzw.org> Priority: high Tested-by: Dustin Mitchell <soxslayer@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net>
2009-08-29common/ir: use a struct for keycode tablesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Currently, V4L uses a scancode table whose index is the scancode and the value is the keycode. While this works, it has some drawbacks: 1) It requires that the scancode to be at the range 00-7f; 2) keycodes should be masked on 7 bits in order for it to work; 3) due to the 7 bits approach, sometimes it is not possible to replace the default keyboard to another one with a different encoding rule; 4) it is different than what is done with dvb-usb approach; 5) it requires a typedef for it to work. This is not a recommended Linux CodingStyle. This patch is part of a larger series of IR changes. It basically replaces the IR_KEYTAB_TYPE tables by a structured table: struct ir_scancode { u16 scancode; u32 keycode; }; This is very close to what dvb does. So, a further integration with DVB code will be easy. While we've changed the tables, for now, the IR keycode handling is still based on the old approach. The only notable effect is the redution of about 35% of the ir-common module size: text data bss dec hex filename 6721 29208 4 35933 8c5d old/ir-common.ko 5756 18040 4 23800 5cf8 new/ir-common.ko In thesis, we could be using above u8 for scancode, reducing even more the size of the module, but defining it as u16 is more convenient, since, on dvb, each scancode has up to 16 bits, and we currently have a few troubles with rc5, as their scancodes are defined with more than 8 bits. This patch itself shouldn't be doing any functional changes. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-10v4l: simplify v4l2_i2c_new_subdev and friendsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr. This simplifies this API substantially. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-07-28cx18: Add i2c initialization for Z8F0811/Hauppage IR transceiversMauro Carvalho Chehab
From: Andy Walls <awalls@radix.net> This patch add support to the cx18 driver for setting up the Z8F0811/Hauppauge IR Tx/Rx chip with the i2c binding model in newer kernels. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net> Reviewed-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-19Stop defining I2C adapter IDs nobody usesMauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> There is no point in defining I2C adapter IDs when no code is using them. As this field might go away in the future, stop using it when we don't need to. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-23cx18: Read buffer overflowAndy Walls
From: Andy Walls <awalls@radix.net> This mistakenly tested against sizeof(freqs) instead of the array size. Due to the mask the only illegal value possible was 3. Reported-by: Roel Kluin <roel.kluin@gmail.com> Priority: high Signed-off-by: Andy Walls <awalls@radix.net>
2009-07-05merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-05merge: http://www.linuxtv.org/hg/~dougsland/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-05cx18: Add an EEPROM dump routine for the Yuan MPC718 and future cardsAndy Walls
From: Andy Walls <awalls@radix.net> Add a routine for dumping the EEPROM of the MPC718. It is generic enough to use for other cards in the future that may have an EEPROM. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-07-03cx18: Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353Andy Walls
From: Andy Walls <awalls@radix.net> Add DVB-T support for Yuan MPC-718 cards with an MT352 or ZL10353 demodulator. There are apparently some units with a DiBcom demodulator which could be supported by one of the dib7000 modules - but this is not implemented in the cx18 driver (yet). Due to lack of porgramming details for the MT352 and the mt352 module requiring a "demod_init" function, a "firmware" must be obtained and loaded to get DVB-T working for Yuan MPC-718 cards with an MT352. Priority: normal Tested-by: Steve Firth <firth650@btinternet.com> Signed-off-by: Andy Walls <awalls@radix.net>
2009-07-03cx18: Update Yuan MPC-718 card entry with better information and guessesAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-07-02remove redundant tests on unsignedDouglas Schilling Landgraf
From: Roel Kluin <roel.kluin@gmail.com> input, inp and i are unsigned. When negative they are wrapped and caught by the other test. Priority: normal Signed-off-by: Roel Kluin <roel.kluin@gmail.com> CC: Andy Walls <awalls@radix.net> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-07-02cx18-fileops.c: Remove unnecessary semicolonsDouglas Schilling Landgraf
From: Joe Perches <joe@perches.com> Priority: normal Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andy Walls <awalls@radix.net> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-06-14ivtv/cx18: fix regression: class controls are no longer seenMauro Carvalho Chehab
From: Hans Verkuil <hverkuil@xs4all.nl> A previous change (v4l2-common: remove v4l2_ctrl_query_fill_std) broke the handling of class controls in VIDIOC_QUERYCTRL. The MPEG class control was broken for all drivers that use the cx2341x module and the USER class control was broken for ivtv and cx18. This change adds back proper class control support. Priority: high Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-09cx18: Add DVB-T support for the Leadtek WinFast DVR3100 HAndy Walls
From: Andy Walls <awalls@radix.net> This adds support for DVB-T on the Leadtek DVR3100 H and should also get analog TV capture from the tuner working properly as well. DVB-T 6 MHz and 8 MHz have been tested and verified to work by Terry Wu of Leadtek. DVB-T 7 MHz has also been verified working with a change developed by Terry to the tuner-xc2028.c driver. Special thanks go to Terry Wu <terrywu2009@gmail.com> of Leadtek who provided the needed information and testing to get digital TV working for the Leadtek DVR3100 H. Reported-by: Terry Wu <terrywu2009@gmail.com> Priority: normal Tested-by: Terry Wu <terrywu2009@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net>
2009-06-09cx18: Split LeadTek PVR2100 and DVR3100 H into 2 separate card entriesAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-29cx18: Perform 64 bit divide so it works for 32 bit systemsAndy Walls
From: Andy Walls <awalls@radix.net> Thanks to David Ward and Mike Krufky for reporting the problem and debugging this as an unresolved symbol due to a 64 bit divide on a 32 bit system. David Ward provided the content of this patch; Andy Walls only performed some cosmetic edits. Reported-by: David Ward <david.ward@gatech.edu> Priority: normal Signed-off-by: David Ward <david.ward@gatech.edu> Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-27merge: http://linuxtv.org/hg/~awalls/cx18-av-coreMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-16cx18: Tweak color burst gate delay and initial color sub-carrier freqAndy Walls
From: Andy Walls <awalls@radix.net> Fix the burst gate delays to use a crystal value of 28636360 as assumed by the rest of the driver. Also have the initial color sub-carrier freq paramter use the src decimation ratio per the documentation, instead of the actual crystal/pixel clock ratio. The tracking circuit will find the correct color subcarrier in any case, as long as we're close. Also fix up some debug print statements. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-16cx18: Complete support for Sliced and Raw VBI for 625 line systemsAndy Walls
From: Andy Walls <awalls@radix.net> Finish changes for sliced and raw VBI for 625 line systems. Tested with VPS and WSS being emitted by a PVR-350 in field 1 lines 16 and 23. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-11merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-05-10cx18: Initial attempt to get sliced VBI working for 625 line systemsAndy Walls
From: Andy Walls <awalls@radix.net> Initial changes to get sliced VBI for 625 line system working. This is patch is untested. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-08cx18: Add missing newline to tuner detection error messageAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-05-03cx18: Have audio decoder drive SIF gain control, and rework AFE configAndy Walls
From: Andy Walls <awalls@radix.net> Ensure the variable gain amplifier gain for SIF is driven by the audio deocder and not the video decoder. This forced rework of the analog front end (AFE) configuration to not rely on autoconfiguration, but instead set up the AFE mux, AFE parameters, and ADC1 & ADC2 configurations explicitly. Reported-by: Helen Buus <mythtv@hbuus.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-28merge: http://linuxtv.org/hg/~awalls/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-28merge: http://linuxtv.org/hg/~awalls/cx18-perfMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-26cx18: Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE registerAndy Walls
From: Andy Walls <awalls@radix.net> Toggle the AI1 mux when changing the CX18_AUDIO_ENABLE register. It's hard to reliably tell when we have written to this register successfully unless we change some bits we know we can read back. The AI mux bits always read back what we wrote to them, so force them to toggle whenever we have to write to the register, so we can tell we wrote to the register successfully. This change was prompted by users experiencing broadcast audio decoding problems after the cx18 module loads for the first time. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-26cx18: Verify cx18-av-core digitizer firmware loads correctlyAndy Walls
From: Andy Walls <awalls@radix.net> Add code to verify the cx18-av-core digitizer firmware loads correctly. The verification function reads back and compares the firmware bytes loaded into the A/V core. The result of the verification is only used to log a message in the system log. This change was prompted by users with multiple card setups that have problems with broadcast audio decoding the first time the cx18 module is loaded. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-26cx18: Allow IVTV format VBI insertion in MPEG-2 SVCD and DVD streamsAndy Walls
From: Andy Walls <awalls@radix.net> Both the MPEG-2 SVCD stream format and the MPEG-2 DVD stream format should use an MPEG-2 PS container. This makes it safe to stuff IVTV Private Stream 1 VBI packets in these stream types using the existing cx18 driver routines. Reported-by: Helen Buus <mythtv@hbuus.com> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-17cx18: Fix the handling of i2c bus registration errorMauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> * Return actual error values as returned by the i2c subsystem, rather than 0 or 1. * If the registration of the second bus fails, unregister the first one before exiting, otherwise we are leaking resources. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-15cx18: Increment version due to significant buffer handling changesAndy Walls
From: Andy Walls <awalls@radix.net> Version bump from 1.1.0 to 1.2.0 Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-15cx18: Simplify the work handler for outgoing mailbox commandsAndy Walls
From: Andy Walls <awalls@radix.net> Simplify the way outgoing work handler gets scheduled to send empty buffers back to the firmware for use. Also reduced the memory required for scheduling this outgoing work, by using a single, per stream work object. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-13cx18: Convert per stream mutex locks to per queue spin locksAndy Walls
From: Andy Walls <awalls@radix.net> To avoid sleeps in providing buffers to user space and in handling incoming buffers from the capture unit, converted the per stream mutex for locking queues to 3 spin locks. There is now a spin lock per queue to increase concurrency when moving buffers around. Also simplified queue manipulations and buffer handling of incoming buffers of data from the capture unit. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-13cx18: Set up to wait for a one-shot response before sending a firmware cmdAndy Walls
From: Andy Walls <awalls@radix.net> When sending an outgoing firmware command, prepare to wait before we raise the interrupt, so we don't miss the wake_up() on the acknowledgment. When waiting for the acknowledgement, there is no need to loop around schedule(), as there will only be one interrupt, and hence one wake_up(), issued. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-13cx18: Add a work queue for deferring empty buffer handoffs to the firmwareAndy Walls
From: Andy Walls <awalls@radix.net> This change defers sending all CX18_CPU_DE_SET_MDL commands, for a stream with an ongoing capture, by adding a work queue to handle sending such commands when needed. This prevents any sleeps, caused by notifying the firmware of new usable buffers, when a V4L2 application read() is being satisfied or when an incoming buffer is processed by the cx18-NN-in work queue thread. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-13cx18: Rename the work queue to "in_work_queue"Andy Walls
From: Andy Walls <awalls@radix.net> Rename the work queue to "in_work_queue" to indicate it is handling incoming mailbox commands. This is preparation for adding a work queue for handling deferrable outgoing mailbox commands. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-13cx18: Send correct input routing value to external audio multiplexersAndy Walls
From: Andy Walls <awalls@radix.net> A late v4l2_subdev framework change accidentally sent the audio input routing value to the external multiplexer, instead of the muxer input routing value to the external multiplexer. This change corrects that error. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-04-02ivtv/cx18: remove VIDIOC_INT_S_AUDIO_ROUTING debug support.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Remove support for the debug call VIDIOC_INT_S_AUDIO_ROUTING from cx18 and ivtv. These internal ioctls shouldn't be exposed. These were only used through the cx18-ctl and ivtv-ctl utilities, and only when testing a new card variant. This cleanup allows the removal of this ioctl from v4l2-common.h. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Andy Walls <awalls@radix.net>
2009-04-02v4l2-subdev: change s_routing prototypeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-common: add explicit v4l2_device pointer as first arg to ↵Hans Verkuil
new_(probed)_subdev From: Hans Verkuil <hverkuil@xs4all.nl> The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on i2c_get_adapdata to return the v4l2_device. However, this is not always possible on embedded platforms. So modify the API to pass the v4l2_device pointer explicitly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Originally the intention was to switch to the new style i2c API starting with the introduction of the API in 2.6.22. However, the i2c_new_probed_device() function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately, it was only fixed in the stable series of 2.6.25 and 2.6.26. Given the fact that the new i2c API also changed starting with 2.6.26 (the addition of i2c_device_id), it is easiest to switch APIs starting with 2.6.26. This patch updates all the legacy code accordingly. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-04-01v4l2-subdev: move s_std from tuner to core.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30v4l2-subdev: add load_fw and use that instead of abusing core->init.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The init callback was used in several places to load firmware. Make a separate load_fw callback for that. This makes the code a lot more understandable. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-30cx18: remove intermediate 'ioctl' stepHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The audio and vbi parts still used an 'ioctl'-like interface. Replace this with normal functions. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Andy Walls <awalls@radix.net>
2009-03-20Kconfig: replace all occurrences of CUSTOMIZE to CUSTOMISEMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> There are several Kconfig items using CUSTOMIZE. Yet, most use the English writing CUSTOMISE. This generates lots of trouble, because people sometimes type the Kbuild item different. Let's standardise every occurrence using the same syntax. The changes were generated by this small shell script: for i in `find linux -type f`; do sed s,CUSTOMIZE,CUSTOMISE,g $i >/tmp/a && mv /tmp/a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-14cx18: Optimize processing of VBI buffers from the capture unitAndy Walls
From: Andy Walls <awalls@radix.net> Removed some unnecessary memcpy()'s by reworking the compress_*_vbi_buf() functions. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-03-14cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG streamAndy Walls
From: Andy Walls <awalls@radix.net> The sliced VBI payloads that cx18 and ivtv would insert in the MPEG stream did not have consistent endianess for the linemasks in the payload (a big endian platform would write them out big endian). This change ensures the linemasks are always stored as little-endian in the MPEG stream to ensure cross platform consistency in parsing the generated MPEG stream. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-03-01cx18: Add interlock so sliced VBI insertion only happens for an MPEG PSAndy Walls
From: Andy Walls <awalls@radix.net> The cx18 private packet insertion code only expects to operate on an MPEG PS when inserting private packets of sliced VBI data. This patch keeps the cx18 driver from corrupting the MPEG TS or other non-PS stream types, in case the user enables sliced VBI insertion for these MPEG stream types. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>