summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/msp3400-driver.c
AgeCommit message (Collapse)Author
2006-04-02Improve line-in handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - improve handling of the EXTERN input: don't start an unnecessary carrier scan - improve the LOG_STATUS output - ensure that a carrier scan is started again when switching back to the tuner. - set correct prescale for L-NICAM Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-01Remove obsolete commands from tvp5150.cHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - Remove old DECODER_ commands from tvp5150.c, replacing them with newer ones if appropriate. - Small VIDIOC_G_TUNER fixes in msp3400 and tuner. - Fix VIDIOC_S_TUNER support in em28xx. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-01More msp3400 and bttv fixesHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - remove obsolete VIDIOC_S_INPUT i2c call in bttv - translate VIDIOCSFREQ to VIDIOC_S_FREQUENCY in i2c call - improve muting during carrier scan in msp3400 - don't start scan unless really needed. - no longer reset chip for msp3400c/d. - remove v4l2 check in tuner-core (radio stops after using the TV) - add missing VIDIOC_INT_ strings in v4l2-common.c Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-31Fix msp3400c and bttv stereo/mono/bilingual detection/handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> - msp3400c did not detect the second carrier, thus being always mono. - properly mute the msp3400c while detecting the carrier. - fix checks on the presence of scart2/3 inputs and scart 2 output. - implement proper audio mode fallbacks for msp3400c/d, identical to the way msp3400g works. - MODE_STEREO no longer produces dual languages when set for a bilingual transmission, instead it falls back to LANG1. Use LANG1_LANG2 to hear both languages of a bilingual transmission. This is much more intuitive for the user and is in accordance with the preferred usage in the v4l2 specification. - bttv tried to implement v4l2 calls with v4l1 calls to the i2c devices, completely mangling the audmode/rxsubchans handling. v4l2 calls now do v4l2 calls to the i2c devices. - fixed broken i2c_vidiocschan in bttv. - add start/end lines to LOG_STATUS. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-28Don't set msp3400c-non-existent registerHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The driver tried to set a register that is not present on msp3400c devices. Add the missing test. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-20Remove VIDIOC_G/S_AUDOUT from msp3400Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> VIDIOC_G/S_AUDOUT does not belong in msp3400 (it's a user level command, not to be used in internal i2c drivers). Also fix a compile warning and improve LOG_STATUS. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Always wake thread after routing change.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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-19Add new media/msp3400.h header containing the routing macrosHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Moved msp3400.h to msp3400-driver.h. Created media/msp3400.h with the new routing defines and lots of comments. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Last round of msp3400 cleanups before adding routing commandsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Lots of cleanups: - remove duplicate actions - add D/K3 Dual FM-Stereo and D/K NICAM FM (HDEV3) support - put prescales in the proper place - add missing D/K NICAM - msp34xxg_reset now only resets instead of also starting the autodetect (moved that to msp34xxg_thread) - fix support for SAP. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Move msp_modus to msp3400-kthreads, add JP and KR std detectionHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> msp_modus is 'G' model specific. Moved it to kthreads and also added proper handling for the Japanese and South Korean TV standards. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Make scart definitions easier to handleHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> For the new routing implementation it is easier if all the 'normal' scart inputs (IN1-IN4) are consecutive. 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-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-18Fix handling of VIDIOC_G_TUNER audmode in msp3400Hans Verkuil
Fix handling of VIDIOC_G_TUNER audmode in msp3400: audmode is only changed by the user with S_TUNER, never by the driver. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-15Return -EINVAL for unknown commands in msp3400 module.Hans Verkuil
- Return -EINVAL for unknown commands. Requested by Mike Isely. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-12removed uneeded init on structs like static int foo=0Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - static vars are equal to zero by default. Removed unnecessary =0 from them, saving some data space; - Fixed compiling against kernels bellow 2.6.13. 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-08Fix stereo and standard reporting of msp3400 (esp. for radio)Hans Verkuil
- Add VIDIOC_LOG_STATUS to the radio device ioctl list. - Reduce the confusion between modes and standards - Fix stereo reporting for radio. - Don't set i2c configuration if the chip doesn't support it. - Fix reporting of current standard for radio. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-08msp3400 audio handling bug fixes.Hans Verkuil
- check capabilities for audio settings (volume, balance, bass, treble, loudness, mute) - added loudness support - added missing VIDEO_AUDIO_BALANCE flags for v4l1 compatibility - do not call msp_any_detect_stereo for non-autoselect chips to retrieve the current stereo setting: that will temporarily mute the sound. It is only needed when the stereo mode might be changed, and for autoselect msp processors that do not periodically need to update their stereo setting. - do not wake up the thread if the standard did not change. Prevents temporary audio drop-out if the standard is set to the same value. - fix confused stereo detect code where V4L2_TUNER_SUB_STEREO and V4L2_TUNER_MODE_STEREO values were used incorrectly. - stereo mode reporting was broken (v4l2 value used to index a string array expecting v4l1 mode values). - do not set dsp register 0x30 in the 3410d thread: that register does not exist for pre-'G' revision msp chips. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-08msp3400: use v4l2_std_id and determine chip capabilities.Hans Verkuil
- Replace old norm by the v4l2_std_id values. - Add code to correctly detect the various capabilities of the various msp chips. It's not yet used, that's going to be the next step. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-08i2c fixes and cleanupsMauro Carvalho Chehab
- Miscelaneous i2c cleanups and fixes to work with kernel >2.6.15 - linux/sound/pci/bt87x.c updated to kernel version. kernel-sync 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-02Added new diagnositics macros, convert msp3400 to the new macros.Hans Verkuil
- Added new v4l_err, v4l_warn, v4l_info and v4l_dbg macros to v4l2-common.h for use in v4l-dvb i2c drivers. This ensures a unique prefix for each device instance. - At a later stage these macros may be reimplemented using the device-generic macros from device.h. - Converted the msp3400 driver to the new macros. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-02Split msp3400.c into msp3400-driver.c and msp3400-kthreads.cHans Verkuil
- Split msp3400.c into msp3400-driver.c and msp3400-kthreads.c. - Removed experimental DFPREG ioctls. If this is really needed one day then it should be implemented using VIDIOC_G/S_REGISTER. - Added missing BALANCE control info for VIDIOC_QUERYCTRL. - Still more cleanup, clarified some kernel messages. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-01more cleanups, simplify volume/balance/bass/treble handlingHans Verkuil
Continue cleanup effort: - more cosmetic changes - combine volume, balance, bass and treble into one audio function. Revert old 2.4 code that crept in. - print internal ioctls using new debug function. - marked all msp3400c (aka manual) functions as such. - removed some unused data structures. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-31msp3400.c cleanup (almost all cosmetic)Hans Verkuil
Step 1 of the msp3400.c cleanup. Most changes are all cosmetic (moved code around, renamed functions and variables). New additions: - VIDIOC_LOG_STATUS for debugging. - More user friendly messages on driver load. - 'simple' renamed to 'autodetect' - 'simpler' renamed to 'autoselect' Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-26Fixed API to set I2S speed controlMauro Carvalho Chehab
- Created a new ioctl to control I2S speed. Old calls to an inadequate V4L2 API replaced. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
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-10Replaces MAX()/MIN() by kernel.h max()/min() macrosMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-10make tree to compile against kernel 2.5.31Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-07#elifs replaced since gentree.pl script is not able to handle elifs.Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-04Restore 2.4 support for msp3400.cHans Verkuil
Restore 2.4 support for msp3400.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-02fix compile error, remove dead code and volume scalingHans Verkuil
Fix compile error (missing '}') in em28xx-video.c. Remove dead code and volume scaling from msp3400.c. Volume scaling does not belong there, it should be done in the driver for the card that uses the msp3400 if needed, not in the msp3400.c source. The volume scaling code gave problems with the ivtv driver which does not need to do any scaling. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-02Fixed device controls for em28xx on WinTV USB2 devicesMauro Carvalho Chehab
- Controls now come from video and audio decoder driver for msp3400 and tvp5150. - Added audio and sound controls as provided by msp3400 and tvp5150. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-27Fix gcc-4.0.2 compile error in msp3400.cHans Verkuil
Fix gcc-4.0.2 compile error in msp3400.c. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-11-27Fix suspend/resume 2.6.15 compile warningsHans Verkuil
Fix suspend/resume 2.6.15 compile warnings. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-11-06 - #elsif removed, since it breaks gentree stuff.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-06- msp3400 code cleanupsMauro Carvalho Chehab
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-06- Improves msp3400 debug messages.Mauro Carvalho Chehab
Now, all kernel message in msp3400.c use the same prefix and include the I2C bus to differentiate between multiple msp3400 I2C chips. - Correctly prints the chip identifier for the msp44xx chips. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-06- Adds missing msp34xxg_reset to VIDIOC_S_STD (just like VIDIOCSCHAN).Mauro Carvalho Chehab
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-05- Fixes set_scart parameter definitions and AUDOUT ioctlMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-04- Adds support for digital output for WinTV USB2 board.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-03- em28xx cleanups and fixes.Mauro Carvalho Chehab
- Some cleanups and audio amux adjust. - em28xx will allways try, by default, the biggest size alt. - Fixes audio mux code. - Fixes some logs. - added a hack to allow using I2S output (commented). 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 - after msp34xxg_reset, msp_wake_thread should be called toMauro Carvalho Chehab
activate autodetection again. 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-14Log message:Mauro Carvalho Chehab
- This fixes dual language detection on the msp3400. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>