1. 21 10月, 2010 1 次提交
  2. 19 5月, 2010 1 次提交
    • I
      V4L/DVB: cx88: fix setting input when using DVB · d922b8ea
      Istvan Varga 提交于
      In cx88-mpeg.c, there is code that sets core->input to CX88_VMUX_DVB.
      However, this may be incorrect, since core->input is actually an
      index to core->board.input[], which has not enough elements to be
      indexed by the value of CX88_VMUX_DVB. So, the modified code searches
      core->board.input[] for an input with a type of CX88_VMUX_DVB, and if
      it does not find one, the index is simply set to zero.
      The change may not have much effect, though, since it appears the only
      case when core->input is actually used is when the current input is
      being queried.
      Signed-off-by: NIstvan Varga <istvanv@users.sourceforge.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      d922b8ea
  3. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  4. 27 2月, 2010 1 次提交
  5. 16 12月, 2009 1 次提交
  6. 21 9月, 2009 1 次提交
  7. 14 8月, 2009 1 次提交
  8. 07 4月, 2009 1 次提交
  9. 08 1月, 2009 1 次提交
    • M
      V4L/DVB (10190): cx88: Fix some Kbuild troubles · e32fadc4
      Mauro Carvalho Chehab 提交于
      As Randy Dunlap <randy.dunlap@oracle.com> reported, cx88 has some compilation issues:
      
      drivers/built-in.o: In function `cx88_call_i2c_clients':
      (.text+0x20af17): undefined reference to `videobuf_dvb_get_frontend'
      drivers/built-in.o: In function `cx8802_probe':
      cx88-mpeg.c:(.devinit.text+0x268c4): undefined reference to `videobuf_dvb_alloc_frontend'
      cx88-mpeg.c:(.devinit.text+0x268ea): undefined reference to `videobuf_dvb_dealloc_frontends'
      
      With those configs:
      
      CONFIG_VIDEO_CX88=y
      CONFIG_VIDEO_CX88_BLACKBIRD=y
      CONFIG_VIDEO_CX88_DVB=m
      CONFIG_DVB_CORE=m
      
      After carefully examining the code, with the current code, several cx88 drivers
      (cx8800, cx8802, cx88_dvb and cx88_blackbird) should be compiled as a module,
      if one of them is marked as such. Just fixing Kconfig could create a very complex
      set of rules. Also, this hides a problem with the current approach where the dvb
      functionality weren't confined inside dvb module.
      
      What happens is that:
      	- cx88-i2c (part of cx8800) has some special rules if DVB;
      	- cx88-mpeg (cx8802 module) has also part of DVB init code;
      	- cx88-dvb has the rest of the dvb code;
      	- cx88-blackbird can be used with cx88-mpeg, having cx88-dvb or not.
      
      So, instead of doing some tricks at Kconfig and wait for a next breakage,
      this patch moves the dvb code inside cx88-i2c and cx88-mpeg into cx88-dvb.
      
      Another problem is that cx8802 were being compiled, even without cx88-dvb
      and cx88-blackbird modules.
      
      While on this code, let's fix also a reported problem:
      http://www.linuxtv.org/pipermail/linux-dvb/2009-January/031225.html
      
      A solution for the issue were proposed here:
      http://www.mail-archive.com/linux-media@vger.kernel.org/msg00021.html
      
      Thanks to Randy, Andy, Gregoire and Thomas for helping us to detect
      and solve the issues.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      e32fadc4
  10. 03 1月, 2009 1 次提交
  11. 30 12月, 2008 1 次提交
  12. 11 11月, 2008 1 次提交
  13. 22 10月, 2008 2 次提交
  14. 18 10月, 2008 4 次提交
  15. 25 4月, 2008 3 次提交
  16. 18 2月, 2008 2 次提交
  17. 26 1月, 2008 4 次提交
  18. 22 10月, 2007 4 次提交
  19. 10 10月, 2007 8 次提交
    • M
      V4L/DVB (6252): Adapt drivers to use the newer videobuf modules · c1accaa2
      Mauro Carvalho Chehab 提交于
      PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo.
      
      Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct.
      So, to access it, a subroutine call is needed.
      
      This patch renames all occurences of those function calls to be
      consistent with the video-buf split.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981Reviewed-by: NRicardo Cerqueira <v4l@cerqueira.org>
      c1accaa2
    • M
      V4L/DVB (6125): whitespace cleanup: replace leading spaces with tabs · b930e1d8
      Michael Krufky 提交于
      There were many instances of 7-space indents spread throughout
      the v4l-dvb tree.
      
      This patch replaces the 7-space indents with tabs.  The whitespace cleaner
      script doesn't catch these, because it assumes that all indents are 8-space.
      Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      b930e1d8
    • T
      V4L/DVB (6083): cx88-alsa: Rework buffer handling · 05b27233
      Trent Piepho 提交于
      Rework the way the DMA buffer is handled and IRQs are generated.
      
      ALSA uses a ring-buffer of multiple periods.  Each period is supposed to
      corrispond to one IRQ.
      
      The existing driver was generating one interrupt per ring-buffer, as opposed
      to per period.  This meant that as soon as the IRQ was generated, the hardware
      was already starting to re-write the beginning of the buffer.  Since the DMA
      happens on a per-line basis, there was only a narrow window to copy the data
      out before the buffer was overwritten.
      
      The cx88 core RISC program generator is modified so that it can set the IRQ
      and counter flags to count every X lines of DMA transfer.  This way we can
      generate an interrupt every period instead of every full ring-buffer.  Right
      now only period of one line are supported, but it should be possible to
      support longer periods.  Note that a WRITE instruction generates an IRQ when
      it starts, not when the transfer is finished.  Thus to generate an IRQ when
      line X is done, one must set the IRQ flag on the instruction that starts line
      X+1, not the one that ends line X.
      
      Change the line size so that there are four lines in the SRAM FIFO.  If there
      are not four lines, the analog output from the cx88's internal DACs is full of
      clicks and pops.
      
      Try to handle FIFO sync errors.  Sometimes the chip generates many of these
      errors before audio data starts.  Up to 50 sync errors will be ignored and the
      counter reset.
      
      Have the IRQ handler save the RISC counter to the chip struct, and then have
      the pointer callback use this to calculate the pointer position.  We could
      read the counter from the pointer callback, but sometimes the sync errors on
      start up cause the counter to go crazy.  ALSA sees this and thinks there has
      been an overrun.  The IRQ hander can avoid saving the counter position on
      sync errors.
      
      The chip "opened" flag wasn't necessary.  ALSA won't try to open the same
      substream multiple times.  Probably this code was cut&pasted from the bt87x
      driver, which has multiple sub-streams for one chip.
      
      Do error checking for the videobuf mapping functions.
      
      snd_card_cx88_runtime_free() is useless and can be deleted.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      05b27233
    • M
      V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files · 9c12224a
      Mauro Carvalho Chehab 提交于
      Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This
      patch removes all occurences of moduleparm.h from drivers/media files.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      9c12224a
    • T
      V4L/DVB (6064): cx88: Add symbolic names for the PCI interrupt bits · 8ddac9ee
      Trent Piepho 提交于
      Used for the PCI_INTMSK and PCI_INT_STAT registers.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      8ddac9ee
    • T
      V4L/DVB (6023): cx88: Clean up some ugly and inconsistent printk()s · 5772f813
      Trent Piepho 提交于
      Get rid of the "CORE" prefix from cx88 printks.  It was only used a few times,
      and it makes it look like they're coming from the kernel core or something.
      
      Fix the message, "TV tuner 60 at 0x1fe, Radio tuner -1 at 0x1fe", by adding a
      "cx88[0]" prefix to be consistent, and to keep people who grep their dmesg
      output for cx88 from missing it.  Get rid of the addresses, which are always
      wrong.  The addresses are always set to -1, but because it's an unsigned 8-bit
      value, the left shift converts it to the nonsense address 0x1fe.
      
      In the cx8802 driver, some cut and pasted code prefixed lines with "CORE
      cx88[0]:", which has been changed to "cx88[0]/2:" like the other printks from
      the cx8802 driver.
      
      Also fix some ugly printks in the cx8802 driver that used __FUNCTION__ for
      KERN_INFO and KERN_ERR messages.
      
      The changed printks in cx88-mpeg.c also needed lots of whitespace and
      80-column fixes.
      
      A bunch of misc changes in cx88-dvb.c and cx88-video.c to add message levels
      or a consistent "cx88[?]/2" or "cx88[?]/0" prefix.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      5772f813
    • T
      V4L/DVB (6021): cx88: Copy board information into card state · 6a59d64c
      Trent Piepho 提交于
      The cx88 driver state stored the ID of the board type in core->board.  Every
      time the driver need to get some information about the board configuration, it
      uses the board number as an index into board configuration array.
      
      This patch changes it so that the board number is in core->boardnr, and
      core->board is a copy of the board configuration information.  This allows
      access to board information without the extra indirection.  e.g.
      cx88_boards[core->board].mpeg becomes core->board.mpeg.
      
      This has a number of advantages:
      - The code is simpler to write.
      
      - It compiles to be smaller and faster, without needing the extra array lookup
        to get at the board information.
      
      - The cx88_boards array no longer needs to be exported to all cx88 modules.
      
      - The boards array can be made const
      
      - It should be possible to avoid keeping the (large) cx88_boards array around
        after the module is loaded.
      
      - If module parameters or eeprom info override some board configuration
        setting, it's not necessary to modify the boards array, which would
        affect all boards of the same type.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      6a59d64c
    • J
      V4L/DVB (5912): Clean up duplicate includes in drivers/media/ · 915366da
      Jesper Juhl 提交于
      This patch cleans up duplicate includes in
              drivers/media/
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      915366da
  20. 15 9月, 2007 1 次提交