summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
AgeCommit message (Collapse)Author
2008-03-08Fix em2800 altsetting selection.Mauro Carvalho Chehab
From: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-04em28xx: correct use of and fixMauro Carvalho Chehab
From: Andrew Morton <akpm@linux-foundation.org> be less silly while we're there. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-26 em28xx: Correct use of ! and &Mauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-11em28xx: Fix undefined symbol error with CONFIG_SND=NMauro Carvalho Chehab
From: S.Caglar Onur <caglar@pardus.org.tr> Following patch fixes following undefined symbol errors with CONFIG_SND=N Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-08em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is setMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks to Alan Stern <stern@rowland.harvard.edu> for pointing this issue. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-08Allow more than one em28xx boardMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> em28xx driver is capable of handling more than one usb device. However, isoc transfers require a large amount of data to be transfered. Before this patch, just one em28xx board were enough to allocate more than 50% URBs: T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8 B: Alloc=480/800 us (60%), #Int= 0, #Iso= 2 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 So, only one board could use an USB host at the same time. After the patch, it is possible to use more than one em28xx at the same time, on the same usb host, if the image size is slower or equal to 345600, since those images will require about 30% of the URBs: T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8 B: Alloc=232/800 us (29%), #Int= 0, #Iso= 2 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 So, in thesis, after the patch, it would be possible to use up to 3 boards by each usb host, if the devices are generating small images. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-06em28xx-alsa: Add a missing mutexMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-06em28xx: makes audio settings more stableMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Improves audio configurations on em28xx: - mutes audio before changing amux; - adds a delay after setting audio src; - waits up to 50ms for ac97 busy. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-06em28xx: Fix endian and returns the correct valuesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-06em28xx: Fix printing debug values higher than 127Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-06em28xx: Allow register dump/setting for debugMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Adds vidioc_[g|s]_register handlers. This allows getting/setting register from em28xx. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-05Fix em28xx audio initializationMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> AC97 register initialization seem to always be needed. This patch fixes audio for Prolink/Pixelview USB2 board. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-05 em28xx/em28xx-core.c: fix use of potentially uninitialized variableMauro Carvalho Chehab
From: Andrew Morton <akpm@linux-foundation.org> drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source': drivers/media/video/em28xx/em28xx-core.c:276: warning: 'no_ac97' may be used uninitialized in this function This looks like a genuine bug to me. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-30 Add USB ID for a newer variant of Hauppauge WinTV-HVR 900Mauro Carvalho Chehab
From: Luc Saillard <luc@saillard.org> Device description: WinTV-HVR-900 M/R: 65018/B3C0 ##4207 Signed-off-by: Luc Saillard <luc@saillard.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-28 em28xx/: make 2 functions staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@kernel.org> This patch makes the following needlessly global functions static: - em28xx-core.c:em28xx_write_reg_bits() - em28xx-video.c:em28xx_vdev_init() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
2008-01-24em28xx: remove has_tunerMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> has_tuner flag doesn't make much sense, since tuner_type=TUNER_ABSENT means the same thing. Having two ways to say that a tuner is not present is not nice, since it may lead to bad setups. In fact, with the previous code, if a device were using has_tuner=0, but the user forces a tuner, with modprobe option tuner=type, the modprobe option won't work. Also, tveeprom returns TUNER_ABSENT, when tuner is unknown or absent. So, with the previous logic, in this case, the driver should set has_tuner=0, or has_tuner=1 otherwise. Instead of adding several additional tests and setups, better just to remove .has_tuner. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-18include sound/driver.h should be before sound/core.hMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Add compat.h at the proper place Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-18Remove sound/driver.hMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> sound/driver.h is already included by sound/core. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-13Move all board specific configuration to em28xx-cards.cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This cleanup moves the board-specific configurations to em28xx-cards.c. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-13Add USB ID for a newer variant of Hauppauge WinTV USB2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks to Jeroen Janssen <Jeroen.Janssen@vub.ac.be> CC: Jeroen Janssen <Jeroen.Janssen@vub.ac.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-06Request snd-usb-audio for devices with Audio Class supportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Before this patch, only Vendor Class audio support were loaded. This means that older em28xx devices won't have digital audio support loaded. This patch changes the logic to auto load eighter snd-usb-audio, for devices with USB Audio Class or em28xx-alsa, for devices with USB Vendor Class. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-06Avoid causing regressions for non-HVR950 boardsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Only HVR950 has analog_gpio configured. It makes no sense to set gpio to 0 for other boards. Better to add a test, while this var is not set for all xc3028 devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Add Radio support for em28xxMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Properly implement 12MHz I2S supportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Add code for autoloading em28xx-alsa, if neededMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Older em28xx devices does implement standard Audio Class. However, on newer devices, this were replaced by a Vendor Class. This patch autodetects that an em28xx lacks Audio Class and auto-loads em28xx-alsa, for the devices that implements only a Vendor Class. For devices with Audio Class, snd-usb-audio module will provide an ALSA interface. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Integrates em28xx-audio.c into em28xx kernel moduleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Also fixes the remaining CodingStyle issues that Lindent didn't fix. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Lindent em28xx-audio.cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Adds em28xx-audio moduleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> em28xx-audio module exports em28xx Vendor Class audio as an -alsa driver. This module were written based on usbaudio driver by Markus Rechberger. Recently, he acked to allow us to merge it on kernel: http://lists-archives.org/video4linux/20408-supporting-prolink-pixelview-405-dvd-maker.html Thanks to Markus Rechberger <mrechberger@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05HVR950 requires additional settings for audio to properly workMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Thanks to Markus Rechberger <mrechberger@gmail.com> for retriving those commands. Also, MTS firmware is required for audio to work on HVR950. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-05Improve audio setup handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> It is possible to select audio inputs via em28xx or via ac97 functions. This patch allows configuring a board to use either one way. It also do some cleanups at audio setup configurations. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-17V4L/DVB (em28xx): Add support for Pinnacle Dazzle DVC 100Mauro Carvalho Chehab
From: Aurelien Jarno <aurelien@aurel32.net> The patch below adds the "Pinnacle Dazzle DVC 100" to the list of cards supported by the em28xx driver. As the configuration is the same as the DVC 90 one, it simply adds a new USB ID to the list of devices supported by the DVC 90 configuration. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-23Fix CodingStyleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> thanks to checkpatch.pl Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-22Convert MTS to bitfieldMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Xc2028.3028 has two type of firmwares: audio-standard specific ones and baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares. It seems that the option to use MTS or a standard-specific audio decoding depends on the way xc2028/3028 is connected. Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS firmware, this patch converts it to a bitfield that can be shared with other proprieties of xc2028/3028. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-20Use MTS firmware for the HVR-900Mauro Carvalho Chehab
From: Aidan Thornton <makosoft@googlemail.com> The HVR-900 requires the MTS version of the xc3028 firmware in order to get any sound. The below patch selects this firmware variant on HVR-900 cards, as well as splitting the HVR-950 into its own entry (since I don't know if it uses the MTS variant and it will have to be split off eventually anyway). Signed-off-by: Aidan Thornton <makosoft@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-11Cleanup at tv norm selectionMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> With the conversion to the vidio_ioctl2, tvnorms array is not required anymore. Also, removed some code from V4L1 time (VIDEO_MODE_foo), specied at the non-used video_decoder.h. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-11Remove some dead code and make drive fully V4L2 compatibleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> There were some vestiges of an old V4L1 I2C driver that were called by em28xx. This patch removes this dead code, and replaces videodev.h to videodev2.h Now, this driver doesn't require V4L1 anymore. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-11Convert em28xx to video_ioctl2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Uses the newer ioctl handler at videodev. This patch also cleans up some bad logic at the driver and do CodingStyle and other cleanups at the resulting driver. Also, since VIDIOCMBUF were not working, the V4L1 compat code were removed. The compat code will eventually be re-inserted, if we find a clean way for implementing compatibility with the old API. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-11Fix read() methodMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport read() fixes from Markus Reichberger. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-11Fix em28xx read stream lockingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> On some situations, closing an streaming application and re-opening were returning -EBUSY. Uses the same locking schema also present on cx88. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-10Fix em28xx to allow multiple openMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Allows shared access support for em28xx. Just one userspace application is allowed to get stream. The other(s) application(s) can change V4L2 controls, set video standards, etc. This patch were splited from Markus Rechberger's tree and backported to 2.6.17 by Pádraig Brady. The original patch were ported to the latest em28xx version and had CodingStyle corrected to solve the issues pointed by scripts/checkpatch.pl. Thanks to Pádraig Brady <P@draigBrady.com> for pointing this. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-10Fix: avoids negative vma usage countMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-06Fix compilation for em28xxMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> In file included from drivers/media/video/em28xx/em28xx-i2c.c:31: drivers/media/video/tuner-xc2028.h:10:26: error: dvb_frontend.h: No such file or directory In file included from drivers/media/video/em28xx/em28xx-i2c.c:31: drivers/media/video/tuner-xc2028.h:32: warning: 'struct dvb_frontend' declared inside parameter list drivers/media/video/tuner-xc2028.h:32: warning: its scope is only this definition or declaration, which is probably not what you want kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-05Make HVR900 to use also tveepromMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Hauppauge firmwares can be decoded using tveeprom. This patch adds HVR-900 as a tveeprom client. It also adds xc3028 tuner entry to tveeprom. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-05Fix a bug when setting tuner typeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Tuner-type were correctly filled only by the hint function. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04Add comments for the hint methodsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04em28xx: autodetect Cinergy 200 USB and VGear PocketTVMauro Carvalho Chehab
From: Sascha Sommer <saschasommer@freenet.de> Adds autodetection support for the Cinergy200 USB and the VGear PocketTV. Whenever a usb device with generic empia em2800 usb ids is detected the device gets scanned for connected i2c devices. If the device list matches an em2800 device in the device list the model id gets changed accordingly. Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-03 em28xx: fix failing autodetection after the rebootMauro Carvalho Chehab
From: Sascha Sommer <saschasommer@freenet.de> the attached patch is required so that the autodetecion code also works after a reboot. Setting the I2C speed does not seem to be supported for em2800. Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-03 em28xx: add support for vgear pockettvMauro Carvalho Chehab
From: Sascha Sommer <saschasommer@freenet.de> attached patch adds support for the vgear pockettv. It seems to require a write to another register for audio to work. I checked my old cinergydrv and we did the same register write there. I therefore enabled it for all em2800 based devices. Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-03em28xx: fix locking to allow accesses from 2 different threads at the same timeMauro Carvalho Chehab
From: Sascha Sommer <saschasommer@freenet.de> The attached patch modifies the em28xx driver so that there can be ioctls from multiple different threads. This is necessary for capture apps like MPlayer that use different threads for capturing and channel tuning. Now the locking is only done for the ioctls that change properties of the device or access the i2c bus. It also removes some locks that look unnecessary: In em28xx_init_dev: the videodevice is not registered yet so nothing can access the hardware meanwhile, the device struct is not assigned to the interface yet so no race with disconnect is possible In em28xx_release_resources: it gets only called when dev->lock is already held Signed-off-by: Sascha Sommer <saschasommer@freenet.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>