22 Aug, 2012

1 commit

  • Pull media fixes from Mauro Carvalho Chehab:
    "For bug fixes, at soc_camera, si470x, uvcvideo, iguanaworks IR driver,
    radio_shark Kbuild fixes, and at the V4L2 core (radio fixes)."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] media: soc_camera: don't clear pix->sizeimage in JPEG mode
    [media] media: mx2_camera: Fix clock handling for i.MX27
    [media] video: mx2_camera: Use clk_prepare_enable/clk_disable_unprepare
    [media] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare
    [media] media: mx3_camera: buf_init() add buffer state check
    [media] radio-shark2: Only compile led support when CONFIG_LED_CLASS is set
    [media] radio-shark: Only compile led support when CONFIG_LED_CLASS is set
    [media] radio-shark*: Call cancel_work_sync from disconnect rather then release
    [media] radio-shark*: Remove work-around for dangling pointer in usb intfdata
    [media] Add USB dependency for IguanaWorks USB IR Transceiver
    [media] Add missing logging for rangelow/high of hwseek
    [media] VIDIOC_ENUM_FREQ_BANDS fix
    [media] mem2mem_testdev: fix querycap regression
    [media] si470x: v4l2-compliance fixes
    [media] DocBook: Remove a spurious character
    [media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer

    Linus Torvalds
     

18 Aug, 2012

3 commits

  • This structure needs to always stick around, even if CONFIG_HOTPLUG
    is disabled, otherwise we can oops when trying to probe a device that
    was added after the structure is thrown away.

    Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.

    Reported-by: Fengguang Wu
    Reported-by: Bjørn Mork
    Cc: stable
    CC: Hans de Goede
    CC: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This structure needs to always stick around, even if CONFIG_HOTPLUG
    is disabled, otherwise we can oops when trying to probe a device that
    was added after the structure is thrown away.

    Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.

    Reported-by: Fengguang Wu
    Reported-by: Bjørn Mork
    Cc: stable
    CC: Hans de Goede
    CC: Mauro Carvalho Chehab
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This structure needs to always stick around, even if CONFIG_HOTPLUG
    is disabled, otherwise we can oops when trying to probe a device that
    was added after the structure is thrown away.

    Thanks to Fengguang Wu and Bjørn Mork for tracking this issue down.

    Reported-by: Fengguang Wu
    Reported-by: Bjørn Mork
    Cc: stable
    CC: Mauro Carvalho Chehab
    CC: Michael Krufky
    CC: Paul Gortmaker
    CC: Doron Cohen
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

16 Aug, 2012

5 commits

  • In JPEG mode, the size of image is variable due to different JPEG compression
    rate. We only can get the pix->sizeimage from the user.

    If we clear pix->sizeimage in soc_camera_try_fmt() then we will get it from:
    ret = soc_mbus_image_size(xlate->host_fmt, pix->bytesperline,
    pix->height);
    if (ret < 0)
    return ret;

    pix->sizeimage = max_t(u32, pix->sizeimage, ret);

    In general, this sizeimage will be larger than the actul JPEG image size.

    But vb2 will check the buffer and size of image in __qbuf_userptr():
    /* Check if the provided plane buffer is large enough */
    if (planes[plane].length < q->plane_sizes[plane])

    So we shouldn't clear the pix->sizeimage and also shouldn't re-calculate
    the pix->sizeimage in soc_mbus_image_size() in JPEG mode

    We also shouldn't re-calculate pix->bytesperline:
    ret = soc_mbus_bytes_per_line(pix->width, xlate->host_fmt);
    if (ret < 0)
    return ret;

    pix->bytesperline = max_t(u32, pix->bytesperline, ret);

    pix->bytesperline also should be set by the user or by the driver's
    try_fmt() implementation.

    Change-Id: I700690a2287346127a624b5260922eaa5427a596

    Signed-off-by: Albert Wang
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Albert Wang
     
  • On i.MX27 two clocks are required: emma-ipg and emma-ahb. The ahb clock
    has to be requested using both a device and a connection ID.

    Signed-off-by: Javier Martin
    [g.liakhovetski@gmx.de: rebase to the current media tree]
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Javier Martin
     
  • Prepare the clock before enabling it.

    Cc: Guennadi Liakhovetski
    Cc:
    Signed-off-by: Fabio Estevam
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Fabio Estevam
     
  • Prepare the clock before enabling it.

    Cc: Guennadi Liakhovetski
    Cc:
    Signed-off-by: Fabio Estevam
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Fabio Estevam
     
  • This patch checks the state of the buffer when calling .buf_init() method.
    This is needed for the USERPTR buffer type, because in that case
    .buf_init() is called every time a buffer is queued, and not only once
    during the preparation stage, like in the MMAP case. Without this check
    buffers get initialised repeatedly, which also leads to the allocation
    of new DMA descriptors, of which there is only a final relatively small
    number available. Both MMAP and USERPTR methods were successfully tested.

    Signed-off-by: Alex Gershgorin
    [g.liakhovetski@gmx.de: remove mx3_camera_buffer::state completely]
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Mauro Carvalho Chehab

    Alex Gershgorin
     

13 Aug, 2012

4 commits


12 Aug, 2012

5 commits


11 Aug, 2012

1 commit

  • Buffers marked as erroneous are recycled immediately by the driver if
    the nodrop module parameter isn't set. The buffer payload size is reset
    to 0, but the buffer bytesused field isn't. This results in the buffer
    being immediately considered as complete, leading to an infinite loop in
    interrupt context.

    Fix the problem by resetting the bytesused field when recycling the
    buffer.

    Cc:
    Signed-off-by: Jayakrishnan Memana
    Signed-off-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Jayakrishnan Memana
     

01 Aug, 2012

2 commits

  • Pull second set of media updates from Mauro Carvalho Chehab:

    - radio API: add support to work with radio frequency bands

    - new AM/FM radio drivers: radio-shark, radio-shark2

    - new Remote Controller USB driver: iguanair

    - conversion of several drivers to the v4l2 core control framework

    - new board additions at existing drivers

    - the remaining (and vast majority of the patches) are due to
    drivers/DocBook fixes/cleanups.

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (154 commits)
    [media] radio-tea5777: use library for 64bits div
    [media] tlg2300: Declare MODULE_FIRMWARE usage
    [media] lgs8gxx: Declare MODULE_FIRMWARE usage
    [media] xc5000: Add MODULE_FIRMWARE statements
    [media] s2255drv: Add MODULE_FIRMWARE statement
    [media] dib8000: move dereference after check for NULL
    [media] Documentation: Update cardlists
    [media] bttv: add support for Aposonic W-DVR
    [media] cx25821: Remove bad strcpy to read-only char*
    [media] pms.c: remove duplicated include
    [media] smiapp-core.c: remove duplicated include
    [media] via-camera: pass correct format settings to sensor
    [media] rtl2832.c: minor cleanup
    [media] Add support for the IguanaWorks USB IR Transceiver
    [media] Minor cleanups for MCE USB
    [media] drivers/media/dvb/siano/smscoreapi.c: use list_for_each_entry
    [media] Use a named union in struct v4l2_ioctl_info
    [media] mceusb: Add Twisted Melon USB IDs
    [media] staging/media/solo6x10: use module_pci_driver macro
    [media] staging/media/dt3155v4l: use module_pci_driver macro
    ...

    Conflicts:
    Documentation/feature-removal-schedule.txt

    Linus Torvalds
     
  • drivers/built-in.o: In function `radio_tea5777_set_freq':
    radio-tea5777.c:(.text+0x4d8704): undefined reference to `__udivdi3'

    Reported-by: Randy Dunlap
    Cc: Hans de Goede
    Acked-by: Randy Dunlap
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

31 Jul, 2012

19 commits

  • Cc: Huang Shijie
    Cc: Kang Yong
    Cc: Zhang Xiaobing
    Cc: Mauro Carvalho Chehab
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Tim Gardner
    Acked-by: Huang Shijie
    Signed-off-by: Mauro Carvalho Chehab

    Tim Gardner
     
  • Cc: Mauro Carvalho Chehab
    Cc: Hans Verkuil
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Tim Gardner
    Signed-off-by: Mauro Carvalho Chehab

    Tim Gardner
     
  • This will make modinfo more useful with regard
    to discovering necessary firmware files.

    Cc: Mauro Carvalho Chehab
    Cc: Michael Krufky
    Cc: Eddi De Pieri
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Tim Gardner
    Signed-off-by: Mauro Carvalho Chehab

    Tim Gardner
     
  • Cc: Mauro Carvalho Chehab
    Cc: Dean Anderson
    Cc: Hans Verkuil
    Cc: Dan Carpenter
    Cc: Hans de Goede
    Cc: linux-media@vger.kernel.org
    Signed-off-by: Tim Gardner
    Signed-off-by: Mauro Carvalho Chehab

    Tim Gardner
     
  • My static checker complains that we dereference "state" inside the call
    to fft_to_mode() before checking for NULL. The comments say that it is
    possible for "state" to be NULL so I have moved the dereference after
    the check.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Mauro Carvalho Chehab

    Dan Carpenter
     
  • Forwarded-by: Gerd Hoffmann
    Signed-off-by: Mauro Carvalho Chehab

    Tony Gentile
     
  • The strcpy was being used to set the name of the board.
    This was both wrong and redundant,
    since the destination char* was read-only and
    the name is set statically at compile time.

    The type of the name field is changed to const char*
    to prevent future errors.

    Reported-by: Radek Masin
    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Mauro Carvalho Chehab

    Ezequiel García
     
  • Pull media updates from Mauro Carvalho Chehab:
    "This is the first part of the media patches for v3.6.

    This patch series contain:
    - new DVB frontend: rtl2832
    - new video drivers: adv7393
    - some unused files got removed
    - a selection API cleanup between V4L2 and V4L2 subdev API's
    - a major redesign at v4l-ioctl2, in order to clean it up
    - several driver fixes and improvements."

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (174 commits)
    v4l: Export v4l2-common.h in include/linux/Kbuild
    media: Revert "[media] Terratec Cinergy S2 USB HD Rev.2"
    [media] media: Use pr_info not homegrown pr_reg macro
    [media] Terratec Cinergy S2 USB HD Rev.2
    [media] v4l: Correct conflicting V4L2 subdev selection API documentation
    [media] Feature removal: V4L2 selections API target and flag definitions
    [media] v4l: Unify selection flags documentation
    [media] v4l: Unify selection flags
    [media] v4l: Common documentation for selection targets
    [media] v4l: Unify selection targets across V4L2 and V4L2 subdev interfaces
    [media] v4l: Remove "_ACTUAL" from subdev selection API target definition names
    [media] V4L: Remove "_ACTIVE" from the selection target name definitions
    [media] media: dvb-usb: print mac address via native %pM
    [media] s5p-tv: Use module_i2c_driver in sii9234_drv.c file
    [media] media: gpio-ir-recv: add allowed_protos for platform data
    [media] s5p-jpeg: Use module_platform_driver in jpeg-core.c file
    [media] saa7134: fix spelling of detach in label
    [media] cx88-blackbird: replace ioctl by unlocked_ioctl
    [media] cx88: don't use current_norm
    [media] cx88: fix a number of v4l2-compliance violations
    ...

    Linus Torvalds
     
  • Signed-off-by: Duan Jiong
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

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

    Duan Jiong
     
  • The code attempts to maintain a "user format" and a "sensor format",
    but in this case it looks like a typo is passing the user format down
    to the sensor.

    This was preventing display of video at anything other than 640x480.

    Signed-off-by: Daniel Drake
    Signed-off-by: Mauro Carvalho Chehab

    Daniel Drake
     
  • The current formulation of the bw_params loop uses the counter j as an
    index for the first dimension of the bw_params array which is later
    incremented by the variable i. It is evaluated correctly only, because j
    is initialized to 0 at the beginning of the loop. I think that
    explicitly using the index 0 better reflects the intent of the
    expression.

    Signed-off-by: Hans-Frieder Vogt
    Signed-off-by: Mauro Carvalho Chehab

    Hans-Frieder Vogt
     
  • Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     
  • Signed-off-by: Sean Young
    Cc: Jarod Wilson
    Signed-off-by: Mauro Carvalho Chehab

    Sean Young
     
  • Use list_for_each_entry and perform some other induced simplifications.

    The semantic match that finds the opportunity for this reorganization is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    struct list_head *pos;
    struct list_head *head;
    statement S;
    @@

    *for (pos = (head)->next; pos != (head); pos = pos->next)
    S
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Hi Mauro,

    struct v4l2_ioctl_info uses an anonymous union, which is initialized
    in the v4l2_ioctls table.

    Unfortunately gcc < 4.6 uses a non-standard syntax for that, so trying to
    compile v4l2-ioctl.c with an older gcc will fail.

    It is possible to work around this by testing the gcc version, but in this
    case it is easier to make the union named since it is used in only a few
    places.

    Signed-off-by: Hans Verkuil
    Reported-by: Randy Dunlap
    Acked-by: Randy Dunlap
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Add USB identifiers for MCE compatible I/R transceivers from Twisted Melon.

    Signed-off-by: Mark Lord
    Signed-off-by: Mauro Carvalho Chehab

    Mark Lord
     
  • Use memweight() to count the total number of bits set in memory area.

    Signed-off-by: Akinobu Mita
    Acked-by: Laurent Pinchart
    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • changes:
    1. wrap some lines that are longer than 80 characters.
    2. remove local function prototype declarations which do not
    need.
    3. replace TAB character with a space character in function
    comments.

    Signed-off-by: Du, Changbin
    Signed-off-by: Mauro Carvalho Chehab

    Du, Changbin