1. 24 2月, 2009 7 次提交
    • S
      firedtv: cleanups and minor fixes · 8ae83cdf
      Stefan Richter 提交于
      Combination of the following changes:
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: increase FCP frame length for DVB-S2 tune QSPK
      
          The last three bytes didn't go out to the wire.
          Effect of the fix not yet tested.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: replace mdelay by msleep
      
          These functions can sleep (and in fact sleep for the duration of a whole
          FCP transaction).  Hence msleep is more appropriate here.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: trivial reorganization in avc_api
      
          Reduce nesting level by factoring code out of avc_tuner_dsd() into
          helper functions.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: trivial cleanups in avc_api
      
          Use dev_err(), no CamelCase function names, adjust comment style, put
          #if 0 around unused code and add FIXME comments, standardize on
          lower-case hexadecimal constants, use ALIGN() for some frame length
          calculations, make a local function static...
      
          The code which writes FCP command frames and reads FCP response frames
          is not yet brought into canonical kernel coding style because this
          involves changes of typedefs (on-the-wire bitfields).
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: don't retry oPCR updates endlessly
      
          In the theoretical case that the target node wasn't handling the lock
          transactions as expected or there was continued interference by other
          initiating nodes, these functions wouldn't return for ages.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: remove bitfield typedefs from cmp, fix for big endian CPUs
      
          Use macros/ inline functions/ standard byte order accessors to read and
          write oPCR register values (big endian bitfields, on-the-wire data).
          The new code may not be the ultimate optimum, but it doesn't occur in a
          hot path.
      
          This fixes the CMP code for big endian CPUs.  So far I tested it only on
          a little endian CPU though.
      
          For now, include <asm/byteorder.h> instead of <linux/byteorder.h>
          because drivers/ieee1394/*.h also include the former.  I will fix this
          in drivers/ieee1394 and firedtv later.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: trivial cleanups in cmp
      
          Reduce nesting level by means of early exit and goto.
          Remove obsolete includes, use dev_err(), no CamelCase function names...
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: trivial cleanups in firesat-ci
      
          Whitespace, variable names, comment style...
      
          Also, use dvb_generic_open() and dvb_generic_release() directly as
          our hooks in struct file_operations because firedtv's wrappers merely
          called these generic functions.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: remove CA debug code
      
          This looks like it is not necessary to have available for endusers who
          cannot patch kernels for bug reporting and tests of fixes.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: remove AV/C debug code
      
          This looks like it is not necessary to have available for endusers who
          cannot patch kernels for bug reporting and tests of fixes.
      
      Sun, 2 Nov 2008 13:45:00 +0100 (CET)
      firedtv: remove various debug code
      
          Most of this was already commented out.  And that which wasn't is not
          relevant in normal use.
      
      Mon, 29 Sep 2008 19:22:48 +0200 (CEST)
      firedtv: register input device as child of a FireWire device
      
          Instead of one virtual input device which exists for the whole lifetime
          of the driver and receives events from all connected FireDTVs, register
          one input device for each firedtv device.  These input devices will show
          up as children of the respective firedtv devices in the sysfs hierarchy.
      
          However, the implementation falls short because of a bug in userspace:
          Udev's path_id script gets stuck with 100% CPU utilization, maybe
          because of an assumption about the maximum ieee1394 device hierarchy
          depth.
      
          To avoid this bug, we use the fw-host device instead of the proper
          unit_directory device as parent of the input device.
      
          There is hope that the port to the new firewire stack won't be inhibited
          by this userspace bug because there are no fw-host devices there.
      
      Mon, 29 Sep 2008 19:21:52 +0200 (CEST)
      firedtv: fix string comparison and a few sparse warnings
      
          Sparse found a bug:
          	while ((kv_buf + kv_len - 1) == '\0')
          should have been
          	while (kv_buf[kv_len - 1] == '\0')
          We fix it by a better implementation without a temporary copy.
      
          Also fix sparse warnings of 0 instead of NULL and signedness mismatches.
      
      Mon, 29 Sep 2008 19:21:20 +0200 (CEST)
      firedtv: remove unused struct members
      
          and redefine an int as a bool.
      
      Mon, 29 Sep 2008 19:20:36 +0200 (CEST)
      firedtv: fix initialization of dvb_frontend.ops
      
          There was a NULL pointer reference if no dvb_frontend_info was found.
      
          Also, don't directly assign struct typed values to struct typed
          variables.  Instead write out assignments to individual strcut members.
          This reduces module size by about 1 kB.
      
      Mon, 29 Sep 2008 19:19:41 +0200 (CEST)
      firedtv: remove unused dual subunit code from initialization
      
          No FireDTVs with more than one subunit exists, hence simplify the
          initialization for the special case of one subunit.  The driver was able
          to check for more than one subunit but was broken for more than two
          subunits.
      
          While we are at it, add several missing cleanups after failure, and
          include a few dynamically allocated structures diretly into struct
          firesat instead of allocating them separately.
      
      Mon, 29 Sep 2008 19:19:08 +0200 (CEST)
      firedtv: add vendor_id and version to driver match table
      
          Now that nodemgr was enhanced to match against the root directory's
          vendor ID if there isn't one in the unit directory, use this to
          prevent firedtv to be bound to wrong devices by accident.
      
          Also add the AV/C software version ID to the match flags for
          completeness; specifier ID and software only make sense as a pair.
      
      Mon, 29 Sep 2008 19:18:30 +0200 (CEST)
      firedtv: use hpsb_node_read(), _write(), _lock()
      
          because they are simpler and treat the node generation more correctly.
          While we are at it, clean up and simplify surrounding code.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      8ae83cdf
    • S
      firesat: copyrights, rename to firedtv, API conversions, fix remote control input · 612262a5
      Stefan Richter 提交于
      Combination of the following changes:
      
      Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
      firedtv: fix remote control input
      
          and update the scancode-to-keycode mapping to a current model.  Per
          default, various media key keycodes are emitted which closely match what
          is printed on the remote.  Userland can modify the mapping by means of
          evdev ioctls.  (Not tested.)
      
          The old scancode-to-keycode mapping is left in the driver but cannot be
          modified by ioctls.  This preserves status quo for old remotes.
      
      Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
      firedtv: replace tasklet by workqueue job
      
          Non-atomic context is a lot nicer to work with.
      
      Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
      firedtv: move some code back to ieee1394 core
      
          Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
      
      Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
      firedtv: replace semaphore by mutex
      
          firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
          The only exception is the schedule_remotecontrol tasklet which did a
          down_trylock in atomic context.  This is not possible with
          mutex_trylock; however the whole remote control related code is
          non-functional anyway at the moment.  This should be fixed eventually,
          probably by turning the tasklet into a worqueue job.
      
          Convert everything else from semaphore to mutex.
      
          Also rewrite a few of the affected functions to unlock the mutex at a
          single exit point, instead of in several branches.
      
      Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
      firedtv: some header cleanups
      
          Unify #ifndef/#define/#endif guards against multiple inclusion.
          Drop extern keyword from function declarations.
          Remove #include's into header files where struct declarations suffice.
      
          Remove unused ohci1394 interface and related unused ieee1394 interfaces.
      
          Add a few missing #include's and remove a few apparently obsolete ones.
          Sort them alphabetically.
      
      Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
      firedtv: nicer registration message and some initialization fixes
      
          Print the correct name in dvb_register_adapter().
      
          While we are at it, replace two switch cascades by one for loop, remove
          a superfluous member of struct firesat and of two unused arguments of
          AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
      
      Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
      firesat: rename to firedtv
      
          Suggested by Andreas Monitzer.  Besides DVB-S/-S2 receivers, the driver
          also supports DVB-C and DVB-T receivers, hence the previous project name
          is too narrow now.
      
          Not yet done:  Rename source directory, files, types, variables...
      
      Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
      firesat: add missing copyright notes
      
          Reported by Andreas Monitzer and Christian Dolzer.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      612262a5
    • H
      firesat: avc resend · 81c67b7f
      Henrik Kurelid 提交于
      - Add resending of AVC message to the card if no answer is received
        - Replace the homebrewed event_wait function with a standard wait queue
        - Clean up of log/error messages
        - Increase debug level of avc communication
      Signed-off-by: NHenrik Kurelid <henrik@kurelid.se>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      81c67b7f
    • H
      firesat: update isochronous interface, add CI support · df4846c3
      Henrik Kurelid 提交于
      I have finally managed to get the CI support for the card working. The
      implementation is a bare minimum to get encrypted channels to work in
      kaffeine. It works fine with my T/CI card. Now and then I get an AVC
      timeout and have to retune a channel in order to get it to work. Once
      the CAM seemed to hang so I needed to remove and insert it again. I.e.
      there are a number of glitches.
      
      The latest version contains the following changes:
      
        - Implemented the new hpsb iso interface so that data can be received
          from the card
        - Reduced some timers for demux setup which caused scanning to timeout
        - Added possibility to unload driver
        - Added support for getting C/N ratio
        - Added two debug parameters to the driver; ca_debug and
          avc_comm_debug.
        - Added CI support that works for me in kaffeine
        - Started working on CI MMI support. It now supports:
            o Enter menu
            o Receiving MMI objects
        - Added support for 64-bit platforms
        - Corrected DVB-C modulations problems
      Signed-off-by: NHenrik Kurelid <henrik@kurelid.se>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (rebased, whitespace)
      df4846c3
    • B
      firesat: add DVB-S support for DVB-S2 devices · 2c228614
      Ben Backx 提交于
      ...so S2 owners now can at least watch DVB-S channels in linux.
      Signed-off-by: NBen Backx <ben@bbackx.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      2c228614
    • B
      firesat: fix DVB-S2 device recognition · f1bbb43a
      Ben Backx 提交于
      This only makes sure that a DVB-S2 device is really recognized as a S2,
      nothing else is added yet. It's using the string containing the model
      that is stored in the configuration ROM, the older version was using
      some hardware revision dependent part of the ROM.
      Signed-off-by: NBen Backx <ben@bbackx.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      f1bbb43a
    • G
      DVB: add firesat driver · c81c8b68
      Greg Kroah-Hartman 提交于
      Original code written by Christian Dolzer <c.dolzer@digital-everywhere.com>
      
      Cleaned up by Greg.
      
      Major cleanup and reorg by Manu Abraham <manu@linuxtv.org>
      
      Additions also by Ben Backx <ben@bbackx.com>
      
      Cc: Christian Dolzer <c.dolzer@digital-everywhere.com>
      Cc: Andreas Monitzer <andy@monitzer.com>
      Cc: Manu Abraham <manu@linuxtv.org>
      Cc: Fabio De Lorenzo <delorenzo.fabio@gmail.com>
      Cc: Robert Berger <robert.berger@reliableembeddedsystems.com>
      Signed-off-by: NBen Backx <ben@bbackx.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      Added missing dependency to dvb/firesat/Kconfig,
      Reported-by: NRandy Dunlap <randy.dunlap@oracle.com>
      
      Tweaked dvb/Makefile.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      c81c8b68
  2. 17 2月, 2009 7 次提交
    • H
      V4L/DVB (10626): ivtv: fix regression in get sliced vbi format · 7bf432d6
      Hans Verkuil 提交于
      The new v4l2_subdev_call used s_fmt instead of g_fmt.
      
      Thanks-to: Andy Walls <awalls@radix.net>
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7bf432d6
    • H
      V4L/DVB (10625): ivtv: fix decoder crash regression · ac9575f7
      Hans Verkuil 提交于
      The video_ioctl2 conversion of ivtv in kernel 2.6.27 introduced a bug
      causing decoder commands to crash. The decoder commands should have been
      handled from the video_ioctl2 default handler, ensuring correct mapping
      of the argument between user and kernel space. Unfortunately they ended
      up before the video_ioctl2 call, causing random crashes.
      
      Thanks to hannes@linus.priv.at for testing and helping me track down the
      cause!
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ac9575f7
    • A
      V4L/DVB (10619): gspca - main: Destroy the URBs at disconnection time. · ad28127d
      Adam Baker 提交于
      If a device using the gspca framework is unplugged while it is still streaming
      then the call that is used to free the URBs that have been allocated occurs
      after the pointer it uses becomes invalid at the end of gspca_disconnect.
      Make another cleanup call in gspca_disconnect while the pointer is still
      valid (multiple calls are OK as destroy_urbs checks for pointers already
      being NULL.
      Signed-off-by: NAdam Baker <linux@baker-net.org.uk>
      Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ad28127d
    • M
      V4L/DVB (10572): Revert commit dda06a8e · 28100165
      Mauro Carvalho Chehab 提交于
      On Mon, 02 Feb 2009, Hartmut wrote:
      
      This change set is wrong. The affected functions cannot be called from
      an interrupt context, because they may process large buffers. In this
      case, interrupts are disabled for a long time. Functions, like
      dvb_dmx_swfilter_packets(), could be called only from a tasklet.
      
      This change set does hide some strong design bugs in dm1105.c and
      au0828-dvb.c.
      
      Please revert this change set and do fix the bugs in dm1105.c and
      au0828-dvb.c (and other files).
      
      On Sun, 15 Feb 2009, Oliver Endriss wrote:
      
      This changeset _must_ be reverted! It breaks all kernels since 2.6.27
      for applications which use DVB and require a low interrupt latency.
      
      It is a very bad idea to call the demuxer to process data buffers with
      interrupts disabled!
      
      On Mon, 16 Feb 2009, Trent Piepho wrote:
      
      I agree, this is bad.  The demuxer is far too much work to be done with
      IRQs off.  IMHO, even doing it under a spin-lock is excessive.  It should
      be a mutex.  Drivers should use a work-queue to feed the demuxer.
      
      Thank you for testing this changeset and discovering the issues on it.
      
      Cc: Trent Piepho <xyzzy@speakeasy.org>
      Cc: Hartmut <e9hack@googlemail.com>
      Cc: Oliver Endriss <o.endriss@gmx.de>
      Cc: Andreas Oberritter <obi@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      28100165
    • T
      V4L/DVB (10533): fix LED status output · 2f94fc46
      Tobias Lorenz 提交于
      This patch closes one of my todos that was since long on my list.
      Some people reported clicks and glitches in the audio stream,
      correlated to the LED color changing cycle.
      Thanks to Rick Bronson <rick@efn.org>.
      Signed-off-by: NTobias Lorenz <tobias.lorenz@gmx.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2f94fc46
    • T
      V4L/DVB (10532): Correction of Stereo detection/setting and signal strength indication · d807dec5
      Tobias Lorenz 提交于
      Thanks to Bob Ross <pigiron@gmx.com>
      - correction of stereo detection/setting
      - correction of signal strength indicator scaling
      Signed-off-by: NTobias Lorenz <tobias.lorenz@gmx.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d807dec5
    • M
      V4L/DVB (10527): tuner: fix TUV1236D analog/digital setup · ef88f2b5
      Mauro Carvalho Chehab 提交于
      As reported by David Engel <david@istwok.net>, ATSC115 doesn't work
      fine with mythtv. This software opens both analog and dvb interfaces of
      saa7134.
      
      What happens is that some tuner commands are going to the wrong place,
      as shown at the logs:
      
      Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: using tuner params #0 (ntsc)
      Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
      Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
      Feb 12 20:37:48 opus kernel: tuner 1-0061: tv freq set to 67.25
      Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: using tuner params #0 (ntsc)
      Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
      Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
      Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: tv 0x07 0x10 0xce 0x01
      Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: tv 0x07 0x10 0xce 0x01
      
      This happens due to a hack at TUV1236D analog setup, where it replaces
      tuner address, at 0x61 for 0x0a, in order to save a few memory bytes.
      
      The code assumes that nobody else would try to access the tuner during
      that setup, but the point is that there's no lock to protect such
      access. So, this opens the possibility of race conditions to happen.
      
      Instead of hacking tuner address, this patch uses a temporary var with
      the proper tuner value to be used during the setup. This should save
      the issue, although we should consider to write some analog/digital
      lock at saa7134 driver.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ef88f2b5
  3. 01 2月, 2009 2 次提交
  4. 29 1月, 2009 24 次提交
    • H
      V4L/DVB (10229): ivtv: fix memory leak · 2c1a3c97
      Hans Verkuil 提交于
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2c1a3c97
    • J
      V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming. · 2fd9c2ea
      Jean-Francois Moine 提交于
      Resetting the streaming flag on disconnection prevented the URBs to be freed
      when streaming was active.
      Also, USBs cannot be killed after disconnection (oops in [usbcore] unlink1).
      Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      2fd9c2ea
    • R
      V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled · 9c06210b
      Robert Krakora 提交于
      Trace:  (Provided by Douglas)
      
      BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:558
      in_atomic():0, irqs_disabled():1
      Pid: 4918, comm: sox Not tainted 2.6.27.5 #1
       [<c04246d8>] __might_sleep+0xc6/0xcb
       [<c058c8b0>] usb_kill_urb+0x1a/0xd8
       [<c0488e68>] ? __kmalloc+0x9b/0xfc
       [<c0488e85>] ? __kmalloc+0xb8/0xfc
       [<c058cd5a>] ? usb_alloc_urb+0xf/0x31
       [<f8dd638c>] em28xx_isoc_audio_deinit+0x2f/0x6c [em28xx_alsa]
       [<f8dd6573>] em28xx_cmd+0x1aa/0x1c5 [em28xx_alsa]
       [<f8dd65e1>] snd_em28xx_capture_trigger+0x53/0x68 [em28xx_alsa]
       [<f8aa8674>] snd_pcm_do_start+0x1c/0x23 [snd_pcm]
       [<f8aa85d7>] snd_pcm_action_single+0x25/0x4b [snd_pcm]
       [<f8aa9833>] snd_pcm_action+0x6a/0x76 [snd_pcm]
       [<f8aa98f5>] snd_pcm_start+0x14/0x16 [snd_pcm]
       [<f8aae10e>] snd_pcm_lib_read1+0x66/0x273 [snd_pcm]
       [<f8aac5a3>] ? snd_pcm_kernel_ioctl+0x46/0x5f [snd_pcm]
       [<f8aae4a7>] snd_pcm_lib_read+0xbf/0xcd [snd_pcm]
       [<f8aad774>] ? snd_pcm_lib_read_transfer+0x0/0xaf [snd_pcm]
       [<f89feeb6>] snd_pcm_oss_read3+0x99/0xdc [snd_pcm_oss]
       [<f89fef9c>] snd_pcm_oss_read2+0xa3/0xbf [snd_pcm_oss]
       [<c064169d>] ? _cond_resched+0x8/0x32
       [<f89ff0be>] snd_pcm_oss_read+0x106/0x150 [snd_pcm_oss]
       [<f89fefb8>] ? snd_pcm_oss_read+0x0/0x150 [snd_pcm_oss]
       [<c048c6e2>] vfs_read+0x81/0xdc
       [<c048c7d6>] sys_read+0x3b/0x60
       [<c04039bf>] sysenter_do_call+0x12/0x34
       =======================
      
      The culprit in the trace is snd_pcm_action() which invokes a spin lock
      which disables pre-emption which disables an IRQ which causes the
      __might_sleep() function to fail the irqs_disabled() test.  Since
      pre-emption is enabled then it is safe to de-allocate the memory if
      you first unlink each URB.  In this instance you are safe since
      pre-emption is disabled.  If pre-emption and irqs are not disabled then
      call usb_kill_urb(), else call usb_unlink_urb().
      
      Thanks to Douglas for tracking down this bug originally!!!
      
      [dougsland@redhat.com: Fixed codyingstyle]
      Signed-off-by: NRobert Krakora <rob.krakora@messagenetsystems.com>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      9c06210b
    • A
      V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo · 7f03a585
      Alexey Klimov 提交于
      Move radio->muted and radio->stereo in section where radio mutex is
      locked to avoid possible race condition problems or access to memory.
      Thanks to David Ellingsworth <david@identd.dyndns.org> for pointing to
      this weak place in driver.
      Signed-off-by: NAlexey Klimov <klimov.linux@gmail.com>
      Signed-off-by: NDouglas Schilling Landgraf <dougsland@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7f03a585
    • H
      V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback. · 6d9f13c4
      Hans Verkuil 提交于
      These days TUNER_SET_CONFIG is broadcast to the other i2c devices
      and that triggers a fw load on the cx25840. Ignore this command
      since cx25840 isn't a tuner and you really do not want to load
      the firmware that early.
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6d9f13c4
    • A
      V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged · d1a470fb
      Antti Palosaari 提交于
      First control messages to the stick timeouts very often due to probable
      hw bug. Repeat first message few times if it fails as workaround.
      Signed-off-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d1a470fb
    • A
      V4L/DVB (10287): af9015: fix second FE · f0830ebe
      Antti Palosaari 提交于
      Bug causes 2nd FE MPEG TS buffer size to be zero and therefore no picture
      when 2nd FE was enabled. Configure correct buffer size also for 2nd FE.
      Signed-off-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      f0830ebe
    • H
      V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock · ba3ed4c5
      Hans Verkuil 提交于
      The default case of the switch didn't unlock the mutex.
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ba3ed4c5
    • T
      V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel... · 6dbe7af3
      Tony Broad 提交于
      V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff
      
      I'm using a "Hauppauge WinTV-NOVA-T DVB card" of PCI id "13c2:1005" with
      kernel 2.6.27.9.
      
      I've recently experienced the following fairly consistent kernel oops on
      startup in grundig_29504_401_tuner_set_params from budget.c. As you
      might expect, following this failure, the card doesn't work.
      
      I'm not a kernel developer, nevertheless I seem to have managed to track
      this down to a non-existent initialisation of
      budget->dvb_frontend->tuner_priv.
      
      The attached patch fixes the problem for me (and I've managed to tune
      the card successfully as a result), but I don't know of anyone else
      using the driver so I can't test it on other people.
      
      Please let me know if this works for you or if I've done something
      terribly wrong ;-(
      
      BUG: unable to handle kernel paging request at ffffffff
      IP: [<f8981e11>] :budget:grundig_29504_401_tuner_set_params+0x3b/0xf8
      *pde = 007e0067 *pte = 00000000
      Oops: 0000 [#1] SMP
      Modules linked in: bridge stp bnep rfcomm l2cap asb100 hwmon_vid hwmon
      fuse ipt_REJECT nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT
      xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter
      ip6_tables x_tables ipv6 loop dm_multipath scsi_dh ppdev snd_cmipci
      gameport snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
      snd_pcm_oss snd_mixer_oss l64781 snd_pcm snd_page_alloc snd_opl3_lib
      snd_timer parport_pc snd_hwdep parport btusb snd_mpu401_uart budget
      budget_core snd_rawmidi bluetooth saa7146 snd_seq_device ttpci_eeprom
      snd soundcore sr_mod i2c_sis96x cdrom dvb_core sis900 i2c_core floppy
      pcspkr mii sata_sil sg dm_snapshot dm_zero dm_mirror dm_log dm_mod
      pata_sis ata_generic pata_acpi libata sd_mod scsi_mod crc_t10dif ext3
      jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: microcode]
      
      Pid: 2319, comm: kdvb-fe-0 Not tainted (2.6.27.9-73.fc9.i686 #1)
      EIP: 0060:[<f8981e11>] EFLAGS: 00010286 CPU: 0
      EIP is at grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
      EAX: f6417f00 EBX: f6f53808 ECX: 00000000 EDX: ffffffff
      ESI: f6f94404 EDI: f6417f00 EBP: f6417f10 ESP: f6417ef0
        DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      Process kdvb-fe-0 (pid: 2319, ti=f6417000 task=f642b2c0 task.ti=f6417000)
      Stack: f6e39800 00000000 00000004 f6417f00 c064523c f6f53808 f6f53800 f6f94404
              f6417f54 f8b2e45a f6417f24 00000286 f6417f4c f6417f38 00000000 00000286
              f6417f3c c064520f f642b2c0 f6417f6c c064456f 00000001 f6f94400 00000001
      Call Trace:
        [<c064523c>] ? _spin_lock_irqsave+0x29/0x30
        [<f8b2e45a>] ? apply_frontend_param+0x27/0x357 [l64781]
        [<c064520f>] ? _spin_lock_irq+0x1c/0x20
        [<c064456f>] ? __down_common+0x91/0xbf
        [<f894f25d>] ? dvb_frontend_swzigzag_autotune+0x17d/0x1a4 [dvb_core]
        [<f894f780>] ? dvb_frontend_swzigzag+0x1ac/0x209 [dvb_core]
        [<f894fcc8>] ? dvb_frontend_thread+0x2eb/0x3b3 [dvb_core]
        [<c043c166>] ? autoremove_wake_function+0x0/0x33
        [<f894f9dd>] ? dvb_frontend_thread+0x0/0x3b3 [dvb_core]
        [<c043bec3>] ? kthread+0x3b/0x61
        [<c043be88>] ? kthread+0x0/0x61
        [<c040494b>] ? kernel_thread_helper+0x7/0x10
        =======================
      Code: ec 14 8b 80 00 02 00 00 8b 93 08 02 00 00 8d 7d e4 8b 40 20 89 45
      e0 31 c0 85 d2 f3 ab 8d 45 f0 66 c7 45 e8 04 00 89 45 ec 74 09 <0f> b6
      02 66 89 45 e4 eb 06 66 c7 45 e4 61 00 8b 0e be 0a 8b 02
      EIP: [<f8981e11>] grundig_29504_401_tuner_set_params+0x3b/0xf8 [budget]
      SS:ESP 0068:f6417ef0
      Signed-off-by: NOliver Endriss <o.endriss@gmx.de>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6dbe7af3
    • D
      V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown · 8760e5b6
      Devin Heitmueller 提交于
      Revert a change made in change 9743 which resulted in a kernel panic in some
      cases on shutdown of the audio stream.
      
      First discovered when working on the Pinnacle 880e support, and later
      reproduced by a user on the mailing list with the HVR-900 as well.
      Signed-off-by: NDevin Heitmueller <dheitmueller@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8760e5b6
    • R
      V4L/DVB (10257): em28xx: Fix for KWorld 330U Board · 6e7b9ea0
      Robert Krakora 提交于
      Fix for KWorld 330U Board
      
      Many thanks to Devin and Mauro!!!
      Signed-off-by: NRobert Krakora <rob.krakora@messagenetsystems.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6e7b9ea0
    • R
      V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97 · 7e4b15e4
      Robert Krakora 提交于
      Fix for KWorld 330U AC97
      
      Many thanks to Devin and Mauro again!!!
      Signed-off-by: NRobert Krakora <rob.krakora@messagenetsystems.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      7e4b15e4
    • R
      V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition · 53d12e5a
      Robert Krakora 提交于
      em28xx: Fix audio URB transfer buffer memory leak and race
      condition/corruption of capture pointer
      
      Leak fix kindly contributed by Pádraig Brady.
      Signed-off-by: NRobert Krakora <rob.krakora@messagenetsystems.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      53d12e5a
    • H
      V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use · ba390f00
      Hans Verkuil 提交于
      With the conversion to v4l2_subdev one bit of code was accidentally dropped:
      on receiving the first command the driver has to load the fw. A new init()
      command was introduced to do that explicitly for bridge drivers that are
      converted to use v4l2_subdev, but old drivers that are not yet converted
      no longer worked.
      
      This patch fixes this regression for these old drivers.
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ba390f00
    • H
    • H
      32929fb4
    • M
      V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic · aeaecaf8
      Mike Isely 提交于
      The VIDIOC_QUERYCTRL command needs to actually do a queryctrl, not a
      querymenu.  Similarly, the VIDIOC_QUERYMENU command needs to actually
      do a querymenu not a queryctrl.
      Signed-off-by: NMike Isely <isely@pobox.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      aeaecaf8
    • N
      V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081) · db4b2d19
      Nicolas Fournier 提交于
      The following patch adds support for a new version of the
      Terratec Cinergy DT USB XS Diversity Dual DVB-T TV tuner stick.
      The USB ID of the new stick is 0ccd:0081.
      The hardware of the stick has changed, when compared to the first version of
      this stick, but it still uses quite standard components, so that only minor
      changes are needed to the sources.
      
      The patch has been successfully tested with hotplugging the device and then
      2 x tzap and 2 x mplayer, to watch two different TV programs simultaneously.
      
      The stick works with both, the old and new firmwares:
      - dvb-usb-dib0700-1.10.fw and
      - dvb-usb-dib0700-1.20.fw
      Signed-off-by: NNicolas Fournier <nicolasfournier@yahoo.com>
      Signed-off-by: NPatrick Boettcher <pb@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      db4b2d19
    • A
      V4L/DVB (10229): cx88-dvb: Fix order of frontend allocations · 6e0e12f1
      Andy Walls 提交于
      On Fri, 2009-01-09 at 15:40 +0300, Goga777 wrote:
      > hI
      >
      > With today v4l-dvb I couldn't run my hvr4000 card on 2.6.27 kernel
      
      > [   14.555162] cx88/2: cx2388x dvb driver version 0.0.6 loaded
      > [   14.555231] cx88/2: registering cx8802 driver, type: dvb access: shared
      > [   14.555303] cx88[0]/2: subsystem: 0070:6900, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
      > [   14.555374] cx88[0]/2: cx2388x based DVB/ATSC card
      > [   14.555446] BUG: unable to handle kernel NULL pointer dereference at 00000000
      > [   14.555560] IP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4
      > [   14.555652] *pde = 00000000
      > [   14.555735] Oops: 0002 [#1] SMP
      > [   14.555851] Modules linked in: cx88_dvb(+) cx88_vp3054_i2c videobuf_dvb wm8775 dvb_core tuner_simple tuner_types snd_seq_dummy tda9887 snd_seq_oss(+) snd_intel8x0(+) tda8290 snd_seq_midi snd_seq_midi_event snd_ac97_codec cx88_alsa(+) snd_seq ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_rawmidi snd_timer tuner snd_seq_device psmouse snd serio_raw ivtv(+) cx8800 cx8802 cx88xx soundcore cx2341x ir_common ns558 i2c_i801 v4l2_common videodev i2c_algo_bit gameport v4l1_compat snd_page_alloc tveeprom pcspkr floppy videobuf_dma_sg videobuf_core btcx_risc i2c_core parport_pc parport button intel_agp agpgart shpchp pci_hotplug rng_core iTCO_wdt sd_mod evdev usbhid hid ff_memless ext3 jbd mbcache ide_cd_mod cdrom ide_disk ata_piix libata dock 8139too usb_storage scsi_mod piix 8139cp mii ide_core uhci_hcd ehci_hcd usbcore thermal processor fan thermal_sys
      > [   14.557013]
      > [   14.557013] Pid: 2310, comm: modprobe Not tainted (2.6.27.1-custom-default1 #1)
      > [   14.557013] EIP: 0060:[<c02e6bff>] EFLAGS: 00010246 CPU: 1
      > [   14.557013] EIP is at __mutex_lock_common+0x3c/0xe4
      > [   14.557013] EAX: de653e98 EBX: de739118 ECX: de739120 EDX: 00000000
      > [   14.557013] ESI: dd4209e0 EDI: de73911c EBP: de653eb0 ESP: de653e88
      > [   14.557013]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      > [   14.557013] Process modprobe (pid: 2310, ti=de652000 task=dd4209e0 task.ti=de652000)
      > [   14.557013] Stack: 3535352e 5d343733 00000002 de739120 de739120 00000000 c044a6c0 de739110
      > [   14.557013]        de739118 00000001 de653ebc c02e6d38 c02e6b88 de653ec4 c02e6b88 de653ed8
      > [   14.557013]        e1ac7115 de6a9000 00000001 00000000 de653f0c e1aeca62 de739004 de739000
      > [   14.557013] Call Trace:
      > [   14.557013]  [<c02e6d38>] ? __mutex_lock_slowpath+0x17/0x1a
      > [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
      > [   14.557013]  [<c02e6b88>] ? mutex_lock+0x12/0x14
      > [   14.557013]  [<e1ac7115>] ? videobuf_dvb_get_frontend+0x19/0x40 [videobuf_dvb]
      > [   14.557013]  [<e1aeca62>] ? cx8802_dvb_probe+0xc9/0x1945 [cx88_dvb]
      > [   14.557013]  [<e09ee41e>] ? cx8802_register_driver+0xbd/0x1ac [cx8802]
      > [   14.557013]  [<e09ee467>] ? cx8802_register_driver+0x106/0x1ac [cx8802]
      > [   14.557013]  [<e1aee37f>] ? dvb_init+0x22/0x27 [cx88_dvb]
      > [   14.557013]  [<c0101132>] ? _stext+0x42/0x11a
      > [   14.557013]  [<e1aee35d>] ? dvb_init+0x0/0x27 [cx88_dvb]
      > [   14.557013]  [<c013d2ca>] ? __blocking_notifier_call_chain+0xe/0x51
      > [   14.557013]  [<c014970b>] ? sys_init_module+0x8c/0x17d
      > [   14.557013]  [<c0103b42>] ? syscall_call+0x7/0xb
      > [   14.557013]  [<c013007b>] ? round_jiffies_relative+0x14/0x16
      > [   14.557013]  =======================
      > [   14.557013] Code: 78 04 89 f8 89 55 e0 64 8b 35 00 30 3f c0 e8 2e 0c 00 00 8d 43 08 89 45 e4 8b 53 0c 8d 45 e8 8b 4d e4 89 43 0c 89 4d e8 89 55 ec <89> 02 89 75 f0 83 c8 ff 87 03 48 74 55 8a 45 e0 8b 4d e0 83 e0
      > [   14.557013] EIP: [<c02e6bff>] __mutex_lock_common+0x3c/0xe4 SS:ESP 0068:de653e88
      > [   14.565211] ---[ end trace 94d8b014e067ac7b ]---
      
      Tested and confirmed to work by several users at linux-media@vger.kernel.org
      Signed-off-by: NAndy Walls <awalls@radix.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6e0e12f1
    • M
      V4L/DVB (10228): em28xx: fix audio output PCM IN selection · 8866f9cf
      Mauro Carvalho Chehab 提交于
      Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However,
      currently, the PCM IN selection is not set by the driver. This patch allows
      specifying the PCM IN expected output, via board description table.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8866f9cf
    • T
      V4L/DVB (10226): zoran: Get rid of extra module ref count · fc96ab73
      Trent Piepho 提交于
      The zoran driver does a module_get/put of THIS_MODULE on device open/close.
      This isn't necessary as the kernel does this automatically.
      
      Clean up the failure path of zoran_open() somewhat.
      
      Make the dprintk()s on open/close a higher debug level and make the user
      count printed take the current open/close into account.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      fc96ab73
    • T
      V4L/DVB (10225): zoran: Remove zr36057_adr field · 5e098b66
      Trent Piepho 提交于
      The driver should only use the kernel mapped io address, zr36057_mem, and
      not the PCI bus address, zr36057_adr.  Since the latter is only printed out
      once, there is no need to save it in the driver data structure.
      
      There was some old code that looked like it was for the Alpha architecture
      which would use the PCI bus address.  It probably no longer applies to
      modern kernels.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      5e098b66
    • T
      V4L/DVB (10224): zoran: Use pci device table to get card type · 17faeb20
      Trent Piepho 提交于
      Instead of using custom code, just let the device layer look it up for us
      from the pci device table.  This requires extending the pci device table to
      list each known card, plus a catch-all entry for the cards that don't have
      sub-system vendor/device data.
      
      Improve some of the info and error messages too.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      17faeb20
    • T
      V4L/DVB (10223): zoran: Remove global device array · 601139e0
      Trent Piepho 提交于
      The driver was keeping a global array with an entry for each zoran device
      probed.  It was a leftover from when the driver didn't dynamically allocate
      the driver data for each device.
      
      There was only one use left, in the video device's ->open() method, looking
      up the struct zoran for the opened device from the minor number.  This can
      be done better with video_get_drvdata().
      
      Since zoran_num is now only used in the pci driver's ->probe() method, it
      doesn't need to be an atomic_t and be static.  There is a race if multiple
      zoran cards could be probed at the same time, but currently the probe
      method for a given driver is single threaded.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      601139e0