summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
AgeCommit message (Collapse)Author
2009-01-03Use negated usb_endpoint_xfer_control, etcMauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> This patch extends 134179823b3ca9c8b98e0631906459dbb022ff9b by using usb_endpoint_xfer_control, usb_endpoint_xfer_isoc, usb_endpoint_xfer_bulk, and usb_endpoint_xfer_int in the negated case as well. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_CONTROL\|0\)) + !usb_endpoint_xfer_control(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_ISOC\|1\)) + !usb_endpoint_xfer_isoc(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_BULK\|2\)) + !usb_endpoint_xfer_bulk(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_type(epd) != \(USB_ENDPOINT_XFER_INT\|3\)) + !usb_endpoint_xfer_int(epd) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-05From: Mauro Carvalho Chehab <mchehab@redhat.com>Mauro Carvalho Chehab
/home/v4l/master/v4l/em28xx-core.c:396:25: warning: symbol 'outputs' was not declared. Should it be static? /home/v4l/master/v4l/em28xx-input.c:324:6: warning: symbol 'em28xx_ir_start' was not declared. Should it be static? /home/v4l/master/v4l/em28xx-cards.c:1925:5: warning: symbol 'em28xx_init_dev' was not declared. Should it be static? Priority: normal 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-31em28xx: update chip id for em2710Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30use USB API functions rather than constantsMauro Carvalho Chehab
From: Julia Lawall <julia@diku.dk> This set of patches introduces calls to the following set of functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_is_isoc_in(epd) usb_endpoint_is_isoc_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) In some cases, introducing one of these functions is not possible, and it just replaces an explicit integer value by one of the following constants: USB_ENDPOINT_XFER_BULK USB_ENDPOINT_XFER_CONTROL USB_ENDPOINT_XFER_INT USB_ENDPOINT_XFER_ISOC An extract of the semantic patch that makes these changes is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r1@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_CONTROL\|0\)) + usb_endpoint_xfer_control(epd) @r5@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30v4l2: debugging API changed to match against driver name instead of ID.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Since the i2c driver ID will be removed in the near future we have to modify the v4l2 debugging API to use the driver name instead of driver ID. Note that this API is not used in applications other than v4l2-dbg.cpp as it is for debugging and testing only. Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged with a warning that it is deprecated and will be removed in 2.6.30. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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: Don't do AC97 vendor detection for i2s audio devicesDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> The current code was trying to query the AC97 registers for the vendor information even if it was clearly not a AC97 audio device (resulting in errors in the dmesg output). This was due to a bug in the way we did the check. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-29em28xx: expand output formats availableDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Add additional output formats, which will be useful for the Pinnacle PCTV Ultimate 880e integration with the saa7136. Thanks to Ray Lu from Empia for providing the em2860/em2880 datasheet. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-29em28xx: fix reversed definitions of I2S audio modesDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Noticed when doing the audio support for the Pinnacle PCTV HD Ultimate 808e that the modes were incorrect (the 808e uses I2S in 5 sample mode) Thanks for Ray Lu from Empia for providing the em2860/em2880 datasheet. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
2008-12-29em28xx: don't load em28xx-alsa for em2870 based devicesDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Like the em2874, the em2870 does not have any analog support, so don't bother loading the em28xx-alsa module. Priority: normal Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
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-29em28xx: fix corrupted XCLK valueDevin Heitmueller
From: Devin Heitmueller <dheitmueller@linuxtv.org> Correct problem introduced during the board refactoring where the XCLK frequency would get zero'd out. The sequence of events was as follows: em28xx_pre_card_setup() called em28xx_set_model() em28xx_set_model() would memcpy to dev->board configuration em28xx_pre_card_setup() would set the dev->board.xclk if not set em28xx_pre_card_setup() would set the XCLK register based on dev->board.xclk ... em28xx_card_setup() would call em28xx_set_model() em28xx_set_model() would memcpy to dev->board configuration (clearing out value of dev->board.xclk set in em28xx_pre_card_setup) ... em28xx_audio_analog_set() sets the XCLK register based on dev->board.xclk (which now contains zero) The change sets the default XCLK and I2C Clock fields in the board definition inside of em28xx_set_model() so that subsequent calls do not cause the values to be overwritten. Priority: high 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 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>