summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
AgeCommit message (Collapse)Author
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-09-14tvaudio: convert to bus-based I2C API.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/tvaudio.c | 238 ++++++++++++++---------------------- 1 file changed, 93 insertions(+), 145 deletions(-)
2006-08-25Converted tvaudio from V4L1 to V4L2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> V4L1 ioctls were replaced to V4L2 were applicable. The older ones already implemented were removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/tvaudio.c | 306 ++++++++++++++++++++---------------- 1 file changed, 178 insertions(+), 128 deletions(-)
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-19backport kernel changeset 831441862956fffa17b9801db37e6ea1650b0f69Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Original patch description from the patch by Rafael J. Wysocki <rjw@sisk.pl>: Freezer: make kernel threads nonfreezable by default Currently, the freezer treats all tasks as freezable, except for the kernel threads that explicitly set the PF_NOFREEZE flag for themselves. This approach is problematic, since it requires every kernel thread to either set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't care for the freezing of tasks at all. It seems better to only require the kernel threads that want to or need to be frozen to use some freezer-related code and to remove any freezer-related code from the other (nonfreezable) kernel threads, which is done in this patch. The patch causes all kernel threads to be nonfreezable by default (ie. to have PF_NOFREEZE set by default) and introduces the set_freezable() function that should be called by the freezable kernel threads in order to unset PF_NOFREEZE. It also makes all of the currently freezable kernel threads call set_freezable(), so it shouldn't cause any (intentional) change of behaviour to appear. Additionally, it updates documentation to describe the freezing of tasks more accurately. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-17Use msecs_to_jiffies instead of HZ on media/video I2C driversMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-02Fix v4l-dvb backward compatibilityMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to several internal API changes on kernel, kernel backward compatibility were lost. Basically, compat.h should be the last include for it to work properly. This patch basically reorders kernel headers to allow backward compat to work fine. Also: Some includes were added after some non-include macros, on old drivers. Better to keep all includes at the beginning of the files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-13Backport kernel changeset e63340ae6b6205fef26b40a75673d1c9c0c8bb90Mauro Carvalho Chehab
From: Mauro Carvalho Chehab kernel-sync: The original patch description, from Randy Dunlap <randy.dunlap@oracle.com>: header cleaning: don't include smp_lock.h when not used Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-31Remove useless includes of i2c-algo-bit.hMauro Carvalho Chehab
From: Jean Delvare <khali@linux-fr.org> The tda7432, tda9875 and tvaudio media drivers don't need to include the linux/i2c-algo-bit.h header file. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-28Add VIDIOC_G_CHIP_IDENT to various i2c modulesHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-12-16Several stuff backported from 2.6.19-git seriesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - INIT_WORK replaced by INIT_DELAYED_WORK - struct work_struct replaced by struct delayed_work - callback parameters also changed - SLAB_KERNEL replaced by GFP_KERNEL - linux/suspend.h replaced by linux/freezer.h - on cpia: INIT_WORK replaced by INIT_WORK_NAR - file->f_dentry->d_inode replaced by file->f_path.dentry->d_inode Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-11tvaudio: Replaced kernel_thread() with kthread_run()Michael Krufky
From: Cedric Le Goater <clg@fr.ibm.com> Replaced kernel_thread() with kthread_run() since kernel_thread() is deprecated in drivers/modules. Removed the completion and the wait queue which are now useless with kthread. Also removed the allow_signal() call as signals don't apply to kernel threads. Fixed a small race condition when thread is stopped. Please check if the timer vs. thread still works fine without the wait queue. Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Containers@lists.osdl.org Cc: video4linux-list@redhat.com Cc: v4l-dvb-maintainer@linuxtv.org Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-07-19Remove obsolete #include <linux/config.h>Mauro Carvalho Chehab
From: Jörn Engel <joern@wohnheim.fh-wedel.de> kernel-sync: Kernel adds "-include include/linux/autoconf.h" for every file to be compiled, so, including config.h is not required. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-25Remove VIDIOC_S_AUDIO from tvaudio: no longer used.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Implement V4L2_TUNER_MODE_LANG1_LANG2 audio modeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add a new audio mode V4L2_TUNER_MODE_LANG1_LANG2 (used by VIDIOC_G/S_TUNER). This mode allows the user to select both languages of a bilingual transmission, one language on the left, one on the right audio channel. If there is no bilingual transmission, or it is not supported, then this mode should act like V4L2_TUNER_MODE_STEREO. This mode is introduced for PVR-like drivers where it is useful to be able to record both languages of a bilingual broadcast. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Implement correct msp3400 input/output routingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - implement VIDIOC_INT_S_AUDIO_ROUTING for msp3400 and tvaudio - use the new command in bttv, pvrusb2 and em28xx. - remove the now obsolete MSP_SET_MATRIX from msp3400 (yeah!) - remove the obsolete VIDIOC_S_AUDIO from msp3400. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Cleanup audio input handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Cleanup audio input handling in bttv and tvaudio: - inputs were specified that were never used - mute was handled as a special input which led to confusing code - confusing naming made it difficult to see if the setting was for i2c or gpio. The old audiochip.h input names moved to tvaudio.h. Currently this is used both by tvaudio and msp3400 until the msp3400 implements the new msp3400-specific inputs. Detect in bttv the tvaudio and msp3400 i2c clients and use these client pointers to set the inputs directly instead of broadcasting the command. Removed AUDC_SET_INPUT. Now replaced by VIDIOC_S_AUDIO. This will be replaced again later by the new ROUTING commands. Removed VIDIOC_G_AUDIO implementations in i2c drivers: this command is a user level command and not to be used internally. It wasn't called at all anyway. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-18Implement V4L2_TUNER_MODE_LANG1_LANG2 audio modeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add a new audio mode V4L2_TUNER_MODE_LANG1_LANG2 (used by VIDIOC_G/S_TUNER). This mode allows the user to select both languages of a bilingual transmission, one language on the left, one on the right audio channel. If there is no bilingual transmission, or it is not supported, then this mode should act like V4L2_TUNER_MODE_STEREO. This mode is introduced for PVR-like drivers where it is useful to be able to record both languages of a bilingual broadcast. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-18renamed I2C_foo addresses to I2C_ADDR_fooMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> I2C_foo were used for some i2c addresses. Bad, since those constants could mean other i2c chip things. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-18tvaudio.h are just i2c addresses. Merged into i2c-addr.hMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-22audmode and rxsubchans fixes (VIDIOC_G/S_TUNER)Hans Verkuil
- audmode and rxsubchans fixes in msp3400, tuner, tvaudio and cx25840. - msp3400 cleanups Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-18Add probe check for the tda9840.Hans Verkuil
Add probe check for the tda9840 to prevent misdetection of a Micronas dpl3518a as a tda9840. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11Fixes some bad global variablesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> - debug global var is already used inside kernel. - v4l_dbg now expects the debug var - global vars inside msp34xx renamed to msp_* Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-07printk cleanupsMauro Carvalho Chehab
- some fixes from the previous patches - printk replaced by v4l_ print macros on saa6752 and bt832 Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-07Some cleanups at I2C modulesMauro Carvalho Chehab
- Latest patch reverted, since __stringfy seems to be needed for kernel < 2.6.15 - Applied kernel I2C cleanups from Jean Delaware. - driver names simplified to allow usage of newer printk macros at v4l2-common.h Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-02convert diagnostics over to the new v4l2-common.h macros.Hans Verkuil
- convert diagnostics over to the new v4l2-common.h macros. - deprecated tuner_debug option, the new option is debug. - renamed cx25840_debug to debug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-01ioctls cleanups.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> - Now, all internal ioctls are at v4l2-common.h - removed unused ioctl at saa6752hs.h - all debug ioctl code moved to v4l2-common.c - removed duplicated stuff from other cards Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-29When in radio mode don't do anything with VIDIOC_G_TUNER.Hans Verkuil
When in radio mode don't do anything with VIDIOC_G_TUNER. Allow other devices to fill this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-28Add V4L2 commands to tvaudioHans Verkuil
- Use more general form for debug messages that works for both 2.4 and 2.6. - Add V4L2 commands VIDIOC_S_TUNER, VIDIOC_G_TUNER, VIDIOC_S_STD and VIDIOC_S_FREQUENCY. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-25replace <media/i2c-compat.h> with "i2c-compat.h"Michael Krufky
-#include <media/i2c-compat.h> +#include "i2c-compat.h" Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-12-07kernel-sync patches.Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-30 - Second round of i2c IDs redefinition cleanup.Mauro Carvalho Chehab
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-16- Whitespaces Cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-16- Whitespace Cleanups.Mauro Carvalho Chehab
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-09From: Mauro Carvalho Chehab <mchehab@brturbo.com.br>Mauro Carvalho Chehab
- Lots of small changes to allow compiling with kernel 2.4. Compilation result not tested yet. - After this patch, .version should be removed, since its syntax has changed. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-09-19 * saa6588.c: (saa6588_probe):Michael Krufky
- fix build for 2.6.14 * compat.h: * ir-kbd-i2c.c: (ir_probe): * saa7134-i2c.c: * tvaudio.c: (chip_probe): - removed some #if kernel version > 2.6.13 ... using compat.h instead. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-09-15 * tvaudio.c: (chip_write), (chip_read), (chip_read2), (chip_cmd),Michael Krufky
(chip_thread), (generic_checkmode), (tda8425_initialize), (chip_attach), (chip_probe), (chip_command): - Step three (final step) in upstream changes for kernel 2.6.14-rc1 compatability. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-09-11 * bttv-cards.c:Michael Krufky
- duplicate initializer (near initialization for `bttv_tvcards[9].tuner_addr') duplicate initializer (near initialization for `bttv_tvcards[11].tuner_addr') * cx88-input.c, tuner.h, tvaudio.c, tveeprom.c: - Work around gcc-2.95.x macro expansion bug Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-09-04- Small changes to make easier to generate kernel patches.Mauro Carvalho Chehab
2005-08-30 - adds the adapter number + i2c address to printk msgs.Mauro Carvalho Chehab
- Some CodingStyle cleanups. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-25 * msp3400.c:Mauro Carvalho Chehab
- try_to_freeze moved to the right place. * tvaudio.c: - Tvaudio lacks a refrigerator call. This patch fixes that. Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Nigel Cunningham <ncunningham@suspend2.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> CVSi- ce.
2005-07-15 - linux/version.h removed at linux-2.6.13-rc3-mm1.Mauro Carvalho Chehab
- Removed remaining trailing spaces. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-18 * dpl3518.c, msp3400-old.c, msp3400.c, saa6752hs.c, tda9887.c:Nickolay V. Shmyrev
* tuner-core.c, tvaudio.c, tveeprom.c: - Up requirement on kernel version to remove normal_i2c_range. Actually it gives nothing, only remove unused static structure so it's used as a reminder. - Fix compilation.
2005-06-17 * Make.config, Makefile, cx88-core.c, cx88-video.c:Nickolay V. Shmyrev
* cx88.h, msp3400.c, saa6752hs.c: * tda9887.c, tuner-core.c, tvaudio.c, tveeprom.c: - Remove unneeded config options. Now I2C_CLIENT_MULTI and I2C_NORMAL_RANGE is checked on the fly.
2005-06-15I2C API has changed on 2.6.12-rc6-mm1: I2C_CLIENT_INSMOD macro now doesn'tMauro Carvalho Chehab
require nor uses normal_i2c_range. A new define (CONFIG_USE_I2C_RANGE) is provided to provide compatibility. It is meant to be replaced by a kernel version test after aplyed to mainstream. This patch corrects it. High precision tunning on Radio is correclty supported. Some radio apps already uses it. There's an auto-detection process to check tuner range. Detailed info: * Make.config, Makefile, tuner-core.c: - CONFIG_TUNER_MULTI_I2C dropped from tuner-core.c and included on Make.config - included CONFIG_USE_I2C_RANGE for kernels that requires normal_i2c_range struct (only kernels after 2.6.12-rc6-mm1 doesn't require). * bt832.c, msp3400.c, saa6752hs.c, tda7432.c, tda9875.c, tda9887.c, tuner-core.c,tvaudio.c, tveeprom.c, - I2C range detection corrected to new behavior of 2.6.12-rc6-mm1 * cx88-video.c, tea5767, tuner-core.c: - V4L2_TUNER_CAP_LOW implemented according with V4L2 API for Radio. - tea5767 debug improved. * .bp/2.6/v4l-driver-doc - typo corrected. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-12 * audiochip.h, compat.h, cx22702.h, cx88-core.c, cx88-dvb.c,Mauro Carvalho Chehab
cx88-i2c.c, cx88-vbi.c, cx88-video.c, dpl3518.c, dpl3518.h, i2c-compat.h, id.h, msp3400.h, or51132.c, or51132.h, plx9054.h, rds-saa6588.c, saa7134-dvb.c, tda7432.c, tda9875.c, tvaudio.c, tveeprom.h, tvmixer.c, v4l1-compat.c, video-buf-dvb.h: - Minor changes to synchronize with -mm series; - PAL-60 code maintained for SAA7134. However, -mm has different values; - Now, every .c or .h file has cvs field ID.
2005-03-01- tuner update (for pvr) from Jarod Wilson.Gerd Knorr
2005-01-04- tda9320 support by Johnny Casey.Gerd Knorr
2004-12-10- add moduleparam.h include to many files.Gerd Knorr
- some pinnacle 300i progress (can talk to mt352 now, not working yet through). - misc minor stuff.