summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx18
AgeCommit message (Collapse)Author
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>
2009-02-28cx18: Fix VPS service register codesAndy Walls
From: Andy Walls <awalls@radix.net> Based on a documentation clarification from Conexant, fix the register code used for sliced VBI VPS service. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-28cx18: Correct comments about vertical and horizontal blanking timingsAndy Walls
From: Andy Walls <awalls@radix.net> This change only affects comments. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-28cx18: Fix s-parse warnings and a logic error about extracting the VBI PTSAndy Walls
From: Andy Walls <awalls@radix.net> My s-parse builds never griped about be32_to_cpu() casting to __be32, but Hans' builds did. This change explictly declares the pointer into the VBI buffer header as __be32, which is the correct thing to do as the data is always big endian when we go to fetch it. Hopefully this will quiet s-parse warnings. Also corrected a misplaced parenthesis logic error in checking for the VBI header magic number. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-28cx18: Include cx18-audio.h in cx18-audio.c to eliminate s-parse warningAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-28cx18: Fix a video scaling check problem introduced by sliced VBI changesAndy Walls
From: Andy Walls <awalls@radix.net> Fix a scaling check that was failing, due to a magic number I missed fixing during previous slice VBI changes. Now $ v4l2-ctl -v width=480,height=480,pixelformat=MPEG yields proper visual results again. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-28cx18: Use strlcpy() instead of strncpy() for temp eeprom i2c_client setupAndy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-27cx18 and saa7110: remove the fake v4l2_ctrl_query_fill calls for the proper onesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> During the patch merge, I've added a temporary fix for v4l2_ctrl_query_fill(), just to avoid the tree breakage. Replace those for the proper values. kernel-sync: Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-26cx18: Fix compilation and remove the obsoleted v4l2_ctrl_query_fill_std() callMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-26merge: http://linuxtv.org/hg/~awalls/cx18Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-21cx18: Disable AC3 controls as the firmware doesn't support AC3Andy Walls
From: Andy Walls <awalls@radix.net> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-21cx18: Increment version number due to significant changes for v4l2_subdevsAndy Walls
From: Andy Walls <awalls@radix.net> Driver is now at version 1.1.0. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-21cx18: Get rid of unused variables related to video outputAndy Walls
From: Andy Walls <awalls@radix.net> Remove variables that were holdovers from ivtv for supporting the CX23415 MPEG decoder output. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-21cx18: Change log lines for internal subdevs and fix tveeprom readsAndy Walls
From: Andy Walls <awalls@radix.net> Give messages originating from internal subdevs a header using the subdev's name. Fixed an uninitialized variable problem with reading the EEPROM, noticed from log output. Got rid of the unused cx18_av_exit() function. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-21cx18: Fix a memory leak of buffers used for sliced VBI insertionAndy Walls
From: Andy Walls <awalls@radix.net> We leaked buffers every time a device was removed, if the user had enabled sliced VBI insertion into the MPEG stream. MythTV uses that. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-21v4l2-common: remove v4l2_ctrl_query_fill_stdHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had. It doesn't add anything valuable that cannot be expressed equally well with v4l2_ctrl_query_fill and only adds overhead. Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it from v4l2_common.c. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-02-21cx18: Convert GPIO connected functions to act as v4l2_subdevicesAndy Walls
From: Andy Walls <awalls@radix.net> Convert GPIO line functions, such a audio routing and device resets, to v4l2_subdevices. This essentially completes the conversion of cx18 to the v4l2_device/v4l2_subdevice framework. No regression testing has taken place as of yet. Also an ivtv legacy bug with GPIO mux routing and going to/from radio mode was commented, but not fixed. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-20cx18: Convert I2C devices to v4l2_subdevicesAndy Walls
From: Andy Walls <awalls@radix.net> This is a major perturbation to cx18 I2C device handling to convert it to the v4l2_device/subdeivce framework. This change breaks GPIO audio multiplexer control for the time being. It will be fixed in a coming change. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-16cx18, v4l2-chip-ident: Finish conversion of AV decoder core to v4l2_subdevAndy Walls
From: Andy Walls <awalls@radix.net> Added a new chip identifer to v4l2-chip-ident for the integrated A/V broadcast decoder core internal to the CX23418. Completed separation and encapsulation of the A/V decoder core interface as a v4l2_subdevice. The cx18 driver now compiles and links again. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
2009-02-14cx18: Slim down instance handling, build names from v4l2_device.nameAndy Walls
From: Andy Walls <awalls@radix.net> Convert card instance handling to a lighter weight mechanism like ivtv. Also convert name strings and debug messages to use v4l2_device.name. Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>