Re: OMAP3 Multiple camera support

2014-09-18 Thread Laurent Pinchart
Hi Sriram,

On Wednesday 17 September 2014 23:06:42 Sriram V wrote:
 Hi
 
 Does OMAP3 camera driver support multiple cameras at the same time.
 
 As i understand - You can have simultaneous YUV422 (Directly to memory)
 and another one passing through camera controller ISP?
 
 I Also, wanted to check if anyone has tried having multiple cameras on omap3
 with the existing driver.

The driver does support capturing from multiple cameras at the same time, 
provided one of them is connected to the CSI2A receiver. You can then capture 
raw frames from the CSI2A receiver output while processing frames from the 
other camera (connected to CSI1/CCP2, CSI2C or parallel interface) using the 
whole ISP pipeline.

Please note that the consumer OMAP3 variants are documented by TI as not 
including the CSI receivers. However, several developers have reported that 
the receivers are present and usable at least in some of the chips.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP3 Multiple camera support

2014-09-18 Thread Sriram V
Hi Laurent,

What you are essentially saying is

CSI2A = Smart Sensor (YUV422)
CSI2C = Sensor that gives out RAW Bayer.

I guess this is a driver limitation? Am i correct?

Also, Can i have something like this?

SMART Sensor = CSI2A = H3A = MEM (Can i have this)
CSI2C = ISP = H3A = MEM

Can't i have H3A for both the pipelines?
Or

Can i enable H3A on the fly for both the sensors? One After the other?

Regards,
Sriram


On Thu, Sep 18, 2014 at 1:55 PM, Laurent Pinchart
laurent.pinch...@ideasonboard.com wrote:
 Hi Sriram,

 On Wednesday 17 September 2014 23:06:42 Sriram V wrote:
 Hi

 Does OMAP3 camera driver support multiple cameras at the same time.

 As i understand - You can have simultaneous YUV422 (Directly to memory)
 and another one passing through camera controller ISP?

 I Also, wanted to check if anyone has tried having multiple cameras on omap3
 with the existing driver.

 The driver does support capturing from multiple cameras at the same time,
 provided one of them is connected to the CSI2A receiver. You can then capture
 raw frames from the CSI2A receiver output while processing frames from the
 other camera (connected to CSI1/CCP2, CSI2C or parallel interface) using the
 whole ISP pipeline.

 Please note that the consumer OMAP3 variants are documented by TI as not
 including the CSI receivers. However, several developers have reported that
 the receivers are present and usable at least in some of the chips.

 --
 Regards,

 Laurent Pinchart




-- 
Regards,
Sriram
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: OMAP3 Multiple camera support

2014-09-18 Thread Laurent Pinchart
Hi Sriram,

On Thursday 18 September 2014 15:10:13 Sriram V wrote:
 Hi Laurent,
 
 What you are essentially saying is
 
 CSI2A = Smart Sensor (YUV422)
 CSI2C = Sensor that gives out RAW Bayer.

Not quite. You can have the following pipelines running in parallel.

Sensor A - CSI2A - memory
Sensor B - (CSI1/CCP2/CSI2C -) CCDC - preview - resizer - memory

The format captured at the CSI2A output will be set by the sensor. If you use 
a smart sensor that outputs YUV, you will capture YUV images. If you use a 
Bayer sensor, you will capture raw Bayer images. Which sensor to use will 
depend on your use case.

The second pipeline can use the whole ISP. I've showed the full pipeline, but 
you can capture frames at the output of the CCDC, preview engine or resizer, 
depending on your use case.

The H3A blocks are connected to the CCDC output, so they're only available to 
the second pipeline.

Another option would be to run three pipelines.

Sensor A - CSI2A - memory
Sensor B - CSI2C - memory
memory - CSI1/CCP2 - CCDC - preview - resizer - memory

(The second pipeline isn't supported by the driver now, but that's a software 
limitation only, it shouldn't be difficult to fix)

The third pipeline would then be multiplexed between the two sensors, your 
userspace application would push frames captured from sensors A and B 
alternatively through the memory-to-memory processing pipeline.

This will consume more memory bandwidth than the first option, whether it 
would work depends on the frame sizes and rates. Another disadvantage of this 
solution is that reconfiguring the processing pipeline for each frame will 
take time and thus lower the maximum possible frame rate (I don't have numbers 
though).

On the upside you will be able to use H3A for both sensors.

 I guess this is a driver limitation? Am i correct?
 
 Also, Can i have something like this?
 
 SMART Sensor = CSI2A = H3A = MEM (Can i have this)
 CSI2C = ISP = H3A = MEM
 
 Can't i have H3A for both the pipelines?
 Or
 
 Can i enable H3A on the fly for both the sensors? One After the other?

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Mauro Carvalho Chehab
This reverts commit 9241650d62f79a3da01f1d5e8ebd195083330b75.

The commit 9241650d62f7 was meant to solve a race issue that
affects Gstreamer version 0.10, when streaming for a long time.

It does that by returning POLERR if VB2 is not streaming.

However, it broke VBI userspace support on alevt and mtt (and maybe
other VBI apps), as they rely on the old behavior.

Due to that, we need to roll back and restore the previous behavior.

For more details, see:
https://bugzilla.kernel.org/show_bug.cgi?id=84401

So, let's rollback the change for now, and work on some other
fix for it.

Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: Hans Verkuil hans.verk...@cisco.com
Cc: Pawel Osciak pa...@osciak.com
Cc: Nicolas Dufresne nicolas.dufre...@collabora.com
Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com


--

v2: Just changed the description.

This is a regression that broke a core feature with most (all) VBI
apps. We should hurry sending a fix for it.

So, let's just revert the patch while we're discussing/testing a
solution that would solve Laurent's usecase scenario without breaking
VBI.

PS.: this patch should, of course, be c/c to 3.16 too, but I think we'll
need to do a manual backport, as the check for q-error is likely newer
than 3.16.

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 7e6aff673a5a..da2d0adcc992 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2583,10 +2583,10 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file 
*file, poll_table *wait)
}
 
/*
-* There is nothing to wait for if no buffer has been queued and the
-* queue isn't streaming, or if the error flag is set.
+* There is nothing to wait for if no buffer has been queued
+* or if the error flag is set.
 */
-   if ((list_empty(q-queued_list)  !vb2_is_streaming(q)) || q-error)
+   if (list_empty(q-queued_list) || q-error)
return res | POLLERR;
 
/*
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Hans Verkuil
Mauro,

This doesn't fix the problem *at all*.

See http://www.mail-archive.com/linux-media@vger.kernel.org/msg79474.html for
the right fix.

So for your patch:

Nacked-by: Hans Verkuil hans.verk...@cisco.com

Regards,

Hans

On 09/18/14 12:06, Mauro Carvalho Chehab wrote:
 This reverts commit 9241650d62f79a3da01f1d5e8ebd195083330b75.
 
 The commit 9241650d62f7 was meant to solve a race issue that
 affects Gstreamer version 0.10, when streaming for a long time.
 
 It does that by returning POLERR if VB2 is not streaming.
 
 However, it broke VBI userspace support on alevt and mtt (and maybe
 other VBI apps), as they rely on the old behavior.
 
 Due to that, we need to roll back and restore the previous behavior.
 
 For more details, see:
   https://bugzilla.kernel.org/show_bug.cgi?id=84401
 
 So, let's rollback the change for now, and work on some other
 fix for it.
 
 Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
 Cc: Hans Verkuil hans.verk...@cisco.com
 Cc: Pawel Osciak pa...@osciak.com
 Cc: Nicolas Dufresne nicolas.dufre...@collabora.com
 Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com
 
 
 --
 
 v2: Just changed the description.
 
 This is a regression that broke a core feature with most (all) VBI
 apps. We should hurry sending a fix for it.
 
 So, let's just revert the patch while we're discussing/testing a
 solution that would solve Laurent's usecase scenario without breaking
 VBI.
 
 PS.: this patch should, of course, be c/c to 3.16 too, but I think we'll
 need to do a manual backport, as the check for q-error is likely newer
 than 3.16.
 
 diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
 b/drivers/media/v4l2-core/videobuf2-core.c
 index 7e6aff673a5a..da2d0adcc992 100644
 --- a/drivers/media/v4l2-core/videobuf2-core.c
 +++ b/drivers/media/v4l2-core/videobuf2-core.c
 @@ -2583,10 +2583,10 @@ unsigned int vb2_poll(struct vb2_queue *q, struct 
 file *file, poll_table *wait)
   }
  
   /*
 -  * There is nothing to wait for if no buffer has been queued and the
 -  * queue isn't streaming, or if the error flag is set.
 +  * There is nothing to wait for if no buffer has been queued
 +  * or if the error flag is set.
*/
 - if ((list_empty(q-queued_list)  !vb2_is_streaming(q)) || q-error)
 + if (list_empty(q-queued_list) || q-error)
   return res | POLLERR;
  
   /*
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Mauro Carvalho Chehab
Em Thu, 18 Sep 2014 12:10:46 +0200
Hans Verkuil hansv...@cisco.com escreveu:

 Mauro,
 
 This doesn't fix the problem *at all*.
 
 See http://www.mail-archive.com/linux-media@vger.kernel.org/msg79474.html for
 the right fix.

I won't apply patch 1/4 on stable. It is simply too risky, as it changes
a behavior that is there for a very long time.

We can of course try this at topic/devel and play with it for a while,
testing with different applications and devices, but we need a quick
solution for the regression introduced on 3.16.



 
 So for your patch:
 
 Nacked-by: Hans Verkuil hans.verk...@cisco.com
 
 Regards,
 
   Hans
 
 On 09/18/14 12:06, Mauro Carvalho Chehab wrote:
  This reverts commit 9241650d62f79a3da01f1d5e8ebd195083330b75.
  
  The commit 9241650d62f7 was meant to solve a race issue that
  affects Gstreamer version 0.10, when streaming for a long time.
  
  It does that by returning POLERR if VB2 is not streaming.
  
  However, it broke VBI userspace support on alevt and mtt (and maybe
  other VBI apps), as they rely on the old behavior.
  
  Due to that, we need to roll back and restore the previous behavior.
  
  For more details, see:
  https://bugzilla.kernel.org/show_bug.cgi?id=84401
  
  So, let's rollback the change for now, and work on some other
  fix for it.
  
  Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
  Cc: Hans Verkuil hans.verk...@cisco.com
  Cc: Pawel Osciak pa...@osciak.com
  Cc: Nicolas Dufresne nicolas.dufre...@collabora.com
  Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com
  
  
  --
  
  v2: Just changed the description.
  
  This is a regression that broke a core feature with most (all) VBI
  apps. We should hurry sending a fix for it.
  
  So, let's just revert the patch while we're discussing/testing a
  solution that would solve Laurent's usecase scenario without breaking
  VBI.
  
  PS.: this patch should, of course, be c/c to 3.16 too, but I think we'll
  need to do a manual backport, as the check for q-error is likely newer
  than 3.16.
  
  diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
  b/drivers/media/v4l2-core/videobuf2-core.c
  index 7e6aff673a5a..da2d0adcc992 100644
  --- a/drivers/media/v4l2-core/videobuf2-core.c
  +++ b/drivers/media/v4l2-core/videobuf2-core.c
  @@ -2583,10 +2583,10 @@ unsigned int vb2_poll(struct vb2_queue *q, struct 
  file *file, poll_table *wait)
  }
   
  /*
  -* There is nothing to wait for if no buffer has been queued and the
  -* queue isn't streaming, or if the error flag is set.
  +* There is nothing to wait for if no buffer has been queued
  +* or if the error flag is set.
   */
  -   if ((list_empty(q-queued_list)  !vb2_is_streaming(q)) || q-error)
  +   if (list_empty(q-queued_list) || q-error)
  return res | POLLERR;
   
  /*
  
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] si2157: change command for sleep

2014-09-18 Thread Mauro Carvalho Chehab
Em Fri, 05 Sep 2014 11:34:01 +0300
Antti Palosaari cr...@iki.fi escreveu:

 Moikka Olli
 
 I ran some PM tests for that patch set, using PCTV 292e, which is em28xx 
 + Si2168 B40 + Si2157 A30. Here is results:
 
 current impementation
 -
 cold plugin 40 mA
 streaming  235 mA
 sleeping42 mA
 
 si2157: change command for sleep
 -
 cold plugin 40 mA
 streaming  235 mA
 sleeping60 mA
 
 So it increases sleep power usage surprisingly much, almost 20mA from 
 the USB, nominal 5V.
 
 It is also funny that you will not lose firmware for Si2168 when sleep 
 with command 13, but that Si2157 tuner behaves differently.
 
 I think I will still apply that, it is just firmware download time vs. 
 current use in sleep.

IMHO, the best is to keep it saving more power. Ok, it will take more
time to wake up but so what? If someone is putting the machine to sleep,
it is because he/she wants to save power.

So, IMHO, we should keep the default behavior as-is. Nothing prevents
that we would add a modprobe parameter or to use some other method that
would allow the user to choose between those two different ways.

Regards,
Mauro

 
 Antti
 
 
 On 08/25/2014 09:07 PM, Olli Salonen wrote:
  Instead of sending command 13 to the tuner, send command 16 when sleeping. 
  This
  behaviour is observed when using manufacturer provided binary-only Linux 
  driver
  for TechnoTrend CT2-4400 (Windows driver does not do power management).
 
  The issue with command 13 is that firmware loading is necessary after that.
  This is not an issue with tuners that do not require firmware, but resuming
  from sleep on an Si2158 takes noticeable time as firmware is loaded on 
  resume.
 
  Signed-off-by: Olli Salonen olli.salo...@iki.fi
  ---
drivers/media/tuners/si2157.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
 
  diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
  index efb5cce..c84f7b8 100644
  --- a/drivers/media/tuners/si2157.c
  +++ b/drivers/media/tuners/si2157.c
  @@ -197,9 +197,10 @@ static int si2157_sleep(struct dvb_frontend *fe)
 
  s-active = false;
 
  -   memcpy(cmd.args, \x13, 1);
  -   cmd.wlen = 1;
  -   cmd.rlen = 0;
  +   /* standby */
  +   memcpy(cmd.args, \x16\x00, 2);
  +   cmd.wlen = 2;
  +   cmd.rlen = 1;
  ret = si2157_cmd_execute(s, cmd);
  if (ret)
  goto err;
 
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] si2157: change command for sleep

2014-09-18 Thread Mauro Carvalho Chehab
Em Thu, 18 Sep 2014 08:22:33 -0300
Mauro Carvalho Chehab mche...@osg.samsung.com escreveu:

 Em Fri, 05 Sep 2014 11:34:01 +0300
 Antti Palosaari cr...@iki.fi escreveu:
 
  Moikka Olli
  
  I ran some PM tests for that patch set, using PCTV 292e, which is em28xx 
  + Si2168 B40 + Si2157 A30. Here is results:
  
  current impementation
  -
  cold plugin 40 mA
  streaming  235 mA
  sleeping42 mA
  
  si2157: change command for sleep
  -
  cold plugin 40 mA
  streaming  235 mA
  sleeping60 mA
  
  So it increases sleep power usage surprisingly much, almost 20mA from 
  the USB, nominal 5V.
  
  It is also funny that you will not lose firmware for Si2168 when sleep 
  with command 13, but that Si2157 tuner behaves differently.
  
  I think I will still apply that, it is just firmware download time vs. 
  current use in sleep.
 
 IMHO, the best is to keep it saving more power. Ok, it will take more
 time to wake up but so what? If someone is putting the machine to sleep,
 it is because he/she wants to save power.
 
 So, IMHO, we should keep the default behavior as-is. Nothing prevents
 that we would add a modprobe parameter or to use some other method that
 would allow the user to choose between those two different ways.

Sorry, I misunderstood this patch. 

There are actually two different things, each requiring a different PM
setting:

1) to put the tuner to sleep while it is not in usage;

2) put the machine to suspend.

This patch is for (1). That's FINE. I'll apply it.

Yet, for (2), assuming a suspend to ram, the best is to save more
power. 

In the past, the DVB core didn't make any distinction between those
two, but we recently added a hook for suspend there.

So, it makes sense to keep the tuner powerdown mode for suspend.

Regards,
Mauro.


 
 Regards,
 Mauro
 
  
  Antti
  
  
  On 08/25/2014 09:07 PM, Olli Salonen wrote:
   Instead of sending command 13 to the tuner, send command 16 when 
   sleeping. This
   behaviour is observed when using manufacturer provided binary-only Linux 
   driver
   for TechnoTrend CT2-4400 (Windows driver does not do power management).
  
   The issue with command 13 is that firmware loading is necessary after 
   that.
   This is not an issue with tuners that do not require firmware, but 
   resuming
   from sleep on an Si2158 takes noticeable time as firmware is loaded on 
   resume.
  
   Signed-off-by: Olli Salonen olli.salo...@iki.fi
   ---
 drivers/media/tuners/si2157.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
  
   diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
   index efb5cce..c84f7b8 100644
   --- a/drivers/media/tuners/si2157.c
   +++ b/drivers/media/tuners/si2157.c
   @@ -197,9 +197,10 @@ static int si2157_sleep(struct dvb_frontend *fe)
  
 s-active = false;
  
   - memcpy(cmd.args, \x13, 1);
   - cmd.wlen = 1;
   - cmd.rlen = 0;
   + /* standby */
   + memcpy(cmd.args, \x16\x00, 2);
   + cmd.wlen = 2;
   + cmd.rlen = 1;
 ret = si2157_cmd_execute(s, cmd);
 if (ret)
 goto err;
  
  
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] si2157: change command for sleep

2014-09-18 Thread Antti Palosaari

On 09/18/2014 02:50 PM, Mauro Carvalho Chehab wrote:

Sorry, I misunderstood this patch.

There are actually two different things, each requiring a different PM
setting:

1) to put the tuner to sleep while it is not in usage;

2) put the machine to suspend.

This patch is for (1). That's FINE. I'll apply it.

Yet, for (2), assuming a suspend to ram, the best is to save more
power.

In the past, the DVB core didn't make any distinction between those
two, but we recently added a hook for suspend there.

So, it makes sense to keep the tuner powerdown mode for suspend.



I think old deep sleep should be used for suspend, whilst on warm state 
that new is OK.


I2C driver has suspend/resume support and it is one thing I am going to 
study in near future. Currently I have 128GB SSD and no swap at all, so 
I cannot test it now. I have already bought 256GB SSD and I am just 
waiting for Fedora 21 alpha version, which I will install with proper 
swap. Unfortunately they have delayed many times already Fedora 21 alpha...


I am not even sure if DVB frontend needs any special suspend/resume 
handling, isn't it possible to use standard kernel PM here? (I already 
added some initial PM to DVB FE ~2 years ago, but IIRC those will only 
kill threads and so which are not allowed when suspend).


So is there some reason DVB FE needs suspend/resume hooks?


regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Hans Verkuil
My patch is the *only* fix for that since that's the one that addresses
the real issue.

One option is to merge my fix for 3.18 with a CC to stable for 3.16.

That way it will be in the tree for longer.

Again, the revert that you did won't solve the regression at all. Please
revert the revert.

Regards,

Hans

On 09/18/14 12:50, Mauro Carvalho Chehab wrote:
 Em Thu, 18 Sep 2014 12:10:46 +0200
 Hans Verkuil hansv...@cisco.com escreveu:
 
 Mauro,

 This doesn't fix the problem *at all*.

 See http://www.mail-archive.com/linux-media@vger.kernel.org/msg79474.html for
 the right fix.
 
 I won't apply patch 1/4 on stable. It is simply too risky, as it changes
 a behavior that is there for a very long time.
 
 We can of course try this at topic/devel and play with it for a while,
 testing with different applications and devices, but we need a quick
 solution for the regression introduced on 3.16.
 
 
 

 So for your patch:

 Nacked-by: Hans Verkuil hans.verk...@cisco.com

 Regards,

  Hans

 On 09/18/14 12:06, Mauro Carvalho Chehab wrote:
 This reverts commit 9241650d62f79a3da01f1d5e8ebd195083330b75.

 The commit 9241650d62f7 was meant to solve a race issue that
 affects Gstreamer version 0.10, when streaming for a long time.

 It does that by returning POLERR if VB2 is not streaming.

 However, it broke VBI userspace support on alevt and mtt (and maybe
 other VBI apps), as they rely on the old behavior.

 Due to that, we need to roll back and restore the previous behavior.

 For more details, see:
 https://bugzilla.kernel.org/show_bug.cgi?id=84401

 So, let's rollback the change for now, and work on some other
 fix for it.

 Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
 Cc: Hans Verkuil hans.verk...@cisco.com
 Cc: Pawel Osciak pa...@osciak.com
 Cc: Nicolas Dufresne nicolas.dufre...@collabora.com
 Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com


 --

 v2: Just changed the description.

 This is a regression that broke a core feature with most (all) VBI
 apps. We should hurry sending a fix for it.

 So, let's just revert the patch while we're discussing/testing a
 solution that would solve Laurent's usecase scenario without breaking
 VBI.

 PS.: this patch should, of course, be c/c to 3.16 too, but I think we'll
 need to do a manual backport, as the check for q-error is likely newer
 than 3.16.

 diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
 b/drivers/media/v4l2-core/videobuf2-core.c
 index 7e6aff673a5a..da2d0adcc992 100644
 --- a/drivers/media/v4l2-core/videobuf2-core.c
 +++ b/drivers/media/v4l2-core/videobuf2-core.c
 @@ -2583,10 +2583,10 @@ unsigned int vb2_poll(struct vb2_queue *q, struct 
 file *file, poll_table *wait)
 }
  
 /*
 -* There is nothing to wait for if no buffer has been queued and the
 -* queue isn't streaming, or if the error flag is set.
 +* There is nothing to wait for if no buffer has been queued
 +* or if the error flag is set.
  */
 -   if ((list_empty(q-queued_list)  !vb2_is_streaming(q)) || q-error)
 +   if (list_empty(q-queued_list) || q-error)
 return res | POLLERR;
  
 /*

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] si2157: change command for sleep

2014-09-18 Thread Mauro Carvalho Chehab
Hi Antti,

Em Thu, 18 Sep 2014 15:00:59 +0300
Antti Palosaari cr...@iki.fi escreveu:

 On 09/18/2014 02:50 PM, Mauro Carvalho Chehab wrote:
  Sorry, I misunderstood this patch.
 
  There are actually two different things, each requiring a different PM
  setting:
 
  1) to put the tuner to sleep while it is not in usage;
 
  2) put the machine to suspend.
 
  This patch is for (1). That's FINE. I'll apply it.
 
  Yet, for (2), assuming a suspend to ram, the best is to save more
  power.
 
  In the past, the DVB core didn't make any distinction between those
  two, but we recently added a hook for suspend there.
 
  So, it makes sense to keep the tuner powerdown mode for suspend.
 
 
 I think old deep sleep should be used for suspend, whilst on warm state 
 that new is OK.

Agreed.

 I2C driver has suspend/resume support and it is one thing I am going to 
 study in near future.

The problem with an I2C core driven suspend/resume call is that the
suspend/resume order will be random. This will likely break support
on complex devices where resuming require a certain order to happen,
especially if the device is streaming.

 Currently I have 128GB SSD and no swap at all, so 
 I cannot test it now. I have already bought 256GB SSD and I am just 
 waiting for Fedora 21 alpha version, which I will install with proper 
 swap. Unfortunately they have delayed many times already Fedora 21 alpha...

Fedora 21 alpha will likely be too experimental for my taste ;)

The changes on Fedora next means that too much needs to be touched,
so, I'll likely wait for a few months after Fedora 21 release to
migrate most of my machines.

 I am not even sure if DVB frontend needs any special suspend/resume 
 handling, isn't it possible to use standard kernel PM here? (I already 
 added some initial PM to DVB FE ~2 years ago, but IIRC those will only 
 kill threads and so which are not allowed when suspend).

Well, dvb uses the standard Kernel PM. The way PM works on most places
is that the subsystem provides their own PM methods that are called
by the PM subsystem.

 So is there some reason DVB FE needs suspend/resume hooks?

Yes. See above.

Basically, at suspend, the tuner and demod should be stopped (including
all kthreads), and they need to be restarted and firmware may need to be
reloaded at resume time.

Regards,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Mauro Carvalho Chehab
Em Thu, 18 Sep 2014 14:07:21 +0200
Hans Verkuil hansv...@cisco.com escreveu:

 My patch is the *only* fix for that since that's the one that addresses
 the real issue.
 
 One option is to merge my fix for 3.18 with a CC to stable for 3.16.
 
 That way it will be in the tree for longer.
 
 Again, the revert that you did won't solve the regression at all. Please
 revert the revert.

Well, some patch that went between 3.15 and 3.16 broke VBI. If it was
not this patch, what's the patch that broke it?

Regards,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Hans Verkuil


On 09/18/14 14:15, Mauro Carvalho Chehab wrote:
 Em Thu, 18 Sep 2014 14:07:21 +0200
 Hans Verkuil hansv...@cisco.com escreveu:
 
 My patch is the *only* fix for that since that's the one that addresses
 the real issue.

 One option is to merge my fix for 3.18 with a CC to stable for 3.16.

 That way it will be in the tree for longer.

 Again, the revert that you did won't solve the regression at all. Please
 revert the revert.
 
 Well, some patch that went between 3.15 and 3.16 broke VBI. If it was
 not this patch, what's the patch that broke it?

The conversion of saa7134 to vb2 in 3.16 broke the VBI support in saa7134.

It turns out that vb2 NEVER did this right.

Remember that saa7134 was only the second driver with VBI support (after
em28xx) that was converted to vb2, and that this issue only happens with
teletext applications that do not call STREAMON before calling poll().

They rely on the fact that poll returns POLLERR to call STREAMON. Ugly
as hell, and not normal behavior for applications.

So that explains why it was never found before.

Note that em28xx (converted to vb2 quite some time before) fails as well.
So this regression has been there since 3.9 (when em28xx was converted).
I tested my fix with em28xx as well and that will worked fine.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch] [media] mx2-camera: potential negative underflow bug

2014-09-18 Thread Dan Carpenter
My static checker complains:

drivers/media/platform/soc_camera/mx2_camera.c:1070
mx2_emmaprp_resize() warn: no lower bound on 'num'

The heuristic is that it's looking for values which the user can
influence and we put an upper bound on them but we (perhaps
accidentally) allow negative numbers.

I am not very familiar with this code but I have looked at it and think
there might be a bug.  Making the variable unsigned seems like a safe
option either way and this silences the static checker warning.

The call tree is:
  - subdev_do_ioctl()
 - mx2_camera_set_fmt()
- mx2_emmaprp_resize()
The check:
if (num  RESIZE_NUM_MAX)
can underflow and then we use num on the else path.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

diff --git a/drivers/media/platform/soc_camera/mx2_camera.c 
b/drivers/media/platform/soc_camera/mx2_camera.c
index b40bc2e..bc27a47 100644
--- a/drivers/media/platform/soc_camera/mx2_camera.c
+++ b/drivers/media/platform/soc_camera/mx2_camera.c
@@ -1003,7 +1003,7 @@ static int mx2_emmaprp_resize(struct mx2_camera_dev 
*pcdev,
  struct v4l2_mbus_framefmt *mf_in,
  struct v4l2_pix_format *pix_out, bool apply)
 {
-   int num, den;
+   unsigned int num, den;
unsigned long m;
int i, dir;
 
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/8] anysee: convert tda18212 tuner to I2C client

2014-09-18 Thread Mauro Carvalho Chehab
Em Sun,  7 Sep 2014 04:59:55 +0300
Antti Palosaari cr...@iki.fi escreveu:

 Used tda18212 tuner is implemented as I2C driver. Implement I2C
 client to anysee and use it for tda18212.
 
 Signed-off-by: Antti Palosaari cr...@iki.fi
 ---
  drivers/media/usb/dvb-usb-v2/anysee.c | 185 
 +++---
  drivers/media/usb/dvb-usb-v2/anysee.h |   3 +
  2 files changed, 152 insertions(+), 36 deletions(-)
 
 diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c 
 b/drivers/media/usb/dvb-usb-v2/anysee.c
 index e4a2382..d3c5f23 100644
 --- a/drivers/media/usb/dvb-usb-v2/anysee.c
 +++ b/drivers/media/usb/dvb-usb-v2/anysee.c
 @@ -332,7 +332,6 @@ static struct tda10023_config 
 anysee_tda10023_tda18212_config = {
  };
  
  static struct tda18212_config anysee_tda18212_config = {
 - .i2c_address = (0xc0  1),
   .if_dvbt_6 = 4150,
   .if_dvbt_7 = 4150,
   .if_dvbt_8 = 4150,
 @@ -340,7 +339,6 @@ static struct tda18212_config anysee_tda18212_config = {
  };
  
  static struct tda18212_config anysee_tda18212_config2 = {
 - .i2c_address = 0x60 /* (0xc0  1) */,
   .if_dvbt_6 = 3550,
   .if_dvbt_7 = 3700,
   .if_dvbt_8 = 4150,
 @@ -632,6 +630,92 @@ error:
   return ret;
  }
  
 +static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
 + void *platform_data)
 +{
 + int ret, num;
 + struct anysee_state *state = d_to_priv(d);
 + struct i2c_client *client;
 + struct i2c_adapter *adapter = d-i2c_adap;
 + struct i2c_board_info board_info = {
 + .addr = addr,
 + .platform_data = platform_data,
 + };
 +
 + strlcpy(board_info.type, type, I2C_NAME_SIZE);
 +
 + /* find first free client */
 + for (num = 0; num  ANYSEE_I2C_CLIENT_MAX; num++) {
 + if (state-i2c_client[num] == NULL)
 + break;
 + }
 +
 + dev_dbg(d-udev-dev, %s: num=%d\n, __func__, num);
 +
 + if (num == ANYSEE_I2C_CLIENT_MAX) {
 + dev_err(d-udev-dev, %s: I2C client out of index\n,
 + KBUILD_MODNAME);
 + ret = -ENODEV;
 + goto err;
 + }
 +
 + request_module(board_info.type);
 +
 + /* register I2C device */
 + client = i2c_new_device(adapter, board_info);
 + if (client == NULL || client-dev.driver == NULL) {
 + ret = -ENODEV;
 + goto err;
 + }
 +
 + /* increase I2C driver usage count */
 + if (!try_module_get(client-dev.driver-owner)) {
 + i2c_unregister_device(client);
 + ret = -ENODEV;
 + goto err;
 + }
 +
 + state-i2c_client[num] = client;
 + return 0;
 +err:
 + dev_dbg(d-udev-dev, %s: failed=%d\n, __func__, ret);
 + return ret;
 +}
 +
 +static void anysee_del_i2c_dev(struct dvb_usb_device *d)
 +{
 + int num;
 + struct anysee_state *state = d_to_priv(d);
 + struct i2c_client *client;
 +
 + /* find last used client */
 + num = ANYSEE_I2C_CLIENT_MAX;
 + while (num--) {
 + if (state-i2c_client[num] != NULL)
 + break;
 + }
 +
 + dev_dbg(d-udev-dev, %s: num=%d\n, __func__, num);
 +
 + if (num == -1) {
 + dev_err(d-udev-dev, %s: I2C client out of index\n,
 + KBUILD_MODNAME);
 + goto err;
 + }
 +
 + client = state-i2c_client[num];
 +
 + /* decrease I2C driver usage count */
 + module_put(client-dev.driver-owner);
 +
 + /* unregister I2C device */
 + i2c_unregister_device(client);
 +
 + state-i2c_client[num] = NULL;
 +err:
 + dev_dbg(d-udev-dev, %s: failed\n, __func__);
 +}
 +

Please, instead of adding a function to insert/remove an I2C driver on every
place, put them into a common place.

I would actually very much prefer if you could reuse the same code that
are already at the media subsystem (see v4l2_i2c_new_subdev_board 
friends at drivers/media/v4l2-core/v4l2-common.c), eventually making it
more generic.

Btw, as we want to use the media controller also for DVB, we'll end
by needing to use a call similar to v4l2_device_register_subdev().
So, having this code all on just one place will make easier for us to
go to this next step.

  static int anysee_frontend_attach(struct dvb_usb_adapter *adap)
  {
   struct anysee_state *state = adap_to_priv(adap);
 @@ -640,12 +724,12 @@ static int anysee_frontend_attach(struct 
 dvb_usb_adapter *adap)
   u8 tmp;
   struct i2c_msg msg[2] = {
   {
 - .addr = anysee_tda18212_config.i2c_address,
 + .addr = 0x60,
   .flags = 0,
   .len = 1,
   .buf = \x00,
   }, {
 - .addr = anysee_tda18212_config.i2c_address,
 + .addr = 0x60,
   .flags = I2C_M_RD,
   .len = 1,
   .buf = tmp,
 @@ -723,9 +807,11 @@ static 

Re: [PATCH v2] [media] BZ#84401: Revert [media] v4l: vb2: Don't return POLLERR during transient buffer underruns

2014-09-18 Thread Mauro Carvalho Chehab
Em Thu, 18 Sep 2014 14:21:34 +0200
Hans Verkuil hansv...@cisco.com escreveu:

 
 
 On 09/18/14 14:15, Mauro Carvalho Chehab wrote:
  Em Thu, 18 Sep 2014 14:07:21 +0200
  Hans Verkuil hansv...@cisco.com escreveu:
  
  My patch is the *only* fix for that since that's the one that addresses
  the real issue.
 
  One option is to merge my fix for 3.18 with a CC to stable for 3.16.
 
  That way it will be in the tree for longer.
 
  Again, the revert that you did won't solve the regression at all. Please
  revert the revert.
  
  Well, some patch that went between 3.15 and 3.16 broke VBI. If it was
  not this patch, what's the patch that broke it?
 
 The conversion of saa7134 to vb2 in 3.16 broke the VBI support in saa7134.
 
 It turns out that vb2 NEVER did this right.
 
 Remember that saa7134 was only the second driver with VBI support (after
 em28xx) that was converted to vb2, and that this issue only happens with
 teletext applications that do not call STREAMON before calling poll().
 
 They rely on the fact that poll returns POLLERR to call STREAMON. Ugly
 as hell, and not normal behavior for applications.
 
 So that explains why it was never found before.

I don't doubt that your fix solved this specific VBI issue.

What I don't know is what else it broke (if any). If you take a look
at the videobuf-core, the check for an empty queue that you've removed
is also there. So, the special handling if the list is empty is at kernel
for a long time:

7a7d9a89d0307 drivers/media/video/videobuf-core.c (Mauro Carvalho Chehab 
2007-08-23 16:26:14 -0300 1125)if (q-streaming) {
7a7d9a89d0307 drivers/media/video/videobuf-core.c (Mauro Carvalho Chehab 
2007-08-23 16:26:14 -0300 1126)if (!list_empty(q-stream))

This changeset was merged on v2.6.24. Before that, the videobuf1
monolithic code were also using it. So, I won't doubt that this check
is there since the start of V4L2 API.

Changing the syscall behavior of such an old code is really risky
and can bring all sorts of unpredictable results.

I won't apply any change like that without a comprehensive test,
checking every single application to be at least 99.999% sure that
it won't cause even more regressions.

So, until we proof that nothing bad happens, and keep this code
for test for a reasonable amount of time, I'm nacking your VB2 
change patch.

We need to find a solution that will make VB2 to act just like
VB1 with regards to poll() syscall, and not to redefine the
V4L2 API and apply a partial half-baked, not mature hack on it.

 Note that em28xx (converted to vb2 quite some time before) fails as well.
 So this regression has been there since 3.9 (when em28xx was converted).
 I tested my fix with em28xx as well and that will worked fine.
 
 Regards,
 
   Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Mauro Carvalho Chehab
Em Wed, 17 Sep 2014 11:14:28 +0200
Hans Verkuil hverk...@xs4all.nl escreveu:

 This fixes the VBI regression seen in saa7134 when it was converted
 to vb2. Tested with my saa7134 board.
 
 It also updates the poll documentation and fixes a saa7134 bug where
 the WSS signal was never captured.
 
 The first patch should go to 3.17. It won't apply to older kernels,
 so I guess once this is merged we should post a patch to stable for
 those older kernels, certainly 3.16.
 
 I would expect this to be an issue for em28xx as well, but I will
 need to test that. If that driver is affected as well, then this
 fix needs to go into 3.9 and up.

For now:

Nacked-by: Mauro Carvalho Chehab mche...@osg.samsung.com


Changing the V4L2 API is *not* the right way to fix a regression.

Also, this changes a behavior that it is there since 2.6.24.
We can't do that, except if you're sure that no userspace applications
rely on the old behavior, with seems unlikely.

 
 Regards,
 
   Hans
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/8] anysee: convert tda18212 tuner to I2C client

2014-09-18 Thread Antti Palosaari



On 09/18/2014 03:31 PM, Mauro Carvalho Chehab wrote:

Em Sun,  7 Sep 2014 04:59:55 +0300
Antti Palosaari cr...@iki.fi escreveu:


Used tda18212 tuner is implemented as I2C driver. Implement I2C
client to anysee and use it for tda18212.



+static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
+   void *platform_data)



+
+static void anysee_del_i2c_dev(struct dvb_usb_device *d)




Please, instead of adding a function to insert/remove an I2C driver on every
place, put them into a common place.

I would actually very much prefer if you could reuse the same code that
are already at the media subsystem (see v4l2_i2c_new_subdev_board 
friends at drivers/media/v4l2-core/v4l2-common.c), eventually making it
more generic.

Btw, as we want to use the media controller also for DVB, we'll end
by needing to use a call similar to v4l2_device_register_subdev().
So, having this code all on just one place will make easier for us to
go to this next step.


I am just learning and finding out best practices to use I2C drivers. 
That was one implementation solution and IMHO not so bad even. Sure 
those 2 functions could be replaced some more common at some phase, but 
currently, when there is only few drivers, I don't see need for common 
implementation. Let it happen when best practices are clear. And I 
really wonder why there is no such general implementation provided by 
I2C framework?


If you look how I have improved that in a long ran; 1st implementation 
is in em28xx driver, 2nd test was dd-bridge driver, then this anysee and 
eventually there is af9035 (which is almost same than this anysee).




@@ -939,46 +1025,63 @@ static int anysee_tuner_attach(struct dvb_usb_adapter 
*adap)
 * fails attach old simple PLL. */

/* attach tuner */
-   fe = dvb_attach(tda18212_attach, adap-fe[0], d-i2c_adap,
-   anysee_tda18212_config);
+   if (state-has_tda18212) {
+   struct tda18212_config tda18212_config =
+   anysee_tda18212_config;

-   if (fe  adap-fe[1]) {
-   /* attach tuner for 2nd FE */
-   fe = dvb_attach(tda18212_attach, adap-fe[1],
-   d-i2c_adap, anysee_tda18212_config);
-   break;
-   } else if (fe) {
-   break;
-   }
-
-   /* attach tuner */
-   fe = dvb_attach(dvb_pll_attach, adap-fe[0], (0xc0  1),
-   d-i2c_adap, DVB_PLL_SAMSUNG_DTOS403IH102A);
+   tda18212_config.fe = adap-fe[0];
+   ret = anysee_add_i2c_dev(d, tda18212, 0x60,
+   tda18212_config);
+   if (ret)
+   goto err;
+
+   /* copy tuner ops for 2nd FE as tuner is shared */
+   if (adap-fe[1]) {
+   adap-fe[1]-tuner_priv =
+   adap-fe[0]-tuner_priv;
+   memcpy(adap-fe[1]-ops.tuner_ops,
+   adap-fe[0]-ops.tuner_ops,
+   sizeof(struct dvb_tuner_ops));
+   }

-   if (fe  adap-fe[1]) {
-   /* attach tuner for 2nd FE */
-   fe = dvb_attach(dvb_pll_attach, adap-fe[1],
+   return 0;
+   } else {
+   /* attach tuner */
+   fe = dvb_attach(dvb_pll_attach, adap-fe[0],
(0xc0  1), d-i2c_adap,
DVB_PLL_SAMSUNG_DTOS403IH102A);


Please don't use dvb_attach() for those converted modules. The
dvb_attach() is a very dirty hack that was created as an alternative
to provide an abstraction similar to the one that the I2C core already
provides. See how V4L calls the subdev callbacks at
include/media/v4l2-subdev.h.


You looked it wrong, it is dvb_pll_attach. tda18212 attach is replaced 
here with I2C driver. It is tda18212 which is converted here to I2C 
driver, whilst dvb-pll leaves old.




One of the big disadvantages of the dvb_attach() is that it allows just
_one_ entry point function on a sub-device. This only works for very
simple demods that don't provide, for example, hardware filtering.


+
+   if (fe  adap-fe[1]) {
+   /* attach tuner for 2nd FE */
+   fe = dvb_attach(dvb_pll_attach, adap-fe[1],
+   (0xc0  1), d-i2c_adap,
+   DVB_PLL_SAMSUNG_DTOS403IH102A);
+   }


That patch has nothing wrong as I explained :)
It could be improved by 

Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Hans Verkuil
On 09/18/14 14:55, Mauro Carvalho Chehab wrote:
 Em Wed, 17 Sep 2014 11:14:28 +0200
 Hans Verkuil hverk...@xs4all.nl escreveu:
 
 This fixes the VBI regression seen in saa7134 when it was converted
 to vb2. Tested with my saa7134 board.

 It also updates the poll documentation and fixes a saa7134 bug where
 the WSS signal was never captured.

 The first patch should go to 3.17. It won't apply to older kernels,
 so I guess once this is merged we should post a patch to stable for
 those older kernels, certainly 3.16.

 I would expect this to be an issue for em28xx as well, but I will
 need to test that. If that driver is affected as well, then this
 fix needs to go into 3.9 and up.
 
 For now:
 
 Nacked-by: Mauro Carvalho Chehab mche...@osg.samsung.com
 
 
 Changing the V4L2 API is *not* the right way to fix a regression.

Then that leaves option 4 as described by Laurent here:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg79465.html

Please reply to his email rather than this one.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[no subject]

2014-09-18 Thread Maria Caballero

Loan Offer contact us for  more details 
(gibonlin...@gmail.commailto:gibonlin...@gmail.com)
All Details should be forward to this E-mail address for fast respond: 
gibonlin...@gmail.commailto:gibonlin...@gmail.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


smsusb_onresponse error

2014-09-18 Thread Josu Lazkano
Hello all,

I have Hauppauge WinTV-MiniStick in a Debian Wheezy (3.2 kernel), I
notice that I have lots of firmware errors in dmesg:

# dmesg | grep smsusb
[6.717599] usbcore: registered new interface driver smsusb
[63792.528700] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes
[63792.528949] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes
[63792.529197] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes
[63792.529446] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes
[63792.529707] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes
[63792.529947] smsusb_onresponse: line: 118: error, urb status -75, 0 bytes

I am using this firmware:

# md5sum /lib/firmware/sms1xxx-hcw-55xxx-dvbt-02.fw
b44807098ba26e52cbedeadc052ba58f  /lib/firmware/sms1xxx-hcw-55xxx-dvbt-02.fw

Is something wrong with the firmware? Is this normal?

Thanks and best regards.

-- 
Josu Lazkano
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Mauro Carvalho Chehab
Em Wed, 17 Sep 2014 18:06:02 +0200
Hans Verkuil hverk...@xs4all.nl escreveu:

 On 09/17/2014 11:14 AM, Hans Verkuil wrote:
  This fixes the VBI regression seen in saa7134 when it was converted
  to vb2. Tested with my saa7134 board.
  
  It also updates the poll documentation and fixes a saa7134 bug where
  the WSS signal was never captured.
  
  The first patch should go to 3.17. It won't apply to older kernels,
  so I guess once this is merged we should post a patch to stable for
  those older kernels, certainly 3.16.
  
  I would expect this to be an issue for em28xx as well, but I will
  need to test that. If that driver is affected as well, then this
  fix needs to go into 3.9 and up.
 
 Update: the VBI apps won't work with the em28xx driver as I suspected.
 With the fix all is fine for em28xx.

At least here, em28xx with one application (xawtv or qv4l2) reading
at video0 and another one for vbi (mtt or zvbi), I'm getting the
errors below. Clearly, it is not just the poll syscall that it is
wrong on VB2 and/or em28xx.

I'm trying to identify what else is wrong there.

Regards,
Mauro

[63271.912808] [ cut here ]
[63271.912832] WARNING: CPU: 5 PID: 14761 at 
drivers/media/v4l2-core/videobuf2-core.c:2126 __vb2_queue_cancel+0x1b1/0x260 
[videobuf2_core]()
[63271.912835] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 uvcvideo 
iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
videodev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic 
snd_hda_intel crct10dif_pclmul media cfg80211 snd_hda_controller iTCO_wdt 
mxm_wmi i2c_algo_bit drm_kms_helper drm crc32_pclmul crc32c_intel 
ghash_clmulni_intel snd_hda_codec snd_hwdep iTCO_vendor_support btusb bluetooth 
snd_seq snd_seq_device snd_pcm snd_timer snd soundcore mei_me mei joydev 
i2c_i801 serio_raw microcode rfkill i2c_core lpc_ich mfd_core shpchp
[63271.913037]  wmi video r8169 mii
[63271.913048] CPU: 5 PID: 14761 Comm: xawtv Not tainted 3.16.0-rc6+ #23
[63271.913055] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 
550P5C/550P7C/SAMSUNG_NP1234567890, BIOS P05ABI.016.130917.dg 09/17/2013
[63271.913059]   051c953c 8800c4957c08 
816f523f
[63271.913067]   8800c4957c40 8108be8d 

[63271.913072]  0001 8800c5488948 88003dd35500 

[63271.913081] Call Trace:
[63271.913098]  [816f523f] dump_stack+0x45/0x56
[63271.913108]  [8108be8d] warn_slowpath_common+0x7d/0xa0
[63271.913115]  [8108bfba] warn_slowpath_null+0x1a/0x20
[63271.913137]  [a0319951] __vb2_queue_cancel+0x1b1/0x260 
[videobuf2_core]
[63271.913155]  [a031a2c5] vb2_internal_streamoff+0x35/0x90 
[videobuf2_core]
[63271.913171]  [a031a355] vb2_streamoff+0x35/0x60 [videobuf2_core]
[63271.913184]  [a031a3c8] vb2_ioctl_streamoff+0x48/0x50 
[videobuf2_core]
[63271.913200]  [a02f0a8a] v4l_streamoff+0x1a/0x20 [videodev]
[63271.913215]  [a02f39c4] __video_do_ioctl+0x294/0x310 [videodev]
[63271.913231]  [a02f63be] video_usercopy+0x22e/0x5b0 [videodev]
[63271.913244]  [a02f3730] ? v4l_dbg_s_register+0x150/0x150 [videodev]
[63271.913258]  [810d26f1] ? remove_wait_queue+0x31/0x40
[63271.913269]  [81425f92] ? n_tty_write+0x392/0x510
[63271.913283]  [a02f6755] video_ioctl2+0x15/0x20 [videodev]
[63271.913295]  [a02ef71b] v4l2_ioctl+0x11b/0x150 [videodev]
[63271.913304]  [81200640] do_vfs_ioctl+0x2e0/0x4a0
[63271.913310]  [81200881] SyS_ioctl+0x81/0xa0
[63271.913319]  [81122656] ? __audit_syscall_exit+0x1f6/0x2a0
[63271.913328]  [816fc869] system_call_fastpath+0x16/0x1b
[63271.91] ---[ end trace 9381964a5237f703 ]---
[63276.841245] [ cut here ]
[63276.841256] WARNING: CPU: 1 PID: 1495 at fs/sysfs/dir.c:31 
sysfs_warn_dup+0x64/0x80()
[63276.841258] sysfs: cannot create duplicate filename 
'/devices/pci:00/:00:14.0/usb3/3-2/3-2:1.0/ep_81'
[63276.841260] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 uvcvideo 
iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
videodev snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic 
snd_hda_intel crct10dif_pclmul media cfg80211 snd_hda_controller iTCO_wdt 
mxm_wmi i2c_algo_bit drm_kms_helper drm crc32_pclmul crc32c_intel 
ghash_clmulni_intel snd_hda_codec snd_hwdep iTCO_vendor_support btusb bluetooth 
snd_seq snd_seq_device snd_pcm 

Re: [PATCH 0/4] vb2/saa7134 regression/documentation fixes

2014-09-18 Thread Hans Verkuil
On 09/18/2014 06:21 PM, Mauro Carvalho Chehab wrote:
 Em Wed, 17 Sep 2014 18:06:02 +0200
 Hans Verkuil hverk...@xs4all.nl escreveu:
 
 On 09/17/2014 11:14 AM, Hans Verkuil wrote:
 This fixes the VBI regression seen in saa7134 when it was converted
 to vb2. Tested with my saa7134 board.

 It also updates the poll documentation and fixes a saa7134 bug where
 the WSS signal was never captured.

 The first patch should go to 3.17. It won't apply to older kernels,
 so I guess once this is merged we should post a patch to stable for
 those older kernels, certainly 3.16.

 I would expect this to be an issue for em28xx as well, but I will
 need to test that. If that driver is affected as well, then this
 fix needs to go into 3.9 and up.

 Update: the VBI apps won't work with the em28xx driver as I suspected.
 With the fix all is fine for em28xx.
 
 At least here, em28xx with one application (xawtv or qv4l2) reading
 at video0 and another one for vbi (mtt or zvbi), I'm getting the
 errors below. Clearly, it is not just the poll syscall that it is
 wrong on VB2 and/or em28xx.
 
 I'm trying to identify what else is wrong there.

At least the queue_cancel warning is fixed by this:

https://www.mail-archive.com/linux-media@vger.kernel.org/msg78063.html

which is in the devel branch but not in the master branch.

Regards,

Hans

 
 Regards,
 Mauro
 
 [63271.912808] [ cut here ]
 [63271.912832] WARNING: CPU: 5 PID: 14761 at 
 drivers/media/v4l2-core/videobuf2-core.c:2126 __vb2_queue_cancel+0x1b1/0x260 
 [videobuf2_core]()
 [63271.912835] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
 em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
 tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
 x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 
 uvcvideo iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core 
 v4l2_common videodev snd_hda_codec_hdmi snd_hda_codec_realtek 
 snd_hda_codec_generic snd_hda_intel crct10dif_pclmul media cfg80211 
 snd_hda_controller iTCO_wdt mxm_wmi i2c_algo_bit drm_kms_helper drm 
 crc32_pclmul crc32c_intel ghash_clmulni_intel snd_hda_codec snd_hwdep 
 iTCO_vendor_support btusb bluetooth snd_seq snd_seq_device snd_pcm snd_timer 
 snd soundcore mei_me mei joydev i2c_i801 serio_raw microcode rfkill i2c_core 
 lpc_ich mfd_core shpchp
 [63271.913037]  wmi video r8169 mii
 [63271.913048] CPU: 5 PID: 14761 Comm: xawtv Not tainted 3.16.0-rc6+ #23
 [63271.913055] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 
 550P5C/550P7C/SAMSUNG_NP1234567890, BIOS P05ABI.016.130917.dg 09/17/2013
 [63271.913059]   051c953c 8800c4957c08 
 816f523f
 [63271.913067]   8800c4957c40 8108be8d 
 
 [63271.913072]  0001 8800c5488948 88003dd35500 
 
 [63271.913081] Call Trace:
 [63271.913098]  [816f523f] dump_stack+0x45/0x56
 [63271.913108]  [8108be8d] warn_slowpath_common+0x7d/0xa0
 [63271.913115]  [8108bfba] warn_slowpath_null+0x1a/0x20
 [63271.913137]  [a0319951] __vb2_queue_cancel+0x1b1/0x260 
 [videobuf2_core]
 [63271.913155]  [a031a2c5] vb2_internal_streamoff+0x35/0x90 
 [videobuf2_core]
 [63271.913171]  [a031a355] vb2_streamoff+0x35/0x60 [videobuf2_core]
 [63271.913184]  [a031a3c8] vb2_ioctl_streamoff+0x48/0x50 
 [videobuf2_core]
 [63271.913200]  [a02f0a8a] v4l_streamoff+0x1a/0x20 [videodev]
 [63271.913215]  [a02f39c4] __video_do_ioctl+0x294/0x310 [videodev]
 [63271.913231]  [a02f63be] video_usercopy+0x22e/0x5b0 [videodev]
 [63271.913244]  [a02f3730] ? v4l_dbg_s_register+0x150/0x150 
 [videodev]
 [63271.913258]  [810d26f1] ? remove_wait_queue+0x31/0x40
 [63271.913269]  [81425f92] ? n_tty_write+0x392/0x510
 [63271.913283]  [a02f6755] video_ioctl2+0x15/0x20 [videodev]
 [63271.913295]  [a02ef71b] v4l2_ioctl+0x11b/0x150 [videodev]
 [63271.913304]  [81200640] do_vfs_ioctl+0x2e0/0x4a0
 [63271.913310]  [81200881] SyS_ioctl+0x81/0xa0
 [63271.913319]  [81122656] ? __audit_syscall_exit+0x1f6/0x2a0
 [63271.913328]  [816fc869] system_call_fastpath+0x16/0x1b
 [63271.91] ---[ end trace 9381964a5237f703 ]---
 [63276.841245] [ cut here ]
 [63276.841256] WARNING: CPU: 1 PID: 1495 at fs/sysfs/dir.c:31 
 sysfs_warn_dup+0x64/0x80()
 [63276.841258] sysfs: cannot create duplicate filename 
 '/devices/pci:00/:00:14.0/usb3/3-2/3-2:1.0/ep_81'
 [63276.841260] Modules linked in: rc_hauppauge em28xx_rc rc_core lgdt330x 
 em28xx_dvb dvb_core em28xx_alsa tuner_xc2028 tuner tvp5150 em28xx_v4l em28xx 
 tveeprom fuse ip6table_filter ip6_tables bnep binfmt_misc vfat fat nouveau 
 x86_pkg_temp_thermal coretemp kvm_intel kvm arc4 iwldvm mac80211 i915 
 uvcvideo iwlwifi ttm videobuf2_vmalloc videobuf2_memops videobuf2_core 
 v4l2_common 

[PATCH] libdvbv5: MPEG TS parser documentation

2014-09-18 Thread André Roth
Signed-off-by: André Roth neol...@gmail.com
---
 lib/include/libdvbv5/mpeg_ts.h | 96 --
 1 file changed, 93 insertions(+), 3 deletions(-)

diff --git a/lib/include/libdvbv5/mpeg_ts.h b/lib/include/libdvbv5/mpeg_ts.h
index 3eab029..2662543 100644
--- a/lib/include/libdvbv5/mpeg_ts.h
+++ b/lib/include/libdvbv5/mpeg_ts.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 - Andre Roth neol...@gmail.com
+ * Copyright (c) 2013-2014 - Andre Roth neol...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,12 +21,52 @@
 #ifndef _MPEG_TS_H
 #define _MPEG_TS_H
 
+/**
+ * @file mpeg_ts.h
+ * @ingroup dvb_table
+ * @brief Provides the table parser for the MPEG-PES Elementary Stream
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Relevant specs
+ * The table described herein is defined in ISO 13818-1
+ *
+ * @see
+ * http://en.wikipedia.org/wiki/MPEG_transport_stream
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
 #include stdint.h
 #include unistd.h /* ssize_t */
 
+/**
+ * @def DVB_MPEG_TS
+ * @brief MPEG Transport Stream magic
+ * @ingroup dvb_table
+ * @def DVB_MPEG_TS_PACKET_SIZE
+ * @brief Size of an MPEG packet
+ * @ingroup dvb_table
+ */
 #define DVB_MPEG_TS  0x47
 #define DVB_MPEG_TS_PACKET_SIZE  188
 
+/**
+ * @struct dvb_mpeg_ts_adaption
+ * @brief MPEG TS header adaption field
+ *
+ * @param type DVB_MPEG_ES_SEQ_START
+ * @param length   1 bit   Adaptation Field Length
+ * @param discontinued 1 bit   Discontinuity indicator
+ * @param random_access1 bit   Random Access indicator
+ * @param priority 1 bit   Elementary stream priority indicator
+ * @param PCR  1 bit   PCR flag
+ * @param OPCR 1 bit   OPCR flag
+ * @param splicing_point   1 bit   Splicing point flag
+ * @param private_data 1 bit   Transport private data flag
+ * @param extension1 bit   Adaptation field extension flag
+ * @param data Pointer to data
+ */
 struct dvb_mpeg_ts_adaption {
uint8_t length;
struct {
@@ -42,8 +82,23 @@ struct dvb_mpeg_ts_adaption {
uint8_t data[];
 } __attribute__((packed));
 
+/**
+ * @structdvb_mpeg_ts
+ * @brief MPEG TS header
+ *
+ * @param sync_byteDVB_MPEG_TS
+ * @param tei  1 bit   Transport Error Indicator
+ * @param payload_start1 bit   Payload Unit Start Indicator
+ * @param priority 1 bit   Transport Priority
+ * @param pid  13 bits Packet Identifier
+ * @param scrambling   2 bits  Scrambling control
+ * @param adaptation_field 1 bit   Adaptation field exist
+ * @param payload  1 bit   Contains payload
+ * @param continuity_counter   4 bits  Continuity counter
+ * @param adaption Pointer to optional adaption fiels (struct 
dvb_mpeg_ts_adaption)
+ */
 struct dvb_mpeg_ts {
-   uint8_t sync_byte; // DVB_MPEG_TS
+   uint8_t sync_byte;
union {
uint16_t bitfield;
struct {
@@ -68,8 +123,43 @@ struct dvb_v5_fe_parms;
 extern C {
 #endif
 
-ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, uint8_t *table, ssize_t *table_length);
+/**
+ * @brief Initialize a struct dvb_mpeg_ts from buffer
+ *
+ * @param parmsstruct dvb_v5_fe_parms for log functions
+ * @param buf  Buffer
+ * @param buflen   Length of buffer
+ * @param tablePointer to allocated struct dvb_mpeg_ts
+ * @param table_length Pointer to size_t where length will be written to
+ *
+ * @return Length of data in table
+ *
+ * This function copies the length of struct dvb_mpeg_ts
+ * to table and fixes endianness. table has to be allocated
+ * with malloc.
+ */
+ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen,
+   uint8_t *table, ssize_t *table_length);
+
+/**
+ * @brief Deallocate memory associated with a struct dvb_mpeg_ts
+ * @ingroup file
+ *
+ * @param ts   struct dvb_mpeg_ts to be deallocated
+ *
+ * This function assumes frees dynamically allocated memory by the
+ * dvb_mpeg_ts_init function.
+ */
 void dvb_mpeg_ts_free(struct dvb_mpeg_ts *ts);
+
+/**
+ * @brief Print details of struct dvb_mpeg_ts
+ *
+ * @param parmsstruct dvb_v5_fe_parms for log functions
+ * @param seq_startPointer to struct dvb_mpeg_ts to print
+ *
+ * This function prints the fields of struct dvb_mpeg_ts
+ */
 void dvb_mpeg_ts_print(struct dvb_v5_fe_parms *parms, struct dvb_mpeg_ts *ts);
 
 #ifdef __cplusplus
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More 

[PATCH v2] libdvbv5: MPEG TS parser documentation

2014-09-18 Thread André Roth
Signed-off-by: André Roth neol...@gmail.com
---
 doxygen_libdvbv5.cfg   |  1 +
 lib/include/libdvbv5/mpeg_ts.h | 96 --
 2 files changed, 94 insertions(+), 3 deletions(-)

diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index f1f9ab4..bbdaf9a 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -765,6 +765,7 @@ INPUT  = $(SRCDIR)/doc/libdvbv5-index.doc \
 $(SRCDIR)/lib/include/libdvbv5/vct.h \
 $(SRCDIR)/lib/include/libdvbv5/crc32.h \
 $(SRCDIR)/lib/include/libdvbv5/mpeg_es.h \
+$(SRCDIR)/lib/include/libdvbv5/mpeg_ts.h \

 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/lib/include/libdvbv5/mpeg_ts.h b/lib/include/libdvbv5/mpeg_ts.h
index 3eab029..2662543 100644
--- a/lib/include/libdvbv5/mpeg_ts.h
+++ b/lib/include/libdvbv5/mpeg_ts.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 - Andre Roth neol...@gmail.com
+ * Copyright (c) 2013-2014 - Andre Roth neol...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,12 +21,52 @@
 #ifndef _MPEG_TS_H
 #define _MPEG_TS_H

+/**
+ * @file mpeg_ts.h
+ * @ingroup dvb_table
+ * @brief Provides the table parser for the MPEG-PES Elementary Stream
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Relevant specs
+ * The table described herein is defined in ISO 13818-1
+ *
+ * @see
+ * http://en.wikipedia.org/wiki/MPEG_transport_stream
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
 #include stdint.h
 #include unistd.h /* ssize_t */

+/**
+ * @def DVB_MPEG_TS
+ * @brief MPEG Transport Stream magic
+ * @ingroup dvb_table
+ * @def DVB_MPEG_TS_PACKET_SIZE
+ * @brief Size of an MPEG packet
+ * @ingroup dvb_table
+ */
 #define DVB_MPEG_TS  0x47
 #define DVB_MPEG_TS_PACKET_SIZE  188

+/**
+ * @struct dvb_mpeg_ts_adaption
+ * @brief MPEG TS header adaption field
+ *
+ * @param type DVB_MPEG_ES_SEQ_START
+ * @param length   1 bit   Adaptation Field Length
+ * @param discontinued 1 bit   Discontinuity indicator
+ * @param random_access1 bit   Random Access indicator
+ * @param priority 1 bit   Elementary stream priority indicator
+ * @param PCR  1 bit   PCR flag
+ * @param OPCR 1 bit   OPCR flag
+ * @param splicing_point   1 bit   Splicing point flag
+ * @param private_data 1 bit   Transport private data flag
+ * @param extension1 bit   Adaptation field extension flag
+ * @param data Pointer to data
+ */
 struct dvb_mpeg_ts_adaption {
uint8_t length;
struct {
@@ -42,8 +82,23 @@ struct dvb_mpeg_ts_adaption {
uint8_t data[];
 } __attribute__((packed));

+/**
+ * @structdvb_mpeg_ts
+ * @brief MPEG TS header
+ *
+ * @param sync_byteDVB_MPEG_TS
+ * @param tei  1 bit   Transport Error Indicator
+ * @param payload_start1 bit   Payload Unit Start Indicator
+ * @param priority 1 bit   Transport Priority
+ * @param pid  13 bits Packet Identifier
+ * @param scrambling   2 bits  Scrambling control
+ * @param adaptation_field 1 bit   Adaptation field exist
+ * @param payload  1 bit   Contains payload
+ * @param continuity_counter   4 bits  Continuity counter
+ * @param adaption Pointer to optional adaption fiels (struct 
dvb_mpeg_ts_adaption)
+ */
 struct dvb_mpeg_ts {
-   uint8_t sync_byte; // DVB_MPEG_TS
+   uint8_t sync_byte;
union {
uint16_t bitfield;
struct {
@@ -68,8 +123,43 @@ struct dvb_v5_fe_parms;
 extern C {
 #endif

-ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, uint8_t *table, ssize_t *table_length);
+/**
+ * @brief Initialize a struct dvb_mpeg_ts from buffer
+ *
+ * @param parmsstruct dvb_v5_fe_parms for log functions
+ * @param buf  Buffer
+ * @param buflen   Length of buffer
+ * @param tablePointer to allocated struct dvb_mpeg_ts
+ * @param table_length Pointer to size_t where length will be written to
+ *
+ * @return Length of data in table
+ *
+ * This function copies the length of struct dvb_mpeg_ts
+ * to table and fixes endianness. table has to be allocated
+ * with malloc.
+ */
+ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen,
+   uint8_t *table, ssize_t *table_length);
+
+/**
+ * @brief Deallocate memory associated with a struct dvb_mpeg_ts
+ * @ingroup file
+ *
+ * @param ts   struct dvb_mpeg_ts to 

[PATCH v3] libdvbv5: MPEG TS parser documentation

2014-09-18 Thread André Roth
Signed-off-by: André Roth neol...@gmail.com
---
 doxygen_libdvbv5.cfg   |  1 +
 lib/include/libdvbv5/mpeg_ts.h | 96 --
 2 files changed, 94 insertions(+), 3 deletions(-)

diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index f1f9ab4..bbdaf9a 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -765,6 +765,7 @@ INPUT  = $(SRCDIR)/doc/libdvbv5-index.doc \
 $(SRCDIR)/lib/include/libdvbv5/vct.h \
 $(SRCDIR)/lib/include/libdvbv5/crc32.h \
 $(SRCDIR)/lib/include/libdvbv5/mpeg_es.h \
+$(SRCDIR)/lib/include/libdvbv5/mpeg_ts.h \
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/lib/include/libdvbv5/mpeg_ts.h b/lib/include/libdvbv5/mpeg_ts.h
index 3eab029..cfb8831 100644
--- a/lib/include/libdvbv5/mpeg_ts.h
+++ b/lib/include/libdvbv5/mpeg_ts.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 - Andre Roth neol...@gmail.com
+ * Copyright (c) 2013-2014 - Andre Roth neol...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,12 +21,52 @@
 #ifndef _MPEG_TS_H
 #define _MPEG_TS_H
 
+/**
+ * @file mpeg_ts.h
+ * @ingroup dvb_table
+ * @brief Provides the table parser for the MPEG-PES Elementary Stream
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Relevant specs
+ * The table described herein is defined in ISO 13818-1
+ *
+ * @see
+ * http://en.wikipedia.org/wiki/MPEG_transport_stream
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
 #include stdint.h
 #include unistd.h /* ssize_t */
 
+/**
+ * @def DVB_MPEG_TS
+ * @brief MPEG Transport Stream magic
+ * @ingroup dvb_table
+ * @def DVB_MPEG_TS_PACKET_SIZE
+ * @brief Size of an MPEG packet
+ * @ingroup dvb_table
+ */
 #define DVB_MPEG_TS  0x47
 #define DVB_MPEG_TS_PACKET_SIZE  188
 
+/**
+ * @struct dvb_mpeg_ts_adaption
+ * @brief MPEG TS header adaption field
+ *
+ * @param type DVB_MPEG_ES_SEQ_START
+ * @param length   1 bit   Adaptation Field Length
+ * @param discontinued 1 bit   Discontinuity indicator
+ * @param random_access1 bit   Random Access indicator
+ * @param priority 1 bit   Elementary stream priority indicator
+ * @param PCR  1 bit   PCR flag
+ * @param OPCR 1 bit   OPCR flag
+ * @param splicing_point   1 bit   Splicing point flag
+ * @param private_data 1 bit   Transport private data flag
+ * @param extension1 bit   Adaptation field extension flag
+ * @param data Pointer to data
+ */
 struct dvb_mpeg_ts_adaption {
uint8_t length;
struct {
@@ -42,8 +82,23 @@ struct dvb_mpeg_ts_adaption {
uint8_t data[];
 } __attribute__((packed));
 
+/**
+ * @struct dvb_mpeg_ts
+ * @brief MPEG TS header
+ *
+ * @param sync_byteDVB_MPEG_TS
+ * @param tei  1 bit   Transport Error Indicator
+ * @param payload_start1 bit   Payload Unit Start Indicator
+ * @param priority 1 bit   Transport Priority
+ * @param pid  13 bits Packet Identifier
+ * @param scrambling   2 bits  Scrambling control
+ * @param adaptation_field 1 bit   Adaptation field exist
+ * @param payload  1 bit   Contains payload
+ * @param continuity_counter   4 bits  Continuity counter
+ * @param adaption Pointer to optional adaption fiels (struct 
dvb_mpeg_ts_adaption)
+ */
 struct dvb_mpeg_ts {
-   uint8_t sync_byte; // DVB_MPEG_TS
+   uint8_t sync_byte;
union {
uint16_t bitfield;
struct {
@@ -68,8 +123,43 @@ struct dvb_v5_fe_parms;
 extern C {
 #endif
 
-ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen, uint8_t *table, ssize_t *table_length);
+/**
+ * @brief Initialize a struct dvb_mpeg_ts from buffer
+ *
+ * @param parmsstruct dvb_v5_fe_parms for log functions
+ * @param buf  Buffer
+ * @param buflen   Length of buffer
+ * @param tablePointer to allocated struct dvb_mpeg_ts
+ * @param table_length Pointer to size_t where length will be written to
+ *
+ * @return Length of data in table
+ *
+ * This function copies the length of struct dvb_mpeg_ts
+ * to table and fixes endianness. table has to be allocated
+ * with malloc.
+ */
+ssize_t dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, 
ssize_t buflen,
+   uint8_t *table, ssize_t *table_length);
+
+/**
+ * @brief Deallocate memory associated with a struct dvb_mpeg_ts
+ * @ingroup file
+ *
+ * @param ts   struct 

[PATCH] libdvbv5: use hyperlinks in doxygen PDF

2014-09-18 Thread André Roth
Signed-off-by: André Roth neol...@gmail.com
---
 doxygen_libdvbv5.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index bbdaf9a..51ec180 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -1656,7 +1656,7 @@ LATEX_EXTRA_FILES  =
 # The default value is: YES.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
-PDF_HYPERLINKS = NO
+PDF_HYPERLINKS = YES
 
 # If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to 
generate
 # the PDF file directly from the LaTeX files. Set this option to YES to get a
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] em28xx-v4l: get rid of field users in struct em28xx_v4l2

2014-09-18 Thread Hans Verkuil
Hi Frank,

On 07/25/2014 07:48 PM, Frank Schäfer wrote:
 Instead of counting the number of opened file handles, use function
 v4l2_fh_is_singular_file() in em28xx_v4l2_open() and em28xx_v4l2_close() to
 determine if the file handle is the first/last opened one.

This won't work: if you capture from both /dev/video and /dev/vbi and close
one, then it stops all streaming.

I would just revert this patch completely.

There is currently no core support for detecting when all users of all devices
registered by a driver have left, so you don't have really have an alternative
but to use your old code.

Regards,

Hans

 
 Signed-off-by: Frank Schäfer fschaefer@googlemail.com
 ---
  drivers/media/usb/em28xx/em28xx-video.c | 23 +--
  drivers/media/usb/em28xx/em28xx.h   |  1 -
  2 files changed, 13 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
 b/drivers/media/usb/em28xx/em28xx-video.c
 index 3a7ec3b..087ccf9 100644
 --- a/drivers/media/usb/em28xx/em28xx-video.c
 +++ b/drivers/media/usb/em28xx/em28xx-video.c
 @@ -1883,9 +1883,8 @@ static int em28xx_v4l2_open(struct file *filp)
   return -EINVAL;
   }
  
 - em28xx_videodbg(open dev=%s type=%s users=%d\n,
 - video_device_node_name(vdev), v4l2_type_names[fh_type],
 - v4l2-users);
 + em28xx_videodbg(open dev=%s type=%s\n,
 + video_device_node_name(vdev), v4l2_type_names[fh_type]);
  
   if (mutex_lock_interruptible(dev-lock))
   return -ERESTARTSYS;
 @@ -1898,7 +1897,9 @@ static int em28xx_v4l2_open(struct file *filp)
   return ret;
   }
  
 - if (v4l2-users == 0) {
 + if (v4l2_fh_is_singular_file(filp)) {
 + em28xx_videodbg(first opened filehandle, initializing 
 device\n);
 +
   em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
  
   if (vdev-vfl_type != VFL_TYPE_RADIO)
 @@ -1909,6 +1910,8 @@ static int em28xx_v4l2_open(struct file *filp)
* of some i2c devices
*/
   em28xx_wake_i2c(dev);
 + } else {
 + em28xx_videodbg(further filehandles are already opened\n);
   }
  
   if (vdev-vfl_type == VFL_TYPE_RADIO) {
 @@ -1918,7 +1921,6 @@ static int em28xx_v4l2_open(struct file *filp)
  
   kref_get(dev-ref);
   kref_get(v4l2-ref);
 - v4l2-users++;
  
   mutex_unlock(dev-lock);
  
 @@ -2025,12 +2027,11 @@ static int em28xx_v4l2_close(struct file *filp)
   struct em28xx_v4l2*v4l2 = dev-v4l2;
   int  errCode;
  
 - em28xx_videodbg(users=%d\n, v4l2-users);
 -
 - vb2_fop_release(filp);
   mutex_lock(dev-lock);
  
 - if (v4l2-users == 1) {
 + if (v4l2_fh_is_singular_file(filp)) {
 + em28xx_videodbg(last opened filehandle, shutting down 
 device\n);
 +
   /* No sense to try to write to the device */
   if (dev-disconnected)
   goto exit;
 @@ -2049,10 +2050,12 @@ static int em28xx_v4l2_close(struct file *filp)
   em28xx_errdev(cannot change alternate number to 
   0 (error=%i)\n, errCode);
   }
 + } else {
 + em28xx_videodbg(further opened filehandles left\n);
   }
  
  exit:
 - v4l2-users--;
 + vb2_fop_release(filp);
   kref_put(v4l2-ref, em28xx_free_v4l2);
   mutex_unlock(dev-lock);
   kref_put(dev-ref, em28xx_free_device);
 diff --git a/drivers/media/usb/em28xx/em28xx.h 
 b/drivers/media/usb/em28xx/em28xx.h
 index 4360338..84ef8ef 100644
 --- a/drivers/media/usb/em28xx/em28xx.h
 +++ b/drivers/media/usb/em28xx/em28xx.h
 @@ -524,7 +524,6 @@ struct em28xx_v4l2 {
   int sensor_yres;
   int sensor_xtal;
  
 - int users;  /* user count for exclusive use */
   int streaming_users;/* number of actively streaming users */
  
   u32 frequency;  /* selected tuner frequency */
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media: fix enum_fmt for s5p-mfc

2014-09-18 Thread ayaka
As the s5p-mfc is a driver which use  multiplanar api, so the
vidioc_enum_fmt_vid serial of ioctl should only for
multiplanar, non-multiplanar shouldn't be implemented at all.

Signed-off-by: ayaka ay...@soulik.info
---
 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 24 +++-
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 24 +++-
 2 files changed, 6 insertions(+), 42 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 4d93835..6611a7a 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -283,17 +283,13 @@ static int vidioc_querycap(struct file *file, void *priv,
 
 /* Enumerate format */
 static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
-   bool mplane, bool out)
+   bool out)
 {
struct s5p_mfc_dev *dev = video_drvdata(file);
struct s5p_mfc_fmt *fmt;
int i, j = 0;
 
for (i = 0; i  ARRAY_SIZE(formats); ++i) {
-   if (mplane  formats[i].num_planes == 1)
-   continue;
-   else if (!mplane  formats[i].num_planes  1)
-   continue;
if (out  formats[i].type != MFC_FMT_DEC)
continue;
else if (!out  formats[i].type != MFC_FMT_RAW)
@@ -313,28 +309,16 @@ static int vidioc_enum_fmt(struct file *file, struct 
v4l2_fmtdesc *f,
return 0;
 }
 
-static int vidioc_enum_fmt_vid_cap(struct file *file, void *pirv,
-   struct v4l2_fmtdesc *f)
-{
-   return vidioc_enum_fmt(file, f, false, false);
-}
-
 static int vidioc_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
struct v4l2_fmtdesc *f)
 {
-   return vidioc_enum_fmt(file, f, true, false);
-}
-
-static int vidioc_enum_fmt_vid_out(struct file *file, void *priv,
-   struct v4l2_fmtdesc *f)
-{
-   return vidioc_enum_fmt(file, f, false, true);
+   return vidioc_enum_fmt(file, f, false);
 }
 
 static int vidioc_enum_fmt_vid_out_mplane(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
 {
-   return vidioc_enum_fmt(file, f, true, true);
+   return vidioc_enum_fmt(file, f, true);
 }
 
 /* Get format */
@@ -878,9 +862,7 @@ static int vidioc_subscribe_event(struct v4l2_fh *fh,
 /* v4l2_ioctl_ops */
 static const struct v4l2_ioctl_ops s5p_mfc_dec_ioctl_ops = {
.vidioc_querycap = vidioc_querycap,
-   .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap,
.vidioc_enum_fmt_vid_cap_mplane = vidioc_enum_fmt_vid_cap_mplane,
-   .vidioc_enum_fmt_vid_out = vidioc_enum_fmt_vid_out,
.vidioc_enum_fmt_vid_out_mplane = vidioc_enum_fmt_vid_out_mplane,
.vidioc_g_fmt_vid_cap_mplane = vidioc_g_fmt,
.vidioc_g_fmt_vid_out_mplane = vidioc_g_fmt,
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 3abe468..4725a6f 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -953,17 +953,13 @@ static int vidioc_querycap(struct file *file, void *priv,
 }
 
 static int vidioc_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
-   bool mplane, bool out)
+   bool out)
 {
struct s5p_mfc_dev *dev = video_drvdata(file);
struct s5p_mfc_fmt *fmt;
int i, j = 0;
 
for (i = 0; i  ARRAY_SIZE(formats); ++i) {
-   if (mplane  formats[i].num_planes == 1)
-   continue;
-   else if (!mplane  formats[i].num_planes  1)
-   continue;
if (out  formats[i].type != MFC_FMT_RAW)
continue;
else if (!out  formats[i].type != MFC_FMT_ENC)
@@ -983,28 +979,16 @@ static int vidioc_enum_fmt(struct file *file, struct 
v4l2_fmtdesc *f,
return -EINVAL;
 }
 
-static int vidioc_enum_fmt_vid_cap(struct file *file, void *pirv,
-  struct v4l2_fmtdesc *f)
-{
-   return vidioc_enum_fmt(file, f, false, false);
-}
-
 static int vidioc_enum_fmt_vid_cap_mplane(struct file *file, void *pirv,
  struct v4l2_fmtdesc *f)
 {
-   return vidioc_enum_fmt(file, f, true, false);
-}
-
-static int vidioc_enum_fmt_vid_out(struct file *file, void *prov,
-  struct v4l2_fmtdesc *f)
-{
-   return vidioc_enum_fmt(file, f, false, true);
+   return vidioc_enum_fmt(file, f, false);
 }
 
 static int vidioc_enum_fmt_vid_out_mplane(struct file *file, 

[PATCH] fix enum_fmt for s5p-mfc

2014-09-18 Thread ayaka
The patch remove the non-multiplanar api for enum_fmt in s5p-mfc.
Now enum_fmt in the driver will only work with multiplanar.
I think it is a bug, hverkuil think it is too. so I made this patch.
Actually gstreamer doesn't care about it, it will merge the result
from non-multiplanar and multiplanar.

ayaka (1):
  media: fix enum_fmt for s5p-mfc

 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 24 +++-
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 24 +++-
 2 files changed, 6 insertions(+), 42 deletions(-)

-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [ANNOUNCE] Linux Kernel Media mini-summit on Oct, 16-17 in Düsseldorf, Germany

2014-09-18 Thread Michael Ira Krufky
Hey all...  It looks like I will be in Dusseldorf that week as well.
:-)  See you next month!

-Mike Ira Krufky

On Tue, Sep 2, 2014 at 8:58 AM, Mauro Carvalho Chehab
m.che...@samsung.com wrote:
 Em Tue, 02 Sep 2014 12:03:34 +0200
 Philipp Zabel p.za...@pengutronix.de escreveu:

 Hi,

 Am Mittwoch, den 13.08.2014, 10:14 -0300 schrieb Mauro Carvalho Chehab:
  Hi,
 
  As there are still too things to be discussed in order to improve media
  stuff, and most of the developers nowadays are located in Europe and
  usually go to ELCE, we're scheduling a two day mini-summit in Düsseldorf,
  Germany, on Thrusday/Friday.

 Is this a tentative schedule, or is the date set? I.e. can I book a
 hotel until Friday now and not worry about having to reschedule?

 It is all set.

 Regards,
 Mauro
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] em28xx-v4l: get rid of field users in struct em28xx_v4l2

2014-09-18 Thread Frank Schäfer

Hi Hans,

Am 18.09.2014 um 21:13 schrieb Hans Verkuil:
 Hi Frank,

 On 07/25/2014 07:48 PM, Frank Schäfer wrote:
 Instead of counting the number of opened file handles, use function
 v4l2_fh_is_singular_file() in em28xx_v4l2_open() and em28xx_v4l2_close() to
 determine if the file handle is the first/last opened one.
 This won't work: if you capture from both /dev/video and /dev/vbi and close
 one, then it stops all streaming.
You are 100% right, v4l2_fh_is_singular() is a per device _node_ check.
How could I miss that ? :/

 I would just revert this patch completely.

 There is currently no core support for detecting when all users of all devices
 registered by a driver have left, so you don't have really have an alternative
 but to use your old code.
Indeed. I will send a revert patch.
Thanks for the hint !

Regards,
Frank



 Regards,

   Hans

 Signed-off-by: Frank Schäfer fschaefer@googlemail.com
 ---
  drivers/media/usb/em28xx/em28xx-video.c | 23 +--
  drivers/media/usb/em28xx/em28xx.h   |  1 -
  2 files changed, 13 insertions(+), 11 deletions(-)

 diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
 b/drivers/media/usb/em28xx/em28xx-video.c
 index 3a7ec3b..087ccf9 100644
 --- a/drivers/media/usb/em28xx/em28xx-video.c
 +++ b/drivers/media/usb/em28xx/em28xx-video.c
 @@ -1883,9 +1883,8 @@ static int em28xx_v4l2_open(struct file *filp)
  return -EINVAL;
  }
  
 -em28xx_videodbg(open dev=%s type=%s users=%d\n,
 -video_device_node_name(vdev), v4l2_type_names[fh_type],
 -v4l2-users);
 +em28xx_videodbg(open dev=%s type=%s\n,
 +video_device_node_name(vdev), v4l2_type_names[fh_type]);
  
  if (mutex_lock_interruptible(dev-lock))
  return -ERESTARTSYS;
 @@ -1898,7 +1897,9 @@ static int em28xx_v4l2_open(struct file *filp)
  return ret;
  }
  
 -if (v4l2-users == 0) {
 +if (v4l2_fh_is_singular_file(filp)) {
 +em28xx_videodbg(first opened filehandle, initializing 
 device\n);
 +
  em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
  
  if (vdev-vfl_type != VFL_TYPE_RADIO)
 @@ -1909,6 +1910,8 @@ static int em28xx_v4l2_open(struct file *filp)
   * of some i2c devices
   */
  em28xx_wake_i2c(dev);
 +} else {
 +em28xx_videodbg(further filehandles are already opened\n);
  }
  
  if (vdev-vfl_type == VFL_TYPE_RADIO) {
 @@ -1918,7 +1921,6 @@ static int em28xx_v4l2_open(struct file *filp)
  
  kref_get(dev-ref);
  kref_get(v4l2-ref);
 -v4l2-users++;
  
  mutex_unlock(dev-lock);
  
 @@ -2025,12 +2027,11 @@ static int em28xx_v4l2_close(struct file *filp)
  struct em28xx_v4l2*v4l2 = dev-v4l2;
  int  errCode;
  
 -em28xx_videodbg(users=%d\n, v4l2-users);
 -
 -vb2_fop_release(filp);
  mutex_lock(dev-lock);
  
 -if (v4l2-users == 1) {
 +if (v4l2_fh_is_singular_file(filp)) {
 +em28xx_videodbg(last opened filehandle, shutting down 
 device\n);
 +
  /* No sense to try to write to the device */
  if (dev-disconnected)
  goto exit;
 @@ -2049,10 +2050,12 @@ static int em28xx_v4l2_close(struct file *filp)
  em28xx_errdev(cannot change alternate number to 
  0 (error=%i)\n, errCode);
  }
 +} else {
 +em28xx_videodbg(further opened filehandles left\n);
  }
  
  exit:
 -v4l2-users--;
 +vb2_fop_release(filp);
  kref_put(v4l2-ref, em28xx_free_v4l2);
  mutex_unlock(dev-lock);
  kref_put(dev-ref, em28xx_free_device);
 diff --git a/drivers/media/usb/em28xx/em28xx.h 
 b/drivers/media/usb/em28xx/em28xx.h
 index 4360338..84ef8ef 100644
 --- a/drivers/media/usb/em28xx/em28xx.h
 +++ b/drivers/media/usb/em28xx/em28xx.h
 @@ -524,7 +524,6 @@ struct em28xx_v4l2 {
  int sensor_yres;
  int sensor_xtal;
  
 -int users;  /* user count for exclusive use */
  int streaming_users;/* number of actively streaming users */
  
  u32 frequency;  /* selected tuner frequency */


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH for 3.17] Revert [media] em28xx-v4l: get rid of field users in struct em28xx_v4l2

2014-09-18 Thread Frank Schäfer
This reverts commit 747dba7de2a51a3db58b665ed3bc8c07921546ec.

It breaks concurrent vbi and video capturing:
While v4l2-users is the number of users of the whole device (all device nodes),
v4l2_fh_is_singular() only checks the number of users of a specific device node.
As a result. if one device node is open and a second device node is opened
(closed), the device is reinitialized (streaming is stopped).

Reported-by: Hans Verkuil hans.verk...@cisco.com
Signed-off-by: Frank Schäfer fschaefer@googlemail.com
---
 drivers/media/usb/em28xx/em28xx-video.c | 23 ++-
 drivers/media/usb/em28xx/em28xx.h   |  1 +
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
b/drivers/media/usb/em28xx/em28xx-video.c
index 90dec29..cef266c 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1883,8 +1883,9 @@ static int em28xx_v4l2_open(struct file *filp)
return -EINVAL;
}
 
-   em28xx_videodbg(open dev=%s type=%s\n,
-   video_device_node_name(vdev), v4l2_type_names[fh_type]);
+   em28xx_videodbg(open dev=%s type=%s users=%d\n,
+   video_device_node_name(vdev), v4l2_type_names[fh_type],
+   v4l2-users);
 
if (mutex_lock_interruptible(dev-lock))
return -ERESTARTSYS;
@@ -1897,9 +1898,7 @@ static int em28xx_v4l2_open(struct file *filp)
return ret;
}
 
-   if (v4l2_fh_is_singular_file(filp)) {
-   em28xx_videodbg(first opened filehandle, initializing 
device\n);
-
+   if (v4l2-users == 0) {
em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
 
if (vdev-vfl_type != VFL_TYPE_RADIO)
@@ -1910,8 +1909,6 @@ static int em28xx_v4l2_open(struct file *filp)
 * of some i2c devices
 */
em28xx_wake_i2c(dev);
-   } else {
-   em28xx_videodbg(further filehandles are already opened\n);
}
 
if (vdev-vfl_type == VFL_TYPE_RADIO) {
@@ -1921,6 +1918,7 @@ static int em28xx_v4l2_open(struct file *filp)
 
kref_get(dev-ref);
kref_get(v4l2-ref);
+   v4l2-users++;
 
mutex_unlock(dev-lock);
 
@@ -2027,11 +2025,12 @@ static int em28xx_v4l2_close(struct file *filp)
struct em28xx_v4l2*v4l2 = dev-v4l2;
int  errCode;
 
-   mutex_lock(dev-lock);
+   em28xx_videodbg(users=%d\n, v4l2-users);
 
-   if (v4l2_fh_is_singular_file(filp)) {
-   em28xx_videodbg(last opened filehandle, shutting down 
device\n);
+   vb2_fop_release(filp);
+   mutex_lock(dev-lock);
 
+   if (v4l2-users == 1) {
/* No sense to try to write to the device */
if (dev-disconnected)
goto exit;
@@ -2050,12 +2049,10 @@ static int em28xx_v4l2_close(struct file *filp)
em28xx_errdev(cannot change alternate number to 
0 (error=%i)\n, errCode);
}
-   } else {
-   em28xx_videodbg(further opened filehandles left\n);
}
 
 exit:
-   vb2_fop_release(filp);
+   v4l2-users--;
kref_put(v4l2-ref, em28xx_free_v4l2);
mutex_unlock(dev-lock);
kref_put(dev-ref, em28xx_free_device);
diff --git a/drivers/media/usb/em28xx/em28xx.h 
b/drivers/media/usb/em28xx/em28xx.h
index 84ef8ef..4360338 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -524,6 +524,7 @@ struct em28xx_v4l2 {
int sensor_yres;
int sensor_xtal;
 
+   int users;  /* user count for exclusive use */
int streaming_users;/* number of actively streaming users */
 
u32 frequency;  /* selected tuner frequency */
-- 
1.8.4.5

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] vb2: Buffers returned to videobuf2 from start_streaming in QUEUED state

2014-09-18 Thread Sakari Ailus
Patch [media] v4l: vb2: Fix stream start and buffer completion race has a
sets q-start_streaming_called before calling queue op start_streaming() in
order to fix a bug. This has the side effect that buffers returned to
videobuf2 in VB2_BUF_STATE_QUEUED will cause a WARN_ON() to be called.

Add a new field called done_buffers_queued_state to struct vb2_queue, which
must be set if the new state of buffers returned to videobuf2 must be
VB2_BUF_STATE_QUEUED, i.e. buffers returned in start_streaming op.

Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
Cc: Hans Verkuil hverk...@xs4all.nl
---
 drivers/media/v4l2-core/videobuf2-core.c |5 +++--
 include/media/videobuf2-core.h   |4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 7e6aff6..202e2a5 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1174,7 +1174,7 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum 
vb2_buffer_state state)
if (WARN_ON(vb-state != VB2_BUF_STATE_ACTIVE))
return;
 
-   if (!q-start_streaming_called) {
+   if (q-done_buffers_queued_state) {
if (WARN_ON(state != VB2_BUF_STATE_QUEUED))
state = VB2_BUF_STATE_QUEUED;
} else if (WARN_ON(state != VB2_BUF_STATE_DONE 
@@ -1742,9 +1742,10 @@ static int vb2_start_streaming(struct vb2_queue *q)
__enqueue_in_driver(vb);
 
/* Tell the driver to start streaming */
-   q-start_streaming_called = 1;
+   q-done_buffers_queued_state = q-start_streaming_called = 1;
ret = call_qop(q, start_streaming, q,
   atomic_read(q-owned_by_drv_count));
+   q-done_buffers_queued_state = 0;
if (!ret)
return 0;
 
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 5a10d8d..7c0dac6 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -380,6 +380,9 @@ struct v4l2_fh;
  * @streaming: current streaming state
  * @start_streaming_called: start_streaming() was called successfully and we
  * started streaming.
+ * @done_buffers_queued_state: buffers returned to videobuf2 must go
+ * to VB2_BUF_STATE_QUEUED state. This is the case whilst
+ * the driver's start_streaming op is called.
  * @error: a fatal error occurred on the queue
  * @fileio:file io emulator internal data, used only if emulator is active
  * @threadio:  thread io internal data, used only if thread is active
@@ -418,6 +421,7 @@ struct vb2_queue {
 
unsigned intstreaming:1;
unsigned intstart_streaming_called:1;
+   unsigned intdone_buffers_queued_state:1;
unsigned interror:1;
 
struct vb2_fileio_data  *fileio;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] omap3isp: Move starting the sensor from streamon IOCTL handler to VB2 QOP

2014-09-18 Thread Sakari Ailus
Move the starting of the sensor from the VIDIOC_STREAMON handler to the
videobuf2 queue op start_streaming. This avoids failing starting the stream
after vb2_streamon() has already finished.

Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
---
 drivers/media/platform/omap3isp/ispvideo.c |   49 +---
 1 file changed, 30 insertions(+), 19 deletions(-)

diff --git a/drivers/media/platform/omap3isp/ispvideo.c 
b/drivers/media/platform/omap3isp/ispvideo.c
index bc38c88..b233c8e 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -425,10 +425,40 @@ static void isp_video_buffer_queue(struct vb2_buffer *buf)
}
 }
 
+static int isp_video_start_streaming(struct vb2_queue *queue,
+unsigned int count)
+{
+   struct isp_video_fh *vfh = vb2_get_drv_priv(queue);
+   struct isp_video *video = vfh-video;
+   struct isp_pipeline *pipe = to_isp_pipeline(video-video.entity);
+   unsigned long flags;
+   int ret;
+
+   /* In sensor-to-memory mode, the stream can be started synchronously
+* to the stream on command. In memory-to-memory mode, it will be
+* started when buffers are queued on both the input and output.
+*/
+   if (pipe-input)
+   return 0;
+
+   ret = omap3isp_pipeline_set_stream(pipe,
+  ISP_PIPELINE_STREAM_CONTINUOUS);
+   if (ret  0)
+   return ret;
+
+   spin_lock_irqsave(video-irqlock, flags);
+   if (list_empty(video-dmaqueue))
+   video-dmaqueue_flags |= ISP_VIDEO_DMAQUEUE_UNDERRUN;
+   spin_unlock_irqrestore(video-irqlock, flags);
+
+   return 0;
+}
+
 static const struct vb2_ops isp_video_queue_ops = {
.queue_setup = isp_video_queue_setup,
.buf_prepare = isp_video_buffer_prepare,
.buf_queue = isp_video_buffer_queue,
+   .start_streaming = isp_video_start_streaming,
 };
 
 /*
@@ -1077,28 +1107,9 @@ isp_video_streamon(struct file *file, void *fh, enum 
v4l2_buf_type type)
if (ret  0)
goto err_check_format;
 
-   /* In sensor-to-memory mode, the stream can be started synchronously
-* to the stream on command. In memory-to-memory mode, it will be
-* started when buffers are queued on both the input and output.
-*/
-   if (pipe-input == NULL) {
-   ret = omap3isp_pipeline_set_stream(pipe,
- ISP_PIPELINE_STREAM_CONTINUOUS);
-   if (ret  0)
-   goto err_set_stream;
-   spin_lock_irqsave(video-irqlock, flags);
-   if (list_empty(video-dmaqueue))
-   video-dmaqueue_flags |= ISP_VIDEO_DMAQUEUE_UNDERRUN;
-   spin_unlock_irqrestore(video-irqlock, flags);
-   }
-
mutex_unlock(video-stream_lock);
return 0;
 
-err_set_stream:
-   mutex_lock(video-queue_lock);
-   vb2_streamoff(vfh-queue, type);
-   mutex_unlock(video-queue_lock);
 err_check_format:
media_entity_pipeline_stop(video-video.entity);
 err_pipeline_start:
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] omap3isp: Return buffers back to videobuf2 if pipeline streamon fails

2014-09-18 Thread Sakari Ailus
When the video buffer queue was stopped before the stream source was started
in omap3isp_streamon(), the buffers were not returned back to videobuf2.

Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
---
 drivers/media/platform/omap3isp/isp.c  |4 ++--
 drivers/media/platform/omap3isp/ispvideo.c |   16 ++--
 drivers/media/platform/omap3isp/ispvideo.h |3 ++-
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index 72265e5..2aa0a8e 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -1062,9 +1062,9 @@ int omap3isp_pipeline_set_stream(struct isp_pipeline 
*pipe,
 void omap3isp_pipeline_cancel_stream(struct isp_pipeline *pipe)
 {
if (pipe-input)
-   omap3isp_video_cancel_stream(pipe-input);
+   omap3isp_video_cancel_stream(pipe-input, VB2_BUF_STATE_ERROR);
if (pipe-output)
-   omap3isp_video_cancel_stream(pipe-output);
+   omap3isp_video_cancel_stream(pipe-output, VB2_BUF_STATE_ERROR);
 }
 
 /*
diff --git a/drivers/media/platform/omap3isp/ispvideo.c 
b/drivers/media/platform/omap3isp/ispvideo.c
index b233c8e..73c0194 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -443,8 +443,10 @@ static int isp_video_start_streaming(struct vb2_queue 
*queue,
 
ret = omap3isp_pipeline_set_stream(pipe,
   ISP_PIPELINE_STREAM_CONTINUOUS);
-   if (ret  0)
+   if (ret  0) {
+   omap3isp_video_cancel_stream(video, VB2_BUF_STATE_QUEUED);
return ret;
+   }
 
spin_lock_irqsave(video-irqlock, flags);
if (list_empty(video-dmaqueue))
@@ -566,10 +568,12 @@ struct isp_buffer *omap3isp_video_buffer_next(struct 
isp_video *video)
  * omap3isp_video_cancel_stream - Cancel stream on a video node
  * @video: ISP video object
  *
- * Cancelling a stream mark all buffers on the video node as erroneous and 
makes
- * sure no new buffer can be queued.
+ * Cancelling a stream mark all buffers on the video node as erroneous
+ * and makes sure no new buffer can be queued. Buffers are returned
+ * back to videobuf2 in the given state.
  */
-void omap3isp_video_cancel_stream(struct isp_video *video)
+void omap3isp_video_cancel_stream(struct isp_video *video,
+ enum vb2_buffer_state state)
 {
unsigned long flags;
 
@@ -581,7 +585,7 @@ void omap3isp_video_cancel_stream(struct isp_video *video)
buf = list_first_entry(video-dmaqueue,
   struct isp_buffer, irqlist);
list_del(buf-irqlist);
-   vb2_buffer_done(buf-vb, VB2_BUF_STATE_ERROR);
+   vb2_buffer_done(buf-vb, state);
}
 
video-error = true;
@@ -1166,7 +1170,7 @@ isp_video_streamoff(struct file *file, void *fh, enum 
v4l2_buf_type type)
 
/* Stop the stream. */
omap3isp_pipeline_set_stream(pipe, ISP_PIPELINE_STREAM_STOPPED);
-   omap3isp_video_cancel_stream(video);
+   omap3isp_video_cancel_stream(video, VB2_BUF_STATE_ERROR);
 
mutex_lock(video-queue_lock);
vb2_streamoff(vfh-queue, type);
diff --git a/drivers/media/platform/omap3isp/ispvideo.h 
b/drivers/media/platform/omap3isp/ispvideo.h
index 0b7efed..7e4732a 100644
--- a/drivers/media/platform/omap3isp/ispvideo.h
+++ b/drivers/media/platform/omap3isp/ispvideo.h
@@ -201,7 +201,8 @@ int omap3isp_video_register(struct isp_video *video,
struct v4l2_device *vdev);
 void omap3isp_video_unregister(struct isp_video *video);
 struct isp_buffer *omap3isp_video_buffer_next(struct isp_video *video);
-void omap3isp_video_cancel_stream(struct isp_video *video);
+void omap3isp_video_cancel_stream(struct isp_video *video,
+ enum vb2_buffer_state state);
 void omap3isp_video_resume(struct isp_video *video, int continuous);
 struct media_pad *omap3isp_video_remote_pad(struct isp_video *video);
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] vb2 and omap3isp driver fixes

2014-09-18 Thread Sakari Ailus
Hi Hans, Laurent and others,

This small set fixes a videobuf2 issue related to returning queued buffers
back to the driver. I found it after hopefully fixing a related issue (two
later patches) in the omap3isp driver.

The patchset has been tested up to streamon, but no buffers have been
successfully dequeued. That's exactly the remaining unresolved technical
problem from the N9 DT camera support patchset: I get no ISP interrupts at
all.

-- 
Kind regards,
Sakari

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] libdvbv5: MPEG TS parser documentation and cleanups

2014-09-18 Thread André Roth
Documents the table parser for MPEG-PES. Cleanup doxygen of
other parsers.

Signed-off-by: André Roth neol...@gmail.com
---
 doxygen_libdvbv5.cfg|   3 +-
 lib/include/libdvbv5/mpeg_es.h  |  11 ++-
 lib/include/libdvbv5/mpeg_pes.h | 146 ++--
 lib/include/libdvbv5/mpeg_ts.h  |  18 +++--
 4 files changed, 164 insertions(+), 14 deletions(-)

diff --git a/doxygen_libdvbv5.cfg b/doxygen_libdvbv5.cfg
index bbdaf9a..45bbdbd 100644
--- a/doxygen_libdvbv5.cfg
+++ b/doxygen_libdvbv5.cfg
@@ -764,8 +764,9 @@ INPUT  = $(SRCDIR)/doc/libdvbv5-index.doc \
 $(SRCDIR)/lib/include/libdvbv5/sdt.h \
 $(SRCDIR)/lib/include/libdvbv5/vct.h \
 $(SRCDIR)/lib/include/libdvbv5/crc32.h \
-$(SRCDIR)/lib/include/libdvbv5/mpeg_es.h \
 $(SRCDIR)/lib/include/libdvbv5/mpeg_ts.h \
+$(SRCDIR)/lib/include/libdvbv5/mpeg_pes.h \
+$(SRCDIR)/lib/include/libdvbv5/mpeg_es.h \
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/lib/include/libdvbv5/mpeg_es.h b/lib/include/libdvbv5/mpeg_es.h
index cc2156b..ac3ea13 100644
--- a/lib/include/libdvbv5/mpeg_es.h
+++ b/lib/include/libdvbv5/mpeg_es.h
@@ -70,7 +70,8 @@
 
 /**
  * @struct dvb_mpeg_es_seq_start
- * @brief Sequence header
+ * @brief MPEG ES Sequence header
+ * @ingroup dvb_table
  *
  * @param type DVB_MPEG_ES_SEQ_START
  * @param sync Sync bytes
@@ -117,7 +118,8 @@ struct dvb_mpeg_es_seq_start {
 
 /**
  * @struct dvb_mpeg_es_pic_start
- * @brief Picture start header
+ * @brief MPEG ES Picture start header
+ * @ingroup dvb_table
  *
  * @param type DVB_MPEG_ES_PIC_START
  * @param sync Sync bytes
@@ -172,6 +174,7 @@ enum dvb_mpeg_es_frame_t
 
 /**
  * @brief Vector that translates from enum dvb_mpeg_es_frame_t to string.
+ * @ingroup dvb_table
  */
 extern const char *dvb_mpeg_es_frame_names[5];
 
@@ -183,6 +186,7 @@ extern C {
 
 /**
  * @brief Initialize a struct dvb_mpeg_es_seq_start from buffer
+ * @ingroup dvb_table
  *
  * @param buf  Buffer
  * @param buflen   Length of buffer
@@ -199,6 +203,7 @@ int  dvb_mpeg_es_seq_start_init (const uint8_t *buf, 
ssize_t buflen,
 
 /**
  * @brief Print details of struct dvb_mpeg_es_seq_start
+ * @ingroup dvb_table
  *
  * @param parmsstruct dvb_v5_fe_parms for log functions
  * @param seq_startPointer to struct dvb_mpeg_es_seq_start to print
@@ -210,6 +215,7 @@ void dvb_mpeg_es_seq_start_print(struct dvb_v5_fe_parms 
*parms,
 
 /**
  * @brief Initialize a struct dvb_mpeg_es_pic_start from buffer
+ * @ingroup dvb_table
  *
  * @param buf  Buffer
  * @param buflen   Length of buffer
@@ -226,6 +232,7 @@ int  dvb_mpeg_es_pic_start_init (const uint8_t *buf, 
ssize_t buflen,
 
 /**
  * @brief Print details of struct dvb_mpeg_es_pic_start
+ * @ingroup dvb_table
  *
  * @param parmsstruct dvb_v5_fe_parms for log functions
  * @param pic_startPointer to struct dvb_mpeg_es_pic_start to print
diff --git a/lib/include/libdvbv5/mpeg_pes.h b/lib/include/libdvbv5/mpeg_pes.h
index 5889df7..1f24f99 100644
--- a/lib/include/libdvbv5/mpeg_pes.h
+++ b/lib/include/libdvbv5/mpeg_pes.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 - Andre Roth neol...@gmail.com
+ * Copyright (c) 2013-2014 - Andre Roth neol...@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,10 +21,66 @@
 #ifndef _MPEG_PES_H
 #define _MPEG_PES_H
 
+/**
+ * @file mpeg_pes.h
+ * @ingroup dvb_table
+ * @brief Provides the table parser for the MPEG-PES Elementary Stream
+ * @copyright GNU General Public License version 2 (GPLv2)
+ * @author Andre Roth
+ *
+ * @par Relevant specs
+ * The table described herein is defined in ISO 13818-1
+ *
+ * @see
+ * http://dvd.sourceforge.net/dvdinfo/pes-hdr.html
+ *
+ * @par Bug Report
+ * Please submit bug reports and patches to linux-media@vger.kernel.org
+ */
+
 #include stdint.h
 #include unistd.h /* ssize_t */
 
+
+/**
+ * @def DVB_MPEG_PES
+ * @brief MPEG Packetized Elementary Stream magic
+ * @ingroup dvb_table
+ * @def DVB_MPEG_PES_AUDIO
+ * @brief PES Audio
+ * @ingroup dvb_table
+ * @def DVB_MPEG_PES_VIDEO
+ * @brief PES Video
+ * @ingroup dvb_table
+ * @def DVB_MPEG_STREAM_MAP
+ * @brief PES Stream map
+ * @ingroup dvb_table
+ * @def DVB_MPEG_STREAM_PADDING
+ * @brief PES padding
+ * @ingroup dvb_table
+ * @def DVB_MPEG_STREAM_PRIVATE_2
+ * @brief PES private
+ * @ingroup dvb_table
+ * @def DVB_MPEG_STREAM_ECM
+ * @brief PES ECM Stream
+ * @ingroup dvb_table
+ * @def DVB_MPEG_STREAM_EMM
+ * @brief PES EMM Stream
+ * @ingroup dvb_table
+ * @def 

cron job: media_tree daily build: ERRORS

2014-09-18 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:   Fri Sep 19 04:00:17 CEST 2014
git branch: test
git hash:   f5281fc81e9a0a3e80b78720c5ae2ed06da3bfae
gcc version:i686-linux-gcc (GCC) 4.9.1
sparse version: v0.5.0-20-g7abd8a7
host hardware:  x86_64
host os:3.16-2.slh.3-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: WARNINGS
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: WARNINGS
linux-3.12.23-i686: WARNINGS
linux-3.13.11-i686: WARNINGS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: WARNINGS
linux-3.16-i686: WARNINGS
linux-3.17-rc1-i686: WARNINGS
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: WARNINGS
linux-3.12.23-x86_64: WARNINGS
linux-3.13.11-x86_64: WARNINGS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16-x86_64: WARNINGS
linux-3.17-rc1-x86_64: WARNINGS
apps: OK
spec-git: OK
sparse: ERRORS
sparse: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Friday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Friday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html