summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx.h
AgeCommit message (Collapse)Author
2009-04-09em28xx: Add EmpireTV board supportDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Added EmpireTV entry. Thanks to Xwang <xwang1976@email.it> to provide data for this board. Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-03-31em28xx: convert to v4l2_subdevDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Converted em28xx driver to v4l2_subdev. Thanks to Hans Verkuil <hverkuil@xs4all.nl> for helping this conversion. Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-03-04em28xx: enable Compro VideoMate ForYou soundMauro Carvalho Chehab
From: Vitaly Wool <vital@embeddedalley.com> Compro VideoMate uses an external audio DSP chip, controlled via tvaudio module (tda9874a). This patch improves em28xx infrastructure to support an external audio processor and fixes the Compro VideoMate entry to work with it. Signed-off-by: Vitaly Wool <vital@embeddedalley.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-03compat: rename struct delayed_work to work_struct on pre-2.6.20Trent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> In v2.6.19-rc6-118-g52bad64 struct work_struct was changed to be only for non-delayed work and struct delayed_work was created for delayed work. Instead of putting ifdefs in the drivers, we use compat.h to rename delayed_work to work_struct on pre-2.6.20 kernels. This will only be a problem if some driver decides to create identifiers named both work_struct and delayed_work in the same scope. There is one driver that has something named work_struct and none with anything named delayed_work, so I don't think will be a problem for as long as this compat code sticks around. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-02-25em28xx-cards: remove incorrect entryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Removed EM2821_BOARD_PROLINK_PLAYTV_USB2 entry. This entry has a incorrect tuner set. Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-02-25em28xx: VideoMate For You USB TV box requires tvaudioMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> As reported by Vitaly Wool <vital@embeddedalley.com>: > about half a year ago I posted the patch that basically enabled Compro > VideoMate For You USB TV box support. > The main problem is I couldn't get the sound working. > So I kind of decomposed the box and found out the audio decoder chip > used there was Philips TDA9874A. As far as I can see, it's not supported > within the em28xx suite although it is for other TV tuner drivers. A tvaudio modprobing confirms that tda9874a chip is accessible via i2c: tvaudio: TV audio decoder + audio/video mux driver tvaudio: known chips: tda9840, tda9873h, tda9874h/a, tda9850, tda9855, tea6300, tea6320, tea6420, tda8425, pic16c54 (PV951), ta8874z tvaudio' 1-0058: chip found @ 0xb0 tvaudio' 1-0058: tvaudio': chip_read2: reg254=0x11 tvaudio' 1-0058: tvaudio': chip_read2: reg255=0x2 tvaudio' 1-0058: tda9874a_checkit(): DIC=0x11, SIC=0x2. tvaudio' 1-0058: found tda9874a. tvaudio' 1-0058: tda9874h/a found @ 0xb0 (em28xx #0) tvaudio' 1-0058: tda9874h/a: chip_write: reg0=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg1=0xc0 tvaudio' 1-0058: tda9874h/a: chip_write: reg2=0x2 tvaudio' 1-0058: tda9874h/a: chip_write: reg11=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg12=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg13=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg14=0x1 tvaudio' 1-0058: tda9874h/a: chip_write: reg15=0x0 tvaudio' 1-0058: tda9874h/a: chip_write: reg16=0x14 tvaudio' 1-0058: tda9874h/a: chip_write: reg17=0x50 tvaudio' 1-0058: tda9874h/a: chip_write: reg18=0xf9 tvaudio' 1-0058: tda9874h/a: chip_write: reg19=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg20=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg24=0x80 tvaudio' 1-0058: tda9874h/a: chip_write: reg255=0x0 tvaudio' 1-0058: tda9874a_setup(): A2, B/G [0x00]. tvaudio' 1-0058: tda9874h/a: thread started] This patch automatically loads tvaudio when needed (currently, only with this board). Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-11em28xx: support added for IO-DATA GV/MVP SZ - EMPIA-2820 chipsetDouglas Schilling Landgraf
From: Indika Katugampala <indika_20012001@yahoo.co.jp> Priority: normal Signed-off-by: Indika Katugampala <indika_20012001@yahoo.co.jp> [dougsland@redhat.com: Fixed CodingStyle] Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-02-12merge: http://linuxtv.org/hg/~dougsland/v4l2-em28xxMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-11em28xx: Add support for Easy Cap Capture DC-60Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one of those devices. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-11em28xx: Add support for Kaiomy TVnPC U2 stickMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Thanks to Peter Senna Tschudin <peter.senna@gmail.com> for borrow me one of those devices. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-11em28xx: Coding style fixes and a typo correctionDouglas Schilling Landgraf
From: Nicola Soranzo <nsoranzo@tiscali.it> Lots of coding style fixes and a typo correction for em28xx. Priority: normal Signed-off-by: Nicola Soranzo <nsoranzo@tiscali.it> [dougsland@redhat.com: fixed a reject due to a change on em28xx-audio.c] Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-02-08em28xx-audio: Add macros EM28XX_START_AUDIO / EM28XX_STOP_AUDIODouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Added macros EM28XX_START_AUDIO and EM28XX_STOP_AUDIO for em28xx_cmd(). Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-02-08em28xx: Fix for em28xx audio startupDouglas Schilling Landgraf
From: Robert Krakora <rob.krakora@messagenetsystems.com> Essentially if a snd_em28xx_capture_trigger() stop followed by a snd_em28xx_capture_trigger() start would not yield any data because there was some logic put in with an adev->shutdown variable which did not seem warranted in my humble opinion. It would cause snd_em28xx_capture_trigger start never to start up the audio stream until the device was closed and reopened again. Upon re-opening the device adev->shutdown is reset and audio data would again flow. Priority: high Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-01-19em28xx: Add entry for GADMEI TVR200Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Added entry for GADMEI TVR200. Thanks to Yohanes Nugroho <yohanes@gmail.com> for testing and data collection. Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2009-01-18em28xx: Fix for KWorld 330U BoardMauro Carvalho Chehab
From: Robert Krakora <rob.krakora@messagenetsystems.com> Fix for KWorld 330U Board Many thanks to Devin and Mauro!!! Priority: normal Signed-off-by: Robert Krakora <rob.krakora@messagenetsystems.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-17em28xx: fix compile warningHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2009-01-12em28xx: fix audio output PCM IN selectionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However, currently, the PCM IN selection is not set by the driver. This patch allows specifying the PCM IN expected output, via board description table. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-31em28xx: allocate adev together with struct em28xx devMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Some devices require different setups on struct_audio. Due to that, we may need to change some fields at dev.adev during device probe. So, this patch moves the dynamic memory allocation of adev at em28xx-alsa to the dynamic allocation of struct em28xx dev that happens during device probe. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30v4l2: introduce v4l2_file_operations.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-29em28xx: remove worthless Pinnacle PCTV HD Mini 80e device profileDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> The Pinnacle 80e cannot be supported since Micronas yanked their driver support for the drx-j chipset at the last minute. Remove the device profile since it cannot work without the drx driver and it being there is only likely to confuse people into thinking the device is supported but not working. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-29em28xx: remove redundant Pinnacle Dazzle DVC 100 profileDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> The DVC 100 profile is redundant since we already have an existing identical profile named "Pinnacle Dazzle DVC 90/DVC 100" Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-29merge: http://linuxtv.org/hg/~dougsland/v4lMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-28em28xx: simplify analog logicMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now, just two routines are enough for analog: the first one configs the analog part and register V4L2 devices, and the second one release analog devices. After this patch, it will be easier to transform em28xx-video into an em28xx extension, loaded only on analog devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-28em28xx: move usb probe code to a proper placeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> em28xx-video were holding several code that are not specific to V4L2 interface. This patch moves the core code for em28xx-core, and usb probing code into em28xx-cards. This opens the possibility of breaking em28xx into a core module and a V4L2 module, loaded only on devices that have analog interfaces. Some cleanup may be done at em28xx-cards to optimize the config code. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-27em28xx: Add entry for PixelView PlayTV Box 4Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Added board PixelView PlayTV Box 4 Thanks to Vildenei Negrao Pereira <neodarkaman@brturbo.com.br> for testing and data collection. Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
2008-12-22em28xx: Add suport for debugging AC97 anciliary chipsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> The em28xx driver can be coupled to an anciliary AC97 chip. This patch allows read/write AC97 registers directly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-20em28xx: use a more standard way to specify video formatsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This patch uses the same code for enumberating video formats that are present on cx88, bttv and saa7134 drivers. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-01em28xx: Add specific entry for WinTV-HVR 850Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added specific entry for WinTV-HVR 850 Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-27em28xx: move tuner gpio's to the cards structMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-27em28xx: Add support for suspend the device when not usedMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Several chips may be turned off when the device is not used, like audio, video and dvb demods. This patch adds a gpio callback at the core structs to allow turning off such devices. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-27em28xx: fix gpio settingsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> A previous changeset moved gpio from em28xx struct into em28xx_board. However, the driver were not updated to properly honor those gpio's. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-27em28xx: move gpio lines into board table descriptionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Instead of a large, ugly switch specifying the gpio tables for each device, let's move it into the boards struct. This also helps to see what boards have already the gpio's for DVB. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-26em28xx: replace some magic by register descriptions where knownMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Replaces all occurrences of em28xx_write_regs_req() and em28xx_write_reg() used to setup register names by em28xx_write_reg(). Also, documents the register names that are known. This patch were generated by this small perl script: my %reg_map = ( # Register table - the same as defined on parse_em28xx.pl script ); while (<>) { if (m/(.*)em28xx_write_regs_req\(dev\,\s*0x00\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) { my $reg = $2; my $val = $3; $val =~ tr/A-f/a-f/; $reg = $reg_map{$reg} if defined($reg_map{$reg}); printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val; } elsif (m/(.*)em28xx_write_regs\(dev\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) { my $reg = $2; my $val = $3; $val =~ tr/A-f/a-f/; $reg = $reg_map{$reg} if defined($reg_map{$reg}); printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val; } else { print $_; } } Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: cleanup: We need just one tuner callbackMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: cleanup: saa7115 module auto-detects saa711x typeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Since saa7115 has saa711x chip auto-detection, there's no need on differenciating it at cards table. Just use the generic name for all boards that use a philips saa711x decoder. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25Remove duplicated fields on em28xx_board and em28xx structsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Several fields are duplicated on both structs. Let's just copy em28xx_board instead. A later cleanup could just copy the fields that are changed, in order to keep em28xx_board const. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: card description cleanupsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Remove unused em28xx_board.vchannels and em28xx.video_channels. Also, .is_em2800 = 0 is not needed, as all data is zeroed by kernel loader. The table also included a notice that svideo weren't test on Hauppauge USB2. Remove this notice, since this input also works properly. Also, it does some whitespace cleanups. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: Properly handles XCLK and I2C speedMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> The previous patches removed XCLK and I2C magic. Now, we finally know what those registers do. Also, only a very few cards need different setups for those. Instead of keeping the setups for those values inside the per-device hack magic switch, move the uncommon values to the board-specific struct, and have a common setup for all other boards. So, almost 100 lines of hacking magic were removed. A co-lateral effect of this patch is that it also fixes a bug at em28xx-core, where xclk were set, without taking any care about not overriding a previous xclk setup. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20Allow opening more than one output at the same timeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Some devices use more than one AC97 outputs. This patch allows such devices to properly work. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: Add detection of Sigmatel Stac97xx series of AC97 devicesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: allow specifying audio outputMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Some boards use different AC97 setups for output. This patch adds the capability of specifying the output to be used. Currently, only one output is selected, but the better is to allow user to select it via a mixer, on alsa driver. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20Introduce a new function that writes to a single register. This isMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> useful because the vast majority of register writes are a single register, and this format permits or'ing register value bits together. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: improve AC97 handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> AC97 devices provide several input and outputs. However, before this patch, em28xx device weren't properly allowing the usage of ac97 possible combinations. Also, several input volumes were left untouched, instead of making sure that the volumes were set on mute state. This patch improves support for ac97 devices by allowing to use any inputs, and making sure that unused inputs are set on mute state. Yet, some work is still needed to select the AC97 output. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: merge AC97 vendor id's into a single varMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This makes easier to identify vendor ID, since AC97 vendors are generally identified by 3 bytes. The remaining byte is used by the vendor to identify its devices. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-19em28xx: Improve audio handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This patch properly implements audio handling on em28xx. Before this patch, it was assumed that every device has an Empia 202 audio chip. However, this is not true. After this patch, specific AC97 chipset setup and configurations can be done. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-19Make use of the em28xx chip configuration register to determine whetherMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> we have AC97 audio, I2S audio, or no audio support at all. Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-19Avoid having two concurrent control URB'sMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now that we have a polling task for IR, there's a race condition, since IR can be polling while other operations are being doing. Also, we are now sharing the same urb_buf for both read and write control urb operations. So, we need a mutex. Thanks to Davin Heitmueller <devin.heitmueller@gmail.com> for warning me. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-18em28xx: avoid allocating/dealocating memory on every control urbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Before this patch, every register setup on em28xx were dynamically allocating a temporary buffer for control URB's to be handled. To avoid this ping-pong, use, instead a pre-allocated buffer. Also, be sure that read control URB's also use the buffer, instead of relying on a stack buffer. Priority: high Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-16Some boards need to specify tuner addressMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-13em28xx: refactor IR supportMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Refactor the em28xx IR support based on the em2860/em2880 and em2874 datasheets. Tested on the HVR-950 (em2883), Pinnacle 800e (em2883), Pinnacle 80e (em2874) using the remote controls that came with those products. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>