summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (7291): em28xx: correct use of and fixAndrew Morton2008-03-201-1/+1
| | | | | | | 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>
* V4L/DVB (7285): em28xx: Correct use of ! and &Julia Lawall2008-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma ↵Mauro Carvalho Chehab2008-02-181-1/+1
| | | | | | | | is set Thanks to Alan Stern <stern@rowland.harvard.edu> for pointing this issue. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7179): Allow more than one em28xx boardMauro Carvalho Chehab2008-02-183-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (7164): em28xx-alsa: Add a missing mutexMauro Carvalho Chehab2008-02-182-1/+5
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7163): em28xx: makes audio settings more stableMauro Carvalho Chehab2008-02-182-10/+21
| | | | | | | | | 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>
* V4L/DVB (7162): em28xx: Fix endian and returns the correct valuesMauro Carvalho Chehab2008-02-181-4/+4
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7161): em28xx: Fix printing debug values higher than 127Mauro Carvalho Chehab2008-02-181-2/+3
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7160): em28xx: Allow register dump/setting for debugMauro Carvalho Chehab2008-02-181-0/+66
| | | | | | | Adds vidioc_[g|s]_register handlers. This allows getting/setting register from em28xx. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7158): Fix em28xx audio initializationMauro Carvalho Chehab2008-02-182-11/+6
| | | | | | | 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>
* V4L/DVB (7156): em28xx/em28xx-core.c: fix use of potentially uninitialized ↵Andrew Morton2008-02-181-1/+2
| | | | | | | | | | | | variable 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>
* V4L/DVB (7132): Add USB ID for a newer variant of Hauppauge WinTV-HVR 900Luc Saillard2008-02-181-0/+2
| | | | | | | | | 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>
* V4L/DVB (7106): em28xx/: make 2 functions staticAdrian Bunk2008-02-183-7/+5
| | | | | | | | | 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>
* V4L/DVB (7049): Remove sound/driver.hMauro Carvalho Chehab2008-02-181-1/+0
| | | | | | sound/driver.h is already included by sound/core. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* drivers/media/video/em28xx/: Fix undefined symbol error with CONFIG_SND=NS.Çağlar Onur2008-02-091-1/+2
| | | | | | | | | | | | | | | | Without this you get undefined symbol errors with CONFIG_SND=N: ERROR: "snd_pcm_period_elapsed" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_hw_constraint_integer" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_set_ops" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_lib_ioctl" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_card_new" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_card_free" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_card_register" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! ERROR: "snd_pcm_new" [drivers/media/video/em28xx/em28xx-alsa.ko] undefined! Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* V4L/DVB (7060): em28xx: remove has_tunerMauro Carvalho Chehab2008-01-253-26/+10
| | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (7021): Move all board specific configuration to em28xx-cards.cMauro Carvalho Chehab2008-01-253-97/+106
| | | | | | This cleanup moves the board-specific configurations to em28xx-cards.c. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7020): Add USB ID for a newer variant of Hauppauge WinTV USB2Mauro Carvalho Chehab2008-01-251-0/+2
| | | | | | Thanks to Jeroen Janssen <Jeroen.Janssen@vub.ac.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6970): Request snd-usb-audio for devices with Audio Class supportMauro Carvalho Chehab2008-01-251-1/+3
| | | | | | | | | | 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>
* V4L/DVB (6969): Avoid causing regressions for non-HVR950 boardsMauro Carvalho Chehab2008-01-251-15/+19
| | | | | | | | 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>
* V4L/DVB (6956): Add Radio support for em28xxMauro Carvalho Chehab2008-01-252-60/+238
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6955): Properly implement 12MHz I2S supportMauro Carvalho Chehab2008-01-254-17/+24
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6952): Add code for autoloading em28xx-alsa, if neededMauro Carvalho Chehab2008-01-253-1/+41
| | | | | | | | | | | | | | | | 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. This patch uses the request_module_async function as defined on cx88-mpeg.c, originally wrote by Markus Rechberger. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6951): Integrates em28xx-audio.c into em28xx kernel moduleMauro Carvalho Chehab2008-01-255-260/+365
| | | | | | Also fixes the remaining CodingStyle issues that Lindent didn't fix. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6950): Lindent em28xx-audio.cMauro Carvalho Chehab2008-01-251-176/+197
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6949): Adds em28xx-audio moduleMarkus Rechberger2008-01-251-0/+474
| | | | | | | | | | | | 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>
* V4L/DVB (6948): HVR950 requires additional settings for audio to properly workMauro Carvalho Chehab2008-01-252-10/+48
| | | | | | | | | 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>
* V4L/DVB (6947): Improve audio setup handlingMauro Carvalho Chehab2008-01-253-42/+95
| | | | | | | | | 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>
* V4L/DVB (em28xx): Add support for Pinnacle Dazzle DVC 100Aurelien Jarno2008-01-251-1/+3
| | | | | | | | | | 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>
* V4L/DVB (6665): Fix CodingStyleMauro Carvalho Chehab2008-01-251-90/+113
| | | | | | thanks to checkpatch.pl Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6659): Convert MTS to bitfieldMauro Carvalho Chehab2008-01-252-3/+3
| | | | | | | | | | | | | | | 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>
* V4L/DVB (6619): Use MTS firmware for the HVR-900Aidan Thornton2008-01-252-2/+29
| | | | | | | | | | | 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>
* V4L/DVB (6587): Cleanup at tv norm selectionMauro Carvalho Chehab2008-01-254-86/+18
| | | | | | | | | 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>
* V4L/DVB (6586): Remove some dead code and make drive fully V4L2 compatibleMauro Carvalho Chehab2008-01-253-13/+2
| | | | | | | | | 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>
* V4L/DVB (6585): Convert em28xx to video_ioctl2Mauro Carvalho Chehab2008-01-251-924/+1011
| | | | | | | | | | | | 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>
* V4L/DVB (6584): Fix read() methodMauro Carvalho Chehab2008-01-252-8/+24
| | | | | | Backport read() fixes from Markus Rechberger. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6583): Fix em28xx read stream lockingMauro Carvalho Chehab2008-01-252-23/+59
| | | | | | | | | 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>
* V4L/DVB (6582): Fix em28xx to allow multiple openMauro Carvalho Chehab2008-01-252-51/+79
| | | | | | | | | | | | | | | | 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>
* V4L/DVB (6562): Make HVR900 to use also tveepromMauro Carvalho Chehab2008-01-251-1/+7
| | | | | | | 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>
* V4L/DVB (6560): Fix a bug when setting tuner typeMauro Carvalho Chehab2008-01-251-8/+21
| | | | | | Tuner-type were correctly filled only by the hint function. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB(6548b) Fix compilation for em28xxMauro Carvalho Chehab2008-01-251-0/+3
| | | | | | | | | | | | | 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 Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6546): Add comments for the hint methodsMauro Carvalho Chehab2008-01-251-5/+24
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6545): em28xx: autodetect Cinergy 200 USB and VGear PocketTVSascha Sommer2008-01-254-6/+46
| | | | | | | | | | | 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>
* V4L/DVB (6539): em28xx: add support for vgear pockettvSascha Sommer2008-01-252-0/+35
| | | | | | | | | | 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>
* V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different ↵Sascha Sommer2008-01-252-73/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | threads at the same time 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>
* V4L/DVB (6537): Add entry for Pixelview Prolink PlayTV USB 2.0Mauro Carvalho Chehab2008-01-252-1/+23
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6536): Add a hint for boards without unique USB IDMauro Carvalho Chehab2008-01-254-165/+229
| | | | | | | | | This patch adds a function to allow trying to detect boards that shares the generic IDs. The current detection method is based at eeprom checksum. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6535): Fix: Adds the generic PCI IDs for em28xxMauro Carvalho Chehab2008-01-252-25/+14
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6519): Fix HVR900/HVR950 entryMauro Carvalho Chehab2008-01-251-5/+5
| | | | | | | - Television is now default; - Add HVR950 name at the entry. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6516): Allow faster loading by using 64 bytes block by em28xx i2c writeMauro Carvalho Chehab2008-01-251-1/+2
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
OpenPOWER on IntegriCloud