summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
AgeCommit message (Collapse)Author
2008-12-27em28xx: Add snapshot feature for Pixelview Prolink PlayTV USB 2.0Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@redhat.com> Added snapshot feature for Pixelview Prolink PlayTV USB 2.0 Priority: normal Signed-off-by: Douglas Schilling Landgraf <dougsland@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: Allow get/set registers for debug on i2c slave chipsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@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-22em28xx: de-obfuscate vidioc_g_ctrl logicMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> vidioc_g_ctrl() were using an uneeded confusing logic. Instead, use the direct approach. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-22em28xx: Fix bad locks on error conditionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal 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-20em28xx: Fix a bug that were putting xc2028/3028 tuner to sleepMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> The changeset 78aa52a159cf introduced a bug on em28xx: buffer setup should be awaking xc3028. Instead, since we didn't specify the tuner mode, the device were going to sleep, due to the lack of tuner mode when asking tuner to handle VIDIOC_S_FREQUENCY: xc2028 0-0061: Device is Xceive 3028 version 1.0, firmware version 2.7 xc2028 0-0061: divisor= 00 00 14 d0 (freq=83.250) xc2028 0-0061: Putting xc2028/3028 into poweroff mode. xc2028 0-0061: Printing sleep stack trace: Pid: 10936, comm: mplayer Tainted: P M 2.6.27.8 #1 Call Trace: [<ffffffffa0b759ea>] xc2028_sleep+0x89/0x1ab [tuner_xc2028] [<ffffffffa0b48fb9>] tuner_s_frequency+0xf5/0x165 [tuner] Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-18merge: http://www.linuxtv.org/hg/~dheitmueller/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16em28xx: don't assume every eb1a:2820 reference design is a Prolink PlayTV USB2Devin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Don't operate under the assumption that every device that uses the em2820 default USB ID is a Prolink PlayTV USB. We have an eeprom hash, so use that, since otherwise we cannot support other devices with the 2820 default USB ID (such as the ADS Tech Instant TV USB USBAV-704) Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-16em28xx: add chip id for em2874Devin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Add the em2870 to the list of known em28xx chip ids. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-16em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET commandDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Fix a NULL pointer dereference that would occur if the video decoder tied to the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver) Priority: high Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-16em28xx: fix/improve em28xx locking schemaMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Changes/fixes on em28xx dev->lock: - em28xx_init_dev() were unlocking without a previous lock; - some read ioctls need to lock after the removal of KBL, since a write may be happening at the same time an ioctl is reading; - keep the device locked during all device initialization; - lock/unlock while reading/writing registers. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16em28xx: vidioc_try_fmt_vid_cap() doesn't need any lockMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> vidioc_try_fmt_vid_cap() just checks if a given resolution is supported. It doesn't touch on struct em28xx device descriptor. so, there's no need to lock. While there, use unlikely() for those values that aren't likely to occur. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16em28xx: move res_get locks to the caller routinesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16em28xx: move dev->lock from res_free to the caller routinesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-08merge: http://linuxtv.org/hg/~dougsland/850-v4l/Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-05em28xx: turn off tuner when not usedMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> em28xx devices generally get hot when xc3028 tuner is powered on. This patch solves this by turning power off when the device is not used, at the expense of having a higher load time, when calling a TV application. Since firmware load happens on 1 or 2 seconds on most devices, this is not a pain. Also, it helps to save the planet by saving some power :) 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-29em28xx: improve board description messagesMauro Carvalho Chehab
Print manufacturer/product info from USB device and also card entry. From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-27em28xx: improve probe messagesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Prints usb speed used by em28xx interface. While there, fixes USB ID's endiannes. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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: fix tuner absent entriesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Before this patch, several devices without tuner were kept the value 0 for tuner_type. However, this means TUNER_TEMIC_PAL. Replace those entries for the proper TUNER_ABSENT value. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-27em28xx: replace magic numbers for mux aliasesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Instead of using magic vmux/amux, let's use an alias where possible. 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-12-09em28xx: fix Kworld Hybrid 330 (A316) supportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: move gpio tables to the top of em28xx-cardsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> 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-26em28xx: Improve register log formatMauro Carvalho Chehab
Change log format to look more like URB transactions. In fact, setup and IN/OUT transactions are merged. This helps to debug the driver. From: Mauro Carvalho Chehab <mchehab@redhat.com> 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: improve debug messagesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Now, the first message states board names. Also, removed printing the alternate settings by default. I2C messages are now clearer. 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-25fix boards for kernels with algo_controlMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> changeset 4ecae6da8244 removed algo_control from i2c drivers. However, on older kernels, a dummy function to implement algo_control is required, otherwise, an OOPS is generated. This patch adds a backport for all i2c drivers that defines an i2c_algorithm, except for cafe_ccic, since OLPC hardware only works for kernels newer than 2.6.19. Some of the backported drivers would need also extra changes to work with older kernels, as specified on v4l/versions.txt. Yet, I decided to add the backport for those drivers also, since the lack of algo_control doesn't generate any compilation error, but it is enough to break the driver. So, better to all for all boards than to allow compiling a kernel backported that just generates OOPS. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24em28xx: fix compile warningHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Label fail_unreg is no longer used. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-25em28xx: Cleanup GPIO/GPO setup codeMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Cleanup the calls to set the GPIOs and GPOs for various devices, replacing the register number with the #define from em28xx-reg.h and converting over to using em28xx_write_reg() Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25em28xx: cleanup XCLK register usageMauro Carvalho Chehab
From: Devin Heitmueller <devin.heitmueller@gmail.com> Convert over to setting the XCLK register usage with the new em28xx_write_reg() function. Thanks to Ray Lu from Empia for providing the em2860/2880 datasheet. Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-24em28xx: fix oops audioDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Replaced usb_kill_usb for usb_unlink_usb (wait until urb to fully stop require USB core to put the calling process to sleep). Oops: http://www.kerneloops.org/raw.php?rawid=71799&msgid= Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-11-24em28xx-alsa: implement another locking schemaMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Instead of using a spinlock, it is better to call the proper pcm stream locking schema. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-22em28xx: improve message probing logsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> On some em28xx devices, there's an unused interface. This is printed on the logs as an error. We can just ignore that interface. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: fix a regression caused by changeset 9630Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> If removing and reiserting the driver on some devices, tuner type will be unset at the second time. This patch fixes this issue. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: devices with xc2028/3028 don't have tda9887Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> This patch cleans up the entries of xc2028/3028, since those devices don't need or use a tda9887. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20em28xx: fix Pixelview PlayTV board entryMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Pixelview uses a Sigmatel stac codec. It has an external line out pin, connected to AC97_MASTER_VOL. It also provides I2S output, but using a different volume for this (AC97_MONO_VOL). Now that AC97 setup is finally fixed, such boards will work better. 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>