Re: [PATCH v4 01/22] [media] em28xx: move some video-specific functions to em28xx-video

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Now that we want to split the video handling to a separate module, move all video-specific functions to em28xx-video. No functional changes. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com ---

Re: [PATCH v4 02/22] [media] em28xx: some cosmetic changes

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: In order to make easier for the next patches, do some cosmetic changes. No functional changes. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-cards.c | 2 +-

Re: [PATCH v4 03/22] [media] em28xx: move analog-specific init to em28xx-video

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: There are several init code inside em28xx-cards that are actually part of analog initialization. Move the code to em28x-video, in order to remove part of the mess. In thesis, no functional changes so far. Signed-off-by: Mauro Carvalho

Re: [PATCH v4 04/22] [media] em28xx: make em28xx-video to be a separate module

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Now that all analog-specific code are at em28xx-video, convert it into an em28xx extension and load it as a separate module. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/Kconfig | 6 ++-

Re: [PATCH v4 05/22] [media] em28xx: initialize analog I2C devices at the right place

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: In order to initialize the analog tuner, v4l2 should be registere first, or otherwise we get an oops: [ 51.783537] BUG: unable to handle kernel NULL pointer dereference at ) [ 51.784479] IP: [81319fbb]

Re: [PATCH v4 06/22] [media] em28xx: add warn messages for timeout

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: changeset 45f04e82d035 added a logic to check if em28xx got a timeout on an I2C transfer. That patch started to produce a series of errors that is present with HVR-950, like: [ 4032.218656] xc2028 19-0061: Error on line 1299: -19

Re: [PATCH v4 07/22] [media] em28xx: improve extension information messages

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Add a message with consistent prints before and after each extension initialization, and provide a better text for module load. While here, add a missing sanity check for extension finish code at em28xx-v4l extension. Signed-off-by: Mauro

Re: [PATCH v4 08/22] [media] em28xx: convert i2c wait completion logic to use jiffies

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: The I2C wait completion/timeout logic currently assumes that msleep(5) will wait exaclty 5 ms. This is not true at all, as it depends on CONFIG_HZ. Convert it to use jiffies, in order to not wait for more time than needed. Signed-off-by:

Re: [PATCH v4 09/22] [media] tvp5150: make read operations atomic

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Instead of using two I2C operations between write and read, use just one i2c_transfer. That allows I2C mutexes to not let any other I2C transfer between the two. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com ---

Re: [PATCH v4 10/22] [media] tuner-xc2028: remove unused code

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: This macro is not used. remove it. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/tuners/tuner-xc2028.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/media/tuners/tuner-xc2028.c

Re: [PATCH v4 11/22] [media] em28xx: check if a device has audio earlier

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Better to split chipset detection from the audio setup. So, move the detection code to em28xx_init_dev(). Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-cards.c | 11 +++

Re: [PATCH v4 12/22] [media] em28xx: properly implement AC97 wait code

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Instead of assuming that msleep() is precise, use a jiffies based code to wait for AC97 to be available. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-core.c | 7 +--

Re: [PATCH v4 13/22] [media] em28xx: initialize audio latter

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Better to first write the GPIOs of the input mux, before initializing the audio. Why are you making this change ? Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-video.c | 40

Re: [PATCH v4 14/22] [media] em28xx: unify module version

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Use the same module version on all em28xx sub-modules, and use the same naming convention to describe the driver. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-audio.c | 3 ++-

Re: [PATCH v4 15/22] [media] em28xx: Fix em28xx deplock

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: When em28xx extensions are loaded/removed, there are two locks: a single static em28xx_devlist_mutex that registers each extension and the struct em28xx dev-lock. When extensions are registered, em28xx_devlist_mutex is taken first, and

Re: [PATCH RFC v6 10/12] DocBook: document 1 Hz flag

2014-01-05 Thread Hans Verkuil
More small fixes: On 12/29/2013 05:04 AM, Antti Palosaari wrote: Update documention to reflect 1 Hz frequency step flag. documention - documentation Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- .../DocBook/media/v4l/vidioc-enum-freq-bands.xml

Re: [PATCH RFC v6 11/12] DocBook: Software Defined Radio Interface

2014-01-05 Thread Hans Verkuil
More small fixes: On 12/29/2013 05:04 AM, Antti Palosaari wrote: Document V4L2 SDR interface. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/DocBook/media/v4l/compat.xml | 10 ++ Documentation/DocBook/media/v4l/dev-sdr.xml

Re: [PATCH RFC v6 07/12] v4l: add device capability flag for SDR receiver

2014-01-05 Thread Hans Verkuil
On 12/29/2013 05:03 AM, Antti Palosaari wrote: VIDIOC_QUERYCAP IOCTL is used to query device capabilities. Add new capability flag to inform given device supports SDR capture. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi Acked-by: Hans Verkuil

Re: [PATCH 3/6] msi3101: add u8 sample format

2014-01-05 Thread Hans Verkuil
On 12/29/2013 05:51 AM, Antti Palosaari wrote: Add unsigned 8-bit sample format. Format is got directly from hardware, but it is converted from signed to unsigned. It is worst known sampling resolution hardware offer. Signed-off-by: Antti Palosaari cr...@iki.fi ---

Re: [PATCH RFC v6 12/12] v4l2-framework.txt: add SDR device type

2014-01-05 Thread Hans Verkuil
On 12/29/2013 05:04 AM, Antti Palosaari wrote: Add SDR device type to v4l2-framework.txt document. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- Documentation/video4linux/v4l2-framework.txt | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v4 04/22] [media] em28xx: make em28xx-video to be a separate module

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:47:00 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Now that all analog-specific code are at em28xx-video, convert it into an em28xx extension and load it as a separate module. Signed-off-by: Mauro

Re: [PATCH v4 06/22] [media] em28xx: add warn messages for timeout

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:51:44 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: changeset 45f04e82d035 added a logic to check if em28xx got a timeout on an I2C transfer. That patch started to produce a series of errors that is

Re: [PATCH v4 07/22] [media] em28xx: improve extension information messages

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:55:34 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Add a message with consistent prints before and after each extension initialization, and provide a better text for module load. While here, add a

Re: [PATCH v4 08/22] [media] em28xx: convert i2c wait completion logic to use jiffies

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 12:03:51 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: The I2C wait completion/timeout logic currently assumes that msleep(5) will wait exaclty 5 ms. This is not true at all, as it depends on CONFIG_HZ.

Re: [PATCH v4 13/22] [media] em28xx: initialize audio latter

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 12:29:11 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Better to first write the GPIOs of the input mux, before initializing the audio. Why are you making this change ? Signed-off-by: Mauro Carvalho

Re: [PATCH v4 12/22] [media] em28xx: properly implement AC97 wait code

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 12:19:41 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Instead of assuming that msleep() is precise, use a jiffies based code to wait for AC97 to be available. Signed-off-by: Mauro Carvalho Chehab

Re: [PATCH v4 11/22] [media] em28xx: check if a device has audio earlier

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 12:12:34 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Better to split chipset detection from the audio setup. So, move the detection code to em28xx_init_dev(). Signed-off-by: Mauro Carvalho Chehab

Re: [PATCH v4 06/22] [media] em28xx: add warn messages for timeout

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:51:44 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: changeset 45f04e82d035 added a logic to check if em28xx got a timeout on an I2C transfer. That patch started to produce a series of errors that is

Re: [PATCH v4 01/22] [media] em28xx: move some video-specific functions to em28xx-video

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:11:20 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Now that we want to split the video handling to a separate module, move all video-specific functions to em28xx-video. No functional changes.

Re: [PATCH v4 03/22] [media] em28xx: move analog-specific init to em28xx-video

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:26:14 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: There are several init code inside em28xx-cards that are actually part of analog initialization. Move the code to em28x-video, in order to remove part

[PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register

2014-01-05 Thread Mauro Carvalho Chehab
Fix the error handling logic, making it to unregister i2c bus 0, in case of a failure to register the second bus. Reported-by: Frank Schäfer fschaefer@googlemail.com Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-cards.c | 3 +++ 1 file

Re: [PATCH v4 04/22] [media] em28xx: make em28xx-video to be a separate module

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 10:56:33 -0200 Mauro Carvalho Chehab m.che...@samsung.com escreveu: Em Sun, 05 Jan 2014 11:47:00 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Now that all analog-specific code are at em28xx-video,

Re: [PATCH v4 07/22] [media] em28xx: improve extension information messages

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:08:22 -0200 Mauro Carvalho Chehab m.che...@samsung.com escreveu: Em Sun, 05 Jan 2014 11:55:34 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Add a message with consistent prints before and after each

Re: [PATCH v4 12/22] [media] em28xx: properly implement AC97 wait code

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 11:20:02 -0200 Mauro Carvalho Chehab m.che...@samsung.com escreveu: Em Sun, 05 Jan 2014 12:19:41 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Instead of assuming that msleep() is precise, use a jiffies

[PATCH] em28xx: rename I2C timeout to EM28XX_I2C_XFER_TIMEOUT

2014-01-05 Thread Mauro Carvalho Chehab
This macro is used by all em28xx devices, and not just em2800. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-i2c.c | 6 +++--- drivers/media/usb/em28xx/em28xx.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v4 16/22] [media] em28xx: use a better value for I2C timeouts

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: In the lack of a better spec, let's assume the timeout values compatible with SMBus spec: http://smbus.org/specs/smbus110.pdf at chapter 8 - Electrical Characteristics of SMBus devices Ok, SMBus is a subset of I2C, and not all

Re: [PATCH v4 17/22] [media] em28xx-i2c: Fix error code for I2C error transfers

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: The proper error code for I2C errors are EREMOTEIO. The em28xx driver is using EIO instead. Replace all occurrences of EIO at em28xx-i2c, in order to fix it. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com ---

Re: [PATCH v4 18/22] [media] em28xx: don't return -ENODEV for I2C xfer errors

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: -ENODEV reports a permanent condition where a device is not found, and used only during device probing or device removal, as stated at the V4L2 spec: http://linuxtv.org/downloads/v4l-dvb-apis/gen_errors.html Except during device

Re: [PATCH v4 19/22] [media] em28xx: cleanup I2C debug messages

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: The I2C output messages is too polluted. Clean it a little bit, by: - use the proper core support for memory dumps; - hide most stuff under the i2c_debug umbrella; - add the missing KERN_CONT where needed; - use 2

Re: [PATCH v4 20/22] [media] em28xx: use usb_alloc_coherent() for audio

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: Instead of allocating transfer buffers with kmalloc() use usb_alloc_coherent(). That makes it work also with arm CPUs. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-audio.c | 31

Re: [PATCH v4 16/22] [media] em28xx: use a better value for I2C timeouts

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 21:38:31 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: In the lack of a better spec, let's assume the timeout values compatible with SMBus spec: http://smbus.org/specs/smbus110.pdf at chapter 8 -

Re: [PATCH v4 21/22] [media] em28xx-audio: allocate URBs at device driver init

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: From: Mauro Carvalho Chehab mche...@redhat.com Is this line still correct ? ;) Instead of allocating/deallocating URBs and transfer buffers every time stream is started/stopped, just do it once. That reduces the memory allocation pressure

Re: [PATCH v4 22/22] [media] em28xx: retry read operation if it fails

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: I2C read operations can also take some time to happen. Try again, if it fails with return code different than 0x10 until timeout. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-i2c.c | 62

Re: [PATCH] em28xx: unregister i2c bus 0 if bus 1 fails to register

2014-01-05 Thread Frank Schäfer
Am 05.01.2014 13:05, schrieb Mauro Carvalho Chehab: Fix the error handling logic, making it to unregister i2c bus 0, in case of a failure to register the second bus. Reported-by: Frank Schäfer fschaefer@googlemail.com Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com ---

Re: [PATCH] em28xx: rename I2C timeout to EM28XX_I2C_XFER_TIMEOUT

2014-01-05 Thread Frank Schäfer
Am 05.01.2014 13:46, schrieb Mauro Carvalho Chehab: This macro is used by all em28xx devices, and not just em2800. Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com --- drivers/media/usb/em28xx/em28xx-i2c.c | 6 +++--- drivers/media/usb/em28xx/em28xx.h | 2 +- 2 files changed,

Re: [PATCH v4 RFC 1/2] [media] em28xx: retry I2C write ops if failed by timeout

2014-01-05 Thread Frank Schäfer
Am 04.01.2014 18:58, schrieb Markus Rechberger: Did you trace the i2c messages on the bus? This seems like papering the actual bug. The USB traces are clear: i2c status 0x10 is treated as _final_ i2c transfer status and the driver does _not_ retry. Yes, it's papering over the actual bug. We

Re: [PATCH v4 21/22] [media] em28xx-audio: allocate URBs at device driver init

2014-01-05 Thread Mauro Carvalho Chehab
Em Sun, 05 Jan 2014 22:02:40 +0100 Frank Schäfer fschaefer@googlemail.com escreveu: Am 04.01.2014 11:55, schrieb Mauro Carvalho Chehab: From: Mauro Carvalho Chehab mche...@redhat.com Is this line still correct ? ;) Instead of allocating/deallocating URBs and transfer buffers every

cron job: media_tree daily build: ERRORS

2014-01-05 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Mon Jan 6 04:00:26 CET 2014 git branch: test git hash: f7d40eea8e3e531f1517ab7eded552e8837ef5da gcc