19 May, 2010

40 commits

  • While analyzing one of the videobuf patches, I noticed that
    videobuf_dma_sync is only used internally inside videobuf-dma-sg.
    So, let's remove this function, merging the code at __videobuf_dma_sync()

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Add documentation for V4L2_BUF_FLAG_ERROR.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Pawel Osciak
     
  • For recoverable stream errors dqbuf() now returns 0 and the error flag
    is set instead of returning EIO.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • This flag is intended to indicate streaming errors, which might have
    resulted in corrupted video data in the buffer, but the buffer can still
    be reused and streaming may continue.

    Setting this flag and returning 0 is different from returning EIO. The
    latter should now indicate more serious (unrecoverable) errors.

    This patch also solves a problem with the ioctl handling code in
    vl42-ioctl.c, which does not copy buffer identification data back to the
    userspace when EIO is returned, so there is no way for applications
    to discover on which buffer the operation failed in such cases.

    Signed-off-by: Pawel Osciak
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mauro Carvalho Chehab

    Pawel Osciak
     
  • Signed-off-by: Ricardo Maraschini
    Signed-off-by: Mauro Carvalho Chehab

    Ricardo Maraschini
     
  • This is a patch to the cx25821-i2c.c file that fixes warning and errors found by checkpatch.pl tool

    [mchehab@redhat.com: fix conflicts with changeset 2587a7ef7b8bc3c7db7c43659297b45b168922ab]
    Signed-off-by: sai
    Signed-off-by: Mauro Carvalho Chehab

    sai
     
  • This patch fixes all the coding style issues reported by checkpatch.pl tool

    Signed-off-by: sai
    Signed-off-by: Mauro Carvalho Chehab

    sai
     
  • This is a patch to cx25821-alsa.c file that fixes of most of the
    warning & errors found by checkpatch.pl tool

    [mchehab@redhat.com: Fix conflicts with changeset 4e0c923a0d23f86c7331b32bc2aeb280e10e029e]
    Signed-off-by: sai gopal
    Signed-off-by: Mauro Carvalho Chehab

    sai gopal
     
  • Stanse found that in gp8psk_load_bcm4500fw there is missing a check for
    return value of kmalloc. Add one and bail out appropriatelly.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Mauro Carvalho Chehab

    Jiri Slaby
     
  • This patch reduces static stack usage of one of the 2 top offenders
    as listed by 'make checkstack':

    Building with CONFIG_FRAME_WARN=2048 produces:

    drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2224 bytes is larger than 2048 bytes

    and in 'make checkstack', the stack usage goes from:
    0x00000bbd dib3000mc_i2c_enumeration [dib3000mc]: 2232
    to unlisted with this patch.

    I don't have the hardware that is needed to test this patch.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Acked-by: Patrick Boettcher
    Signed-off-by: Mauro Carvalho Chehab

    Randy Dunlap
     
  • Signed-off-by: Andrew Morton
    Signed-off-by: Mauro Carvalho Chehab

    Andrew Morton
     
  • This patch reduces static stack usage of one of the 2 top offenders
    as listed by 'make checkstack':

    Building with CONFIG_FRAME_WARN=2048 produces:

    drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes

    and in 'make checkstack', the stack usage goes from:
    0x00002409 dib7000p_i2c_enumeration [dib7000p]: 2328
    to unlisted with this patch.

    Also change one caller of dib7000p_i2c_enumeration() to check its
    return value.

    I don't have the hardware that is needed to test this patch.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Mauro Carvalho Chehab

    Randy Dunlap
     
  • This patch introduces support for DVB-T for the following dibcom
    based card: Elgato EyeTV Diversity (USB-ID: 0fd9:0011)

    Support for the Elgato silver IR remote is added too (set parameter
    dvb_usb_dib0700_ir_proto=0)

    [w.sang@pengutronix.de: rebased to current linuxtv-master]
    Signed-off-by: Michael Müller
    Signed-off-by: Wolfram Sang
    Signed-off-by: Patrick Boettcher
    Signed-off-by: Mauro Carvalho Chehab

    Michael Müller
     
  • I have 3 IVC-200 cards (with 4 video channels on each).

    2 of the cards identify theirselves as 000[0-3]:a155 (ids already in
    cardlist) and another one identifies itself as 080[0-3]:a155, which ids
    were unknown so far.

    Note - it's IVC-200, not IVC-200G.

    Signed-off-by: Kirill Smelkov
    Signed-off-by: Mauro Carvalho Chehab

    Kirill Smelkov
     
  • This patch retrieve the correct mac address from the eeprom for TeVii
    S470 card.

    Signed-off-by: Pierre Gronlier
    Cc: Steven Toth
    Signed-off-by: Mauro Carvalho Chehab

    Pierre Gronlier
     
  • Serialize DVB initialization, to avoid it to happen while analog
    initialization is still happening.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • 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: Istvan Varga
    Signed-off-by: Mauro Carvalho Chehab

    Istvan Varga
     
  • Simplified from version 1, in that hacks heisted from ati_remote2.c
    aren't actually necessary, the real fix for too many repeats was
    from setting too long a timer release value (200ms) on repeats in
    mce mode -- this patch drops the release timeout to 33ms, matching
    the input subsystem default input_dev->rep[REP_PERIOD].

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • This is a follow-up to my prior patch implementing ir-core's
    change_protocol functionality in the imon driver, which eliminates
    a false warning when change_protocol is called without a specific
    protocol selected yet (i.e., still IR_TYPE_UNKNOWN). It also removes
    some extraneous blank lines getting spewn into dmesg.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • Convert drivers/media/video/cx231xx/cx231xx-input.c to not
    rely on ir-functions.c.

    (I do not have the hardware so I can only compile test this)

    Signed-off-by: David Härdeman
    Cc: Srinivasa Deevi
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • Pulse-distance is not a protocol, it is a line coding (used by some protocols,
    like NEC). Looking at the uses of IR_TYPE_PD, the real protocol seems to be
    NEC in all cases (drivers/media/video/cx88/cx88-input.c is the only user).

    So, remove IR_TYPE_PD while it is still easy to do so.

    Signed-off-by: David Härdeman
    Signed-off-by: Mauro Carvalho Chehab

    David Härdeman
     
  • Drop the imon driver's internal protocol definitions in favor of using
    those provided by ir-core. Should make ir-keytable Just Work for
    switching protocol on the fly on the imon devices that support both the
    native imon remotes and mce remotes.

    The imon-no-pad-stabilize pseudo-protocol was dropped as a protocol, and
    converted to a separate modprobe option (which it probably should have
    been in the first place). On the TODO list is to convert this to an as yet
    unwritten protocol-specific options framework.

    While the mce remotes obviously map to IR_TYPE_RC6, I've yet to look at
    what the actual ir signals from the native imon remotes are, so for the
    moment, imon native ir is mapped to IR_TYPE_OTHER. Nailing it down more
    accurately is also on the TODO list.

    Signed-off-by: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Jarod Wilson
     
  • Signed-off-by: Laurent Pinchart
    Acked-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • spin_is_locked() always returns zero when spinlock debugging is
    disabled on a single CPU machine. Replace WARN_ON() with
    assert_spin_locked().

    Thanks to Laurent Pinchart for spotting this!

    Signed-off-by: Sakari Ailus
    Acked-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Sakari Ailus
     
  • Randy Dunlap reported a breakage while compiling
    drivers/staging/tm6000, due to this change:
    commit 1c1b78bee1a94f98deeb9c24b21c4812e191646c
    Author: Greg Kroah-Hartman
    Date: Thu Apr 29 15:46:07 2010 -0700

    USB: remove unused usb_buffer_alloc and usb_buffer_free macros

    Now that all callers are converted over, remove the compatibility
    functions and all is good.

    As the function got renamed, the rename should also be applied at
    tm6000.

    Acked-by: Randy Dunlap
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The values for the fourcc format were correct, but applied to the
    wrong register. With this change, video is now barely working again with
    tm6000.

    While here, let's remove, for now, the memset. This way, people can
    have some image when testing this device.

    Yet to be fixed: parts of the image frame are missed. As we don't clean
    the buffers anymore, this is "recovered" by repeating the values from a
    previous frame. The quality is bad, since the image pixels will contain
    data from some previous frames, generating weird delay artifacts.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • fix coding style issues

    [mchehab@redhat.com: Fix conflicts with other patches]
    Signed-off-by: Roel Van Nyen
    Signed-off-by: Mauro Carvalho Chehab

    Roel Van Nyen
     
  • renaming tm6000-xc3028.fw to xc3028-v24.fw

    Signed-off-by: Stefan Ringel
    Signed-off-by: Mauro Carvalho Chehab

    Stefan Ringel
     
  • - change values in function tm6000_set_fourcc_format
    - disable digital source
    - add vbi and audio init

    Signed-off-by: Stefan Ringel
    Signed-off-by: Mauro Carvalho Chehab

    Stefan Ringel
     
  • tm6000 tm6000_irq_callback :urb resubmit failed (error=-1)
    BUG: unable to handle kernel paging request at 000000000100f700
    IP: [] tm6000_irq_callback+0x51e/0xac7 [tm6000]

    (gdb) list * tm6000_irq_callback+0x51e
    0x2e79 is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:363).
    358 dev->isoc_ctl.tmp_buf_len--;
    359 }
    360 if (dev->isoc_ctl.tmp_buf_len) {
    361 memcpy (&header,p,
    362 dev->isoc_ctl.tmp_buf_l$
    363 memcpy (((u8 *)header)+
    364 dev->isoc_ctl.tmp_buf,
    365 ptr,
    366 4-dev->isoc_ctl.tmp_buf$
    367 ptr+=4-dev->isoc_ctl.tmp_buf_le$

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Changing a video standard takes a long time to happen on tm6000, since it
    needs to load another firmware, and the i2c implementation on this device
    is really slow. When the driver tries to change the video standard, a
    kernel panic is produced:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
    IP: [] tm6000_irq_callback+0x57f/0xac2 [tm6000]
    ...
    Kernel panic - not syncing: Fatal exception in interrupt

    By inspecting it with gdb:

    (gdb) list *tm6000_irq_callback+0x57f
    0x348a is in tm6000_irq_callback (drivers/staging/tm6000/tm6000-video.c:202).
    197 /* FIXME: move to tm6000-isoc */
    198 static int last_line = -2, start_line = -2, last_field = -2;
    199
    200 /* FIXME: this is the hardcoded window size
    201 */
    202 unsigned int linewidth = (*buf)->vb.width << 1;
    203
    204 if (!dev->isoc_ctl.cmd) {
    205 c = (header >> 24) & 0xff;
    206

    Clearly, it was the trial to access *buf, at line 202 that caused the
    Panic.

    As ioctl is serialized, While S_STD is handled,QBUF/DQBUF won't be called.
    So, the driver will run out of the buffers, and *buf will become NULL.

    As, on tm6000, the same URB can contain more than one video buffer, it is
    likely to hit a condition where no new buffer is available whily copying
    the streams. The fix is to leave the URB copy loop, if there's no more buffers
    are available.

    The same bug could also be produced by an application that is not fast enough
    to request new video buffers.

    The same bug were reported by Bee Hock Goh .

    Thanks-to: Bee Hock Goh for reporting the bug
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Although the code is getting the better alternates, it is not really using
    it. Get the interface/alternate numbers and use it where needed.

    This patch implements also one small fix at the last_line set, as
    proposed by Bee Hock Goh .

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Signed-off-by: Bee Hock Goh
    Signed-off-by: Mauro Carvalho Chehab

    Bee Hock Goh
     
  • Set correct limit for I2C packet.
    Use different method for the tm5600/tm6000 and tm6010 to read word.

    [mchehab@redhat.com: Fix CodingStyle]
    Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
    Signed-off-by: Mauro Carvalho Chehab

    Dmitri Belimov
     
  • Signed-off-by: Jean-François Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-François Moine
     
  • Brightness is done by the gamma tables and not by single bridge registers.
    It will be back as soon as an algorithm will be found.

    This change also fixes the autogain problem found by Jose Alberto Reguero
    (webcam 046d:08dd).

    Signed-off-by: Jean-François Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-François Moine
     
  • The error was introduced by "gspca - zc3xx: Rename the USB sequences."
    in commit e945e2e44c798f84494260c02478d3c23965bb93.

    Signed-off-by: Jean-François Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-François Moine
     
  • The webcams 0c45:613e may contain the sensors ov7630 or soi768.
    A sensor probe is done at init time when the sensor is declared ov7630.

    Signed-off-by: Jean-François Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-François Moine
     
  • Signed-off-by: Jean-François Moine
    Signed-off-by: Mauro Carvalho Chehab

    Jean-François Moine