aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-06-23V4L/DVB (11913): cx231xx: TRY_FMT should not actually set anythingTrent Piepho3-23/+7
In the TRY_FMT handler the function get_scale() is called to find what the scaler hardware will produce for a requested size. The problem is that get_scale(struct cx231xx *dev, ..., unsigned int *vscale, unsigned int *hscale) saves the calculated scale values into both the pointer arguments and into dev's hscale and vscale fields. TRY_FMT shouldn't actually change anything in the device state. The code to in get_scale() that writes to dev->[hv]scale can just be deleted. In all cases when dev's fields should be modified, get_scale() was called with get_scale(dev, ..., &dev->hscale, &dev->vscale), so dev was getting updated anyway. This didn't actually cause a problem because nothing ever actually made use of the hscale and vscale fields. I changed cx231xx_resolution_set() to use those fields rather than re-calculate them with a call to get_scale(). Updating [hv]scale in cx231xx_resolution_set() isn't necessary because every call of cx231xx_resolution_set() was already preceded by a call to get_scale() or setting the [hv]scale fields, so they will be always be up-to-date w.r.t. width and height. Removing the call to get_scale() from cx231xx_resolution_set() allowed making get_scale() a static function, which is a good thing for something with such a short name. There is already another function with the same name in the em28xx driver, but that one is static. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23V4L/DVB (11911): cx231xx: Use v4l bounding/alignment functionTrent Piepho1-13/+3
The v4l function has a better algorithm for aligning image size. Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23V4L/DVB (12112): cx231xx: fix uninitialized variable.Hans Verkuil1-1/+1
The variable 'rc' could be used uninitialized in the cx231xx_capture_start function. Sri informed me that it should be initialized to -1. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11845): ir-kbd-i2c: Use initialization dataJean Delvare3-33/+0
For specific boards, pass initialization data to ir-kbd-i2c instead of modifying the settings after the device is initialized. This is more efficient and easier to read. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding modelJean Delvare3-4/+11
Let card drivers probe for IR receiver devices and instantiate them if found. Ultimately it would be better if we could stop probing completely, but I suspect this won't be possible for all card types. There's certainly room for cleanups. For example, some drivers are sharing I2C adapter IDs, so they also had to share the list of I2C addresses being probed for an IR receiver. Now that each driver explicitly says which addresses should be probed, maybe some addresses can be dropped from some drivers. Also, the special cases in saa7134-i2c should probably be handled on a per-board basis. This would be more efficient and less risky than always probing extra addresses on all boards. I'll give it a try later. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needsJean Delvare1-1/+1
In the standard device driver binding model, the name field of struct i2c_client is used to match devices to their drivers, so we must stop using it for internal purposes. Define a separate field in struct IR_i2c as a replacement, and use it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16V4L/DVB: cx231xx: remove unused #include <linux/version.h>'sHuang Weiyi2-2/+0
Remove unused #include <linux/version.h>'s in drivers/media/video/cx231xx/cx231xx-avcore.c drivers/media/video/cx231xx/cx231xx-vbi.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-29V4L/DVB (11494a): cx231xx Kconfig fixesMauro Carvalho Chehab1-22/+22
selecting ALSA module breaks if !SND. Just remove select. While here, let's fix the whitespacing at the Kconfig. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06cx231xx: Convert to snd_card_create()Mauro Carvalho Chehab1-3/+4
Convert from snd_card_new() to the new snd_card_create() function. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11380): v4l2-subdev: change s_routing prototypeHans Verkuil2-10/+2
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdevHans Verkuil1-4/+4
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.Hans Verkuil1-1/+1
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11369): v4l2-subdev: add load_fw and use that instead of abusing core->init.Hans Verkuil1-1/+1
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11368): v4l2-subdev: move s_standby from core to tuner.Hans Verkuil1-1/+1
s_standby is only used to put the tuner in powersaving mode, so move it from core to tuner. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11353): cx231xx: remove explicitly set v4l2_device.nameJanne Grunau1-2/+0
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11352): cx231xx: use usb_interface.dev for v4l2_device_registerJanne Grunau1-1/+1
Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11250): cx231xx: Fix Kconfig help itemsMauro Carvalho Chehab1-4/+4
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11135): cx231xx: use usb_make_path() for bus_infoMauro Carvalho Chehab1-2/+1
VIDIOC_QUERYCAP should return the proper bus info. In the case of USB, this should be generated by usb_make_path(), being something like: usb-0000:00:1d.7-2 Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11134): cx231xx: dmesg cleanupMauro Carvalho Chehab5-27/+4
Remove some printk's that were needed only during development phase. Also, cleans the printed messages to produce a nicer result. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11133): cx231xx: don't print pcb config debug messages by defaultMauro Carvalho Chehab1-16/+18
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11132): cx231xx: usb probe cleanupsMauro Carvalho Chehab1-223/+189
Simplifies the usb probe logic, cleaning the printed messages during the probing phase. Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11131): cx231xx: avoid trying to access unfilled dev structMauro Carvalho Chehab1-1/+1
cx231xxinfo needs dev->name. However, this is not declared on the time the check for the max number of supported devices is done. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11130): cx231xx: fix an inverted logic at vidioc_streamoffMauro Carvalho Chehab1-1/+1
Cc: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11129): cx231xx: Use generic names for each device blockSri Deevi5-741/+538
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11128): cx231xx: convert the calls to subdev formatSri Deevi5-103/+91
This patch converts cx231xx to the new v4l2 dev/subdev, doing: - Conversion of i2c calls to subdev calls; - all subdev calls to call_all(); - Corrected the header file order in cx231xx.h; - Added tuner frequency setting. Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (11038): Fix the issue with audio module & correction of NamesSri Deevi2-5/+7
The audio module requested in driver differs with module created by Makefile. Makefile is corrected to create the same module name required by driver. Also, corrected the strings that shows wrong name. Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10982): cx231xx: fix compile warningHans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10958): cx231xx: some additional CodingStyle and minor fixesSri Deevi13-971/+1961
changed the pcb-config.c/h to pcb-cfg.c/h for short names. Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10957): cx231xx: Fix CodingStyleSri Deevi12-257/+326
Fixes several CodingStyle issues on the driver. Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10957a): cx231xx: Fix compilation breakageMauro Carvalho Chehab3-4/+3
Only cx231xx-video needs linux/version.h, due to KERNEL_VERSION macro, that is used by V4L2 API. This patch moves the KERNEL_VERSION to its proper place and starts with 0,0,1. There are still much more to be fixed on later patches Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10956): cx231xx: First series of manual CodingStyle fixesMauro Carvalho Chehab5-1628/+1257
This patch cleans up CodingStyle on the following source files: There are still much more to be fixed on later patches Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10955): cx231xx: CodingStyle automatic fixes with LindentMauro Carvalho Chehab13-4900/+5809
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06V4L/DVB (10954): Add cx231xx USB driverSri Deevi15-0/+12435
Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> [mchehab@redhat.com: Remove the Kconfig changes, to avoid git breakages] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>