aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB (9728): cx18: Copyright attribution update for files modified by awallsAndy Walls2008-12-3025-0/+25
| | | | | | | Add copyright attribution for files modified by awalls in 2008 Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9727): cx18: Adjust outgoing mailbox timeouts and remove statistics ↵Andy Walls2008-12-306-54/+8
| | | | | | | | | | | | | logging cx18: Adjust outgoing mailbox timeouts and remove statistics logging. This saves some wasted storage in struct cx18 for each card. Cutting the outgoing mailbox timeouts in half from the previous value appears to be safe with MythTV. Got rid of interrupted case code path after a wait uninterruptable returns. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9726): cx18: Restore buffers that have fallen out of the transfer ↵Andy Walls2008-12-303-27/+92
| | | | | | | | | | rotation Restore buffers that have fallen out of the transfer rotation, and check for coherent mailbox data when processing a stale mailbox. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9725): cx18: Remove unnecessary MMIO accesses in time critical irq ↵Andy Walls2008-12-304-22/+22
| | | | | | | | | | | handling path Remove unnecessary MMIO accesses in time critical irq handling path. Also ensured that the mailbox ack field is read in last, so we know for sure if we have a stale mailbox or not on receipt. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9724): cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry ↵Andy Walls2008-12-309-449/+71
| | | | | | | | | | | | | strategy cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry strategy so that write retries always occur and read retries never occur (as they never help). Remove MMIO statistics logging to speed up MMIO accesses. Deprecate & ignore retry_mmio and mmio_ndelay module parameters, to essentially force retry_mmio=1 and mmio_ndelay=0. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9723): cx18: Propagate staleness of mailbox and mdl ack data to ↵Andy Walls2008-12-302-14/+27
| | | | | | | | | | | | | work handler cx18: Propagate staleness of mailbox and mdl ack data to work handler to let the work handler know that the data from the encoder may not be coherent. Allows for smarter handling of buffers in future, to deal with MDLs that fall out of rotation due to irq handler being late in collecting mailbox and mdl ack info. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9722): cx18: Convert per stream queue spinlocks into mutexesAndy Walls2008-12-303-16/+11
| | | | | | | | | | Convert the per stream queue spinlocks into mutexes. All queue manipulation happens via the work queue or system calls into the driver, and not in an interrupt context. This reduces the amout of time the cx18 driver keeps interrupts disabled. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9721): cx18: Change to singlethreaded global work queue thread for ↵Andy Walls2008-12-303-2/+26
| | | | | | | | | | | | deferable work Change to singlethreaded global work queue thread for deferable work, instead of the kernel default multithreaded work queue. This ensures execution of deferable work is always in the proper order, so caputred buffers don't get reordered. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9720): cx18: Major rewrite of interrupt handling for incoming ↵Andy Walls2008-12-3016-215/+408
| | | | | | | | | | | | | | | | | | mailbox processing A major rewrite of interrupt handling for incoming mailbox processing, to split the timing critical steps from the the deferrable steps as the sending XPU on the CX23418 will time out and overwrite our incoming mailboxes rather quickly. Setup a pool of work "order forms" for the irq handler to send jobs to the new work handler routine which uses the kernel default work queue to do the deferrable work. Started optimizing some of the cx18-io calls as they are now the low hanging fruit for recoving microseconds back from the timeline. Future optimizations will get rid of mmio read retries, mmio stats logging, and combine smaller functions in the irq path into the larger ones to save ~2 us each. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9710): gspca: Remove some unuseful core in main.Jean-Francois Moine2008-12-301-5/+4
| | | | | Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9707): gspca: Remove the event counter and simplify the frame wait.Hans de Goede2008-12-302-29/+12
| | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9655): radio-mr800: fix unplugAlexey Klimov2008-12-301-8/+54
| | | | | | | | | | This patch fixes problems(kernel oopses) with unplug of device while it's working. Patch adds disconnect_lock mutex, changes usb_amradio_close and usb_amradio_disconnect functions and adds a lot of safety checks. Signed-off-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9599): cx18: Fix unitialized variable problem upon APU firmware ↵Andy Walls2008-12-301-3/+6
| | | | | | | | | | | file read failure If APU firmware file read failed, the jump vector to the APU was undefined and the APU would be started executing garbage. Fix uninitialized variable to be an infinite loop for the APU, but also bail out before even starting the APU. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9598): cx18: Prevent CX23418 from clearing it's outgoing ack ↵Andy Walls2008-12-304-0/+20
| | | | | | | | | | | | | interrupts to driver When the CX23418 CPU unit sent out an ack interrupt to the linux driver, it also received that interrupt and cleared the flag before the linux driver could see what the interrupt was for. This fix prevents the CPU from receiving an IRQ for it's own outgoing ack's to the linux driver. This fix is critical now that the linux driver doesn't poll but relies on these ack interrupts. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9597): cx18: Minor fixes to APU firmware load processAndy Walls2008-12-301-7/+14
| | | | | | | | Use the APU fw start address from rom file instead of a hardcoded entry vector. Fixed cx18_setup_page() calls to use the correct APU image load addresses. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9596): cx18: Further changes to improve mailbox protocol integrity ↵Andy Walls2008-12-304-18/+42
| | | | | | | | | | | & performnce All waits for cx18 mailbox API commands are now uninterruptable. Added code to collect mailbox ack statistics. Tweaked timeouts based on collected stats and video vertical frame and field rates. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9595): cx18: Improve handling of outgoing mailboxes detected to be busyAndy Walls2008-12-302-69/+64
| | | | | | | | | | | | cx18: Improve handling of outgoing mailboxes detected to be busy. When encountering a busy mailbox, sleep instead of polling, and wait for interrupt or timeout. If the mailbox is still busy, force it free. When sending commands, make sure we never create a situation where we mark the mailbox busy upon sending, and ensure we always have a method to cleanly recover from a busy mailbox. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9594): cx18: Roll driver version number due to significant changesAndy Walls2008-12-301-1/+1
| | | | | | | | Driver interrupt and mailbox handling has change significantly. Time for a roll to v1.0.2. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9593): cx18: Add outgoing mailbox mutexes and check for ack via ↵Andy Walls2008-12-305-63/+60
| | | | | | | | | | | waitq vs poll Add mutexes to ensure exclusive access for outgoing driver to CX23418 mailboxes. Also wait on a waitq for mailbox acknowledgement from the CX23418 instead of polling. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9592): cx18: Use default kernel work queue; fix streaming flag for ↵Andy Walls2008-12-305-37/+26
| | | | | | | | | | | | work handler cx18: Use default kernel work queue; fix streaming flag for work handler. Eliminate cx18 specific work queue and use the kernel default work queue. Fixed the F_STREAMING_FLAG for the TS stream so cx18_dvb_work_handler() can know when it is not safe to send MDLs to the firmware. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9558): gspca: Add the light frequency control for the sensor ↵Jean-Francois Moine2008-12-301-124/+154
| | | | | | | HV7131B in zc3xx Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9513): cx18: Reduce number of mmio read retriesAndy Walls2008-12-304-21/+22
| | | | | | | | | | | | cx18: Reduce number of mmio read retries to improve performance. Experiments have shown 2 things: read retries never improve the result of a suspect mmio read from the CX23418 (the result stays all 0xff's), and that most of the suspected read failures are actually proper reads of values that should be all 0xff's. This change reduces the number of read retries and keeps the count separate from write retries. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9442): Revert back previous change to 90MHzManu Abraham2008-12-302-2/+2
| | | | | | | | | | | | | Note: * At High Symbol Rates we do not have enouph machine cycles to handle the incoming symbols and hence might run into problems at the very end of the specified definition * Most of the equations have been calculated for a master clock of 99 MHz, running at 90MHz, raises lot of issues such as the need to recalculate all of them , which is eventually very painful. Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9431): Bug ID #19: Diseqc works properly at 90MHz only on Cut 1.1 ↵Manu Abraham2008-12-301-1/+1
| | | | | | | and 2.0 Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9425): Initialize at 90MHz itselfManu Abraham2008-12-301-1/+1
| | | | | Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9767): em28xx: improve board description messagesMauro Carvalho Chehab2008-12-292-2/+16
| | | | | | Print manufacturer/product info from USB device and also card entry. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9766): em28xx: improve probe messagesMauro Carvalho Chehab2008-12-291-12/+30
| | | | | | | Prints usb speed used by em28xx interface. While there, fixes USB ID's endiannes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9765): em28xx: move tuner gpio's to the cards structMauro Carvalho Chehab2008-12-292-10/+28
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9764): em28xx: Add support for suspend the device when not usedMauro Carvalho Chehab2008-12-295-15/+21
| | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9763): em28xx: fix gpio settingsMauro Carvalho Chehab2008-12-292-5/+2
| | | | | | | A previous changeset moved gpio from em28xx struct into em28xx_board. However, the driver were not updated to properly honor those gpio's. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9762): em28xx: fix tuner absent entriesMauro Carvalho Chehab2008-12-291-4/+18
| | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9761): em28xx: replace magic numbers for mux aliasesMauro Carvalho Chehab2008-12-291-4/+4
| | | | | | Instead of using magic vmux/amux, let's use an alias where possible. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9760): em28xx: move gpio lines into board table descriptionMauro Carvalho Chehab2008-12-292-71/+67
| | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9759): em28xx: move gpio tables to the top of em28xx-cardsMauro Carvalho Chehab2008-12-291-69/+72
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9758): em28xx: replace some magic by register descriptions where knownMauro Carvalho Chehab2008-12-293-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 $_; } } Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9755): em28xx: cleanup: We need just one tuner callbackMauro Carvalho Chehab2008-12-292-23/+8
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9754): em28xx: improve debug messagesMauro Carvalho Chehab2008-12-293-23/+26
| | | | | | | Now, the first message states board names. Also, removed printing the alternate settings by default. I2C messages are now clearer. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9753): em28xx: cleanup: saa7115 module auto-detects saa711x typeMauro Carvalho Chehab2008-12-292-27/+26
| | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9752): Remove duplicated fields on em28xx_board and em28xx structsMauro Carvalho Chehab2008-12-297-62/+43
| | | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9751): em28xx: card description cleanupsMauro Carvalho Chehab2008-12-292-124/+59
| | | | | | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9747): em28xx: Properly handles XCLK and I2C speedMauro Carvalho Chehab2008-12-293-133/+39
| | | | | | | | | | | | | | | | | 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9745): em28xx: Cleanup GPIO/GPO setup codeDevin Heitmueller2008-12-291-18/+18
| | | | | | | | | 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>
* V4L/DVB (9744): em28xx: cleanup XCLK register usageDevin Heitmueller2008-12-292-15/+60
| | | | | | | | | | 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>
* V4L/DVB (9740): sms1xxx: add USB suspend and hibernation supportUri Shkolnik2008-12-291-0/+45
| | | | | | | | | This patch provides USB suspend and hibernation support for Siano's SMS chipset based USB device Signed-off-by: Uri Shkolnik <uris@siano-ms.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9739): sms1xxx: enable signal quality indicator LEDs on Hauppauge ↵Michael Krufky2008-12-295-2/+49
| | | | | | | WinTV MiniStick Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9738): sms1xxx: fix invalid unc readingsMichael Krufky2008-12-292-1/+16
| | | | | | | Add function smsdvb_read_ucblocks to report uncorrectable error counts. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9736): sms1xxx: enable power LED on Hauppauge WinTV MiniStickMichael Krufky2008-12-293-0/+41
| | | | | | | Enable power LED while the frontend is in use. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9735): sms1xxx: turn off LEDs after initialization of Hauppauge ↵Michael Krufky2008-12-293-0/+54
| | | | | | | WinTV MiniStick Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9733): sms1xxx: add autodetection support for Hauppauge WinTV MiniCardMichael Krufky2008-12-292-0/+16
| | | | | | | add USB IDs for Hauppauge WinTV MiniCard DVB-T Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (9734): sms1xxx: add functions to configure and set gpioMichael Krufky2008-12-292-0/+102
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>