1. 22 10月, 2007 2 次提交
    • T
      V4L/DVB (6334): cx88: Change (struct cx8802_dev)->drvlist to a list_head and fix bugs · 081c2fc8
      Trent Piepho 提交于
      It was a struct cx8802_driver for no apparent reason.  Nothing uses a
      cx8802_driver in the cx8802_dev struct.  The only field that was used was
      devlist, a list_head.
      
      The code in cx8802_remove() that removed any loaded sub-drivers was broken.
      It would delete the current list entry, but didn't use list_for_each_safe.  It
      also called list_del() on the list _head_ inside the list_for_each loop?  It
      would crash if it was run, which I don't think can ever happen.
      
      Since the cx8802 sub-drivers use the cx8802 driver, they have to be unloaded
      first.  So there isn't any way for a sub-driver to still be loaded when
      cx8802_remove() is called...  Except maybe with PCI hot-plug, if one removes
      the PCI card while the drivers are loaded?
      
      So I left some code in to handle that if it's actually possible.  It will
      remove the sub-drivers from the device cx8802_remove() was called on, and only
      that device.  If one has two DVB cards and unplugs one, there is no reason to
      unload the DVB drivers for both cards.  I have no way to test this, but it
      can't be worse than what was there before.
      
      cx8802_get_driver() is passed a cx8802_dev pointer and looks for the requested
      driver on that device.  It first loops over the cx8802 device list looking for
      the device it was passed, which is pointless.  It doesn't need to find the
      device pointer in the list, as it already has the pointer.
      
      The list_head in the cx8802_driver struct, which joins all the _drivers_
      attached to a device, was named devlist.  Changed that to drvlist, since the
      devlist is used for a list of _devices_ in other cx8802 structs.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Reviewed-by: NMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      081c2fc8
    • T
      V4L/DVB (6332): cx88: Only include the blackbird fields if blackbird is selected · 7717cbed
      Trent Piepho 提交于
      Add some ifdefs around fields only used for blackbird support, similar to the
      way the dvb fields are only included with dvb support.
      Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
      Reviewed-by: NMichael Krufky <mkrufky@linuxtv.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
      7717cbed
  2. 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
  3. 15 9月, 2007 1 次提交
  4. 19 7月, 2007 1 次提交
  5. 09 5月, 2007 2 次提交
  6. 08 5月, 2007 1 次提交
    • A
      cx88-video build fix · c24228da
      Andrew Morton 提交于
      alpha:
      
      drivers/media/video/cx88/cx88-video.c: In function 'cx8800_initdev':
      drivers/media/video/cx88/cx88-video.c:1782: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
      drivers/media/video/cx88/cx88-video.c:1782: error: (Each undeclared identifier is reported only once
      drivers/media/video/cx88/cx88-video.c:1782: error: for each function it appears in.)
      
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c24228da
  7. 28 4月, 2007 4 次提交
  8. 10 12月, 2006 3 次提交
  9. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  10. 04 10月, 2006 2 次提交
  11. 03 7月, 2006 1 次提交
  12. 28 6月, 2006 1 次提交
  13. 25 6月, 2006 3 次提交
  14. 25 3月, 2006 1 次提交
  15. 10 1月, 2006 1 次提交
  16. 09 11月, 2005 2 次提交
  17. 10 9月, 2005 2 次提交
  18. 13 7月, 2005 1 次提交
  19. 08 7月, 2005 2 次提交
  20. 24 6月, 2005 1 次提交