summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
Commit message (Collapse)AuthorAgeFilesLines
* [media] em28xx: implement VIDIOC_ENUM_FRAMESIZESMauro Carvalho Chehab2011-10-191-1/+40
| | | | | | | | | | | | | | Pidgin uses gstreamer (and libv4l) to work. Without implementing this ioctl, it won't detect properly the size range, and driver will fail. So, this patch is required, in order to use an em27xx webcam, like Silvercrest. The pigdin/gstreamer/libv4l needs to be fixed, as it shouldn't assume that all drivers will implement this optional ioctl, but, at least now, devices with em28xx have a better chance of working with pidgin. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Add VIDIOC_QUERYSTD supportMauro Carvalho Chehab2011-10-081-0/+16
| | | | | | Allow subdevs to return the detected standards Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: replug locking cleanupChris Rankin2011-09-251-4/+7
| | | | | | | | | | | | | | | | Simplifies the locking by moving the em28xx_init_extension() call until em28xx_usb_probe() has finished with the dev->lock mutex. It therefore makes the second and subsequent "plugging" events logically identical to the first "plugging" event when the em28xx-dvb and em28xx-alsa modules must be loaded (i.e. registered). Basically, em28xx_usb_probe() requests that em28xx-dvb be loaded and also triggers udev to initialise the V4L2 devices. These two events are serialised by the dev->lock mutex but the order that they happen in is undefined. But this has always been the case anyway. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: remove unused prototypesChris Rankin2011-09-251-2/+0
| | | | | | | | This patch just removes the prototypes for the two functions that I've already deleted in my previous patches. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: fix deadlock when unplugging and replugging a DVB adapterChris Rankin2011-09-251-2/+4
| | | | | | | | | | | This fixes the deadlock that occurs with either multiple PCTV 290e adapters or when a single PCTV 290e adapter is replugged. For DVB devices, the device lock must now *not* be held when adding/removing either a device or an extension to the respective lists. (Because em28xx_init_dvb() will want to take the lock instead). Conversely, for Audio-Only devices, the device lock *must* be held when adding/removing either a device or an extension to the respective lists. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: fix race on disconnectChris Rankin2011-09-242-23/+8
| | | | | | | | | | | | | | | | | | | This patch closes the race on the device and extension lists at USB disconnect time. Previously, the device was removed from the device list during em28xx_release_resources(), and then passed to the em28xx_close_extension() function so that all extensions could run their fini() operations. However, this left a (brief, theoretical, highly unlikely ;-)) window between these two calls during which a new module could call em28xx_register_extension(). The result would have been that the em28xx_usb_disconnect() function would also have passed the device to the new extension's fini() function, despite never having called the extension's init() function. This patch also restores em28xx_close_extension()'s symmetry with em28xx_init_extension(), and establishes the property that every device in the device list must have been initialised for every extension in the extension list. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Fix em28xx_devused cleanup logic on errorChris Rankin2011-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | On 04/09/11 00:49, Mauro Carvalho Chehab wrote: > This is an automatic generated email to let you know that the following patch were queued at the > http://git.linuxtv.org/media_tree.git tree: > > Subject: [media] em28xx: use atomic bit operations for devices-in-use mask > Author: Chris Rankin<rankincj@yahoo.com> > Date: Sat Aug 20 08:21:03 2011 -0300 > > Use atomic bit operations for the em28xx_devused mask, to prevent an > unlikely race condition should two adapters be plugged in > simultaneously. The operations also clearer than explicit bit > manipulation anyway. > > Signed-off-by: Chris Rankin<rankincj@yahoo.com> > Signed-off-by: Mauro Carvalho Chehab<mchehab@redhat.com> > > drivers/media/video/em28xx/em28xx-cards.c | 33 ++++++++++++++--------------- I think you missed this line in the merge. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: ERROR: "em28xx_add_into_devlist" ↵Chris Rankin2011-09-211-1/+0
| | | | | | | | [drivers/media/video/em28xx/em28xx.ko] undefined! Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: add support for PCTV DVB-S2 Stick 460e [2013:024f]Antti Palosaari2011-09-214-0/+60
| | | | | | | | | | It is based of... * Empia EM28174 * NXP TDA10071 & Conexant CX24118A combo * Allegro A8293 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] EM28xx - Fix memory leak on disconnect or errorChris Rankin2011-09-182-0/+2
| | | | | | | Release the dev->alt_max_pkt_size buffer in all cases. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: don't sleep on disconnectChris Rankin2011-09-031-2/+20
| | | | | | | | | | | | | The DVB framework will try to power-down an adapter that no-one is using any more, but this assumes that the adapter is still connected to the machine. That's not always true for a USB adapter, so disable the sleep operations when the adapter has been physically unplugged. This prevents I2C write failures with error -19 from appearing occasionally in the dmesg log. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: move printk lines outside mutex lockChris Rankin2011-09-031-2/+2
| | | | | | | | There's no reason to still be holding the device list mutex for either of these printk statements. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: clean up resources should init failChris Rankin2011-09-032-45/+37
| | | | | | | | | | This patch ensures that the em28xx_init_dev() function cleans up after itself, in the event that it fails. This isimportant because the struct em28xx will be deallocated if em28xx_init_dev() returns an error. [mchehab@redhat.com: Fix merge conflicts and simplify the goto labels] Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: use atomic bit operations for devices-in-use maskChris Rankin2011-09-031-17/+16
| | | | | | | | | | Use atomic bit operations for the em28xx_devused mask, to prevent an unlikely race condition should two adapters be plugged in simultaneously. The operations also clearer than explicit bit manipulation anyway. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: pass correct buffer size to snprintfChris Rankin2011-09-031-1/+1
| | | | | | | snprintf()'s size parameter includes space for the terminating '\0' character. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: do not use EXTRA_CFLAGSArnaud Lacombe2011-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Usage of these flags has been deprecated for nearly 4 years by: commit f77bf01425b11947eeb3b5b54685212c302741b8 Author: Sam Ravnborg <sam@neptun.(none)> Date: Mon Oct 15 22:25:06 2007 +0200 kbuild: introduce ccflags-y, asflags-y and ldflags-y Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command line use. By default, gmake(1) do not override command line setting, so this is likely to result in build failure or unexpected behavior. Replace their usage by Kbuild's `{as,cc,ld}flags-y'. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: linux-media@vger.kernel.org Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] CXD2820R: Replace i2c message translation with repeater gate controlSteve Kerrison2011-09-031-4/+3
| | | | | | | | | | | | | | | | | | | | This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert Schlabbach for identifying the register address and field to set. The old i2c intercept code that prefixed messages with a passthrough byte has been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been updated appropriately. Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities could test it as well - from inspection I cannot see any problems. This is patch v2. It fixes some schoolboy style errors and removes superfluous i2c entries in cxd2820r.h. Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Acked-by: Antti Palosaari <crope@iki.fi> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: add em28xx_ prefix to functionsJarod Wilson2011-09-031-30/+28
| | | | | | | | | | Makes it more straight-forward to follow stack traces if the functions don't have generic names. Using this as a crutch while trying to better understand the lockdep warnings I get when loading the em28xx driver. CC: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: use MFE lock for PCTV nanoStick T2 290eAntti Palosaari2011-08-271-1/+6
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Fix IR unregister logicMauro Carvalho Chehab2011-07-311-3/+3
| | | | | | | | The input stop() callback already calls the em28xx_ir_stop method. Calling it again causes an oops. Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Fix DVB-C maxsize for em2884Mauro Carvalho Chehab2011-07-282-12/+34
| | | | | | | | | | | | | | The logic at em28xx_isoc_dvb_max_packetsize() sucks, at least for newer the needed packet size. Yet, it is better than nothing. Rewrite the code in order to change the default to 752 for em2884 and newer chips and provide a better way to handle per-chipset specifics. For em2874, the current default should be enough, as the only em2874 board is currently a 1-seg ISDB-T board, so, it needs only a limited amount of bandwidth. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Remove the double symbol increment hack from drxk_hardMauro Carvalho Chehab2011-07-271-8/+14
| | | | | | | | | | | | | | Both ngene and ddbrige calls dvb_attach once for drxk_attach. The logic used there, and by tda18271c2dd driver is different from similar logic on other frontends. The right fix is to change them to use the same logic, but, while we don't do that, we need to patch em28xx-dvb in order to do cope with ngene/ddbridge magic. While here, document why drxk_t_release should do nothing. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Add other Terratec H5 USB ID'sMauro Carvalho Chehab2011-07-271-3/+3
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Change firmware name for Terratec H5 DRX-KMauro Carvalho Chehab2011-07-271-1/+1
| | | | | | | | Use a name convention for the firmware file that matches on the current firmware namespacing. Also, add it to the firmware download script. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drxk: Allow to disable I2C Bridge control switchMauro Carvalho Chehab2011-07-271-0/+1
| | | | | | | On em28xx, tda18271C2 is accessible when the i2c port is not touched. Touching on it breaks the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-i2c: Add a read after I2C writeMauro Carvalho Chehab2011-07-271-1/+10
| | | | | | | | All I2C logs we got for em28xx does that. With Terratec H5, at 400MHz speed, it seems that this is required, to avoid having troubles at the I2C bus. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drxk: Add a parameter for the microcode nameMauro Carvalho Chehab2011-07-271-2/+2
| | | | | | | | The microcode firmware provided on Terratec H5 seems to be different. Add a parameter to allow specifying a different firmware per-device. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Add initial support for Terratec H5Mauro Carvalho Chehab2011-07-277-6/+160
| | | | | | | Not working yet. There are some fixes at the DRX-K that are needed for it to work. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Stop using linux/version.h on most video driversMauro Carvalho Chehab2011-07-271-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the modified drivers didn't have any version increment since Jan, 1 2011. Several of them didn't have any version increment for a long time, even having new features and important bug fixes happening. As we're now filling the QUERYCAP version with the current Kernel Release, we don't need to maintain a per-driver version control anymore. So, let's just use the default. In order to preserve the Kernel module version history, a KERNEL_VERSION() macro were added to all modified drivers, and the extraver number were incremented. I opted to preserve the per-driver version control to a few pwc, pvrusb2, s2255, s5p-fimc and sh_vou. A few drivers are still using the legacy way to handle ioctl's. So, we can't do such change on them, otherwise, they'll break. Those are: uvc, et61x251 and sn9c102. The rationale is that the per-driver version control seems to be actively maintained on those. Yet, I think that the better for them would be to just use the default version numbering, instead of doing that by themselves. While here, removed a few uneeded include linux/version.h Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Mark Kworld 305 as validatedMauro Carvalho Chehab2011-07-271-1/+0
| | | | | | | This board were used for testing the em28xx-alsa using a separate interface. So, it is obviously validated ;) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Add support for devices with a separate audio interfaceMauro Carvalho Chehab2011-07-274-60/+109
| | | | | | Some devices use a separate interface for the vendor audio class. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-audio: Some Alsa API fixesMauro Carvalho Chehab2011-07-271-1/+6
| | | | | | | | | | | | Mark the alsa stream with SNDRV_PCM_INFO_BATCH, as the timing to get audio streams can vary. Also, add SNDRV_PCM_TRIGGER for pause/release. while here, fix the stop indicator, to be sure that audio will be properly released at the stop events. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-audio: Properly report failures to start streamMauro Carvalho Chehab2011-07-271-0/+3
| | | | | | | | If the audio stream fails for any reason, it should: 1) Report an error via dmesg; 2) Mark internally that the stream didn't started. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-audio: add debug info for the volume controlMauro Carvalho Chehab2011-07-271-0/+28
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-audio: volumes are invertedMauro Carvalho Chehab2011-07-271-8/+8
| | | | | | While here, fix volume mask to 5 bits Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-audio: add support for mute controlsMauro Carvalho Chehab2011-07-271-14/+73
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx-alsa: add mixer support for AC97 volume controlsMauro Carvalho Chehab2011-07-272-0/+105
| | | | | | | | | | | | Export ac97 volume controls via mixer. Pulseaudio will probably handle it very badly, as it has no idea about how volumes are wired, and how are they associated with each TV input. Those wirings are card model dependent, and we don't have the wiring mappings for each supported device. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Allow to compile it without RC/input supportMauro Carvalho Chehab2011-07-273-3/+30
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Fix a wrong enum at the ac97 control tablesMauro Carvalho Chehab2011-07-271-3/+8
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Don't initialize a var if won't be using itMauro Carvalho Chehab2011-07-274-10/+8
| | | | | | | | | Fixes most cases of initializing a var but not using it. There are still 3 cases at em28xx-alsa, were those vars should probably be used. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: use the proper prefix for board namesMauro Carvalho Chehab2011-07-273-4/+4
| | | | | | | | | All boards use EM28xxx_BOARD, to identify that the macro refers to a card entry. So: EM2874_LEADERSHIP_ISDBT -> EM2874_BOARD_LEADERSHIP_ISDBT Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: correct PCTV nanoStick T2 290e device nameAntti Palosaari2011-07-271-3/+3
| | | | | | | PCTV Systems nanoStick T2 290e => PCTV nanoStick T2 290e Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: add remote for PCTV nanoStick T2 290eAntti Palosaari2011-07-271-1/+1
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: EM28174 remote supportAntti Palosaari2011-07-271-0/+1
| | | | | | | | For some reason it repeats rather slowly, around 800ms intervals, two RC5 remotes tested. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Disable audio for EM28174Steve Kerrison2011-05-201-1/+2
| | | | | | Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Add support for PCTV nanoStick T2 290e [2013:024f]Antti Palosaari2011-05-204-0/+74
| | | | | | | | Supports DVB-T/T2/C, USB ID: 2013:024f. Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: add support for EM28174 chipAntti Palosaari2011-05-204-2/+12
| | | | | | | | EM28174 is very similar as already supported EM2874. I am not sure what are differences, but it could be analog support. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: Multi Frontend (MFE) supportAntti Palosaari2011-05-201-35/+56
| | | | | | | | | Register multiple FEs for same adapter. After that it is possible to register two FEs for same adapter. For example one for DVB-T and one for DVB-C. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: add remote control support for PCTV 330eDevin Heitmueller2011-05-201-0/+1
| | | | | | | Add support for the PCTV 330e remote control Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: remove "not validated" flag for PCTV 330eDevin Heitmueller2011-05-201-1/+0
| | | | | | | | Remove the flag indicating the 330e board is not validated, based on the half dozen users who have reported today that everything is working. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud