[RFC ATTN] Cropping, composing, scaling and S_FMT

2014-06-02 Thread Hans Verkuil
During the media mini-summit I went through all 8 combinations of cropping,
composing and scaling (i.e. none of these features is present, or only cropping,
only composing, etc.).

In particular I showed what I thought should happen if you change a crop 
rectangle,
compose rectangle or the format rectangle (VIDIOC_S_FMT).

In my proposal the format rectangle would increase in size if you attempt to set
the compose rectangle wholly or partially outside the current format rectangle.
Most (all?) of the developers present didn't like that and I was asked to take
another look at that.

After looking at this some more I realized that there was no need for this and
it is OK to constrain a compose rectangle to the current format rectangle. All
you need to do if you want to place the compose rectangle outside of the format
rectangle is to just change the format rectangle first. If the driver supports
composition then increasing the format rectangle will not change anything else,
so that is a safe operation without side-effects.

However, changing the crop rectangle *can* change the format rectangle. In the
simple case of hardware that just supports cropping this is obvious, since
the crop and format rectangles must always be of the same size, so changing
one will change the other. But if you throw in a scaler as well, you usually
still have such constraints based on the scaler capabilities.

So assuming a scaler that can only scale 4 times (or less) up or down in each
direction, then setting a crop rectangle of 240x160 will require that the
format rectangle has a width in the range of 240/4 - 240*4 (60-960) and a
height in the range of 160/4 - 160*4 (40-640). Anything outside of that will
have to be corrected.

In my opinion this is valid behavior, and the specification also clearly
specifies in the VIDIOC_S_CROP and VIDIOC_S_SELECTION documentation that the
format may change after changing the crop rectangle.

Note that for output streams the role of crop and compose is swapped. So for
output streams it is the crop rectangle that will always be constrained by
the format rectangle, and it is the compose rectangle that might change the
format rectangle based on scaler constraints.

I think this makes sense and unless there are comments this is what I plan
to implement in my vivi rewrite which supports all these crop/compose/scale
combinations.

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] staging/media/rtl2832u_sdr: fix coding style problems

2014-06-02 Thread Dan Carpenter
On Sun, Jun 01, 2014 at 01:00:17PM -0700, Ovidiu Toader wrote:
 motivation: eudyptula challenge
 
 This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c
 
 The new version of the file pleases checkpatch.pl when run with
 --ignore LONG_LINE.
 

 Signed-off-by: Ovidiu Toader o...@phas.ubc.ca

Send the patch inline, not as an attachment.

Read the first paragraph.
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt

The subject should say something about adding blank lines.

regards,
dan carpenter

--
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


Kedves Email felhasználói;

2014-06-02 Thread Administrator System ®



-- 

Kedves felhasználók e-mailben;

Túllépte 23432 box set
Web Service / Admin, és akkor nem lesz probléma a küldő és
fogadhat e-maileket, amíg újra ellenőrizni. Kérjük, frissítse kattintva
linkre, és töltse ki az adatokat, hogy ellenőrizze a számla
Kérjük, kövesse az alábbi linkre, és majd másolja és illessze be a böngésző
jelölőnégyzetet.

http://mailupdatety.jigsy.com/
Figyelem!
Ha nem, csak korlátozott hozzáférést az e-mail postafiókját. ha
frissíteni? számla frissül három napon belül
Értesítés a számla véglegesen be kell zárni.
Tisztelettel,
rendszergazda


--
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] media-ctl: Move flags printing code to a new print_flags function

2014-06-02 Thread Laurent Pinchart
This will allow reusing the flag printing code for the DV timings flags.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 utils/media-ctl/media-ctl.c | 43 +--
 1 file changed, 29 insertions(+), 14 deletions(-)

diff --git a/utils/media-ctl/media-ctl.c b/utils/media-ctl/media-ctl.c
index d48969f..44c9644 100644
--- a/utils/media-ctl/media-ctl.c
+++ b/utils/media-ctl/media-ctl.c
@@ -48,6 +48,33 @@
  * Printing
  */
 
+struct flag_name {
+   __u32 flag;
+   char *name;
+};
+
+static void print_flags(const struct flag_name *flag_names, unsigned int 
num_entries, __u32 flags)
+{
+   bool first = true;
+   unsigned int i;
+
+   for (i = 0; i  num_entries; i++) {
+   if (!(flags  flag_names[i].flag))
+   continue;
+   if (!first)
+   printf(,);
+   printf(%s, flag_names[i].name);
+   flags = ~flag_names[i].flag;
+   first = false;
+   }
+
+   if (flags) {
+   if (!first)
+   printf(,);
+   printf(0x%x, flags);
+   }
+}
+
 static void v4l2_subdev_print_format(struct media_entity *entity,
unsigned int pad, enum v4l2_subdev_format_whence which)
 {
@@ -255,10 +282,7 @@ static void media_print_topology_dot(struct media_device 
*media)
 
 static void media_print_topology_text(struct media_device *media)
 {
-   static const struct {
-   __u32 flag;
-   char *name;
-   } link_flags[] = {
+   static const struct flag_name link_flags[] = {
{ MEDIA_LNK_FL_ENABLED, ENABLED },
{ MEDIA_LNK_FL_IMMUTABLE, IMMUTABLE },
{ MEDIA_LNK_FL_DYNAMIC, DYNAMIC },
@@ -299,8 +323,6 @@ static void media_print_topology_text(struct media_device 
*media)
const struct media_link *link = 
media_entity_get_link(entity, k);
const struct media_pad *source = link-source;
const struct media_pad *sink = link-sink;
-   bool first = true;
-   unsigned int i;
 
if (source-entity == entity  source-index 
== j)
printf(\t\t- \%s\:%u [,
@@ -313,14 +335,7 @@ static void media_print_topology_text(struct media_device 
*media)
else
continue;
 
-   for (i = 0; i  ARRAY_SIZE(link_flags); i++) {
-   if (!(link-flags  link_flags[i].flag))
-   continue;
-   if (!first)
-   printf(,);
-   printf(%s, link_flags[i].name);
-   first = false;
-   }
+   print_flags(link_flags, ARRAY_SIZE(link_flags), 
link-flags);
 
printf(]\n);
}
-- 
1.8.5.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 3/3] media-ctl: Add DV timings support

2014-06-02 Thread Laurent Pinchart
Support printing (with -p) and setting (with --set-dv) DV timings at the
pad level.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 utils/media-ctl/media-ctl.c | 179 ++--
 utils/media-ctl/options.c   |   9 ++-
 utils/media-ctl/options.h   |   3 +-
 3 files changed, 184 insertions(+), 7 deletions(-)

diff --git a/utils/media-ctl/media-ctl.c b/utils/media-ctl/media-ctl.c
index 44c9644..319aa5d 100644
--- a/utils/media-ctl/media-ctl.c
+++ b/utils/media-ctl/media-ctl.c
@@ -121,6 +121,140 @@ static void v4l2_subdev_print_format(struct media_entity 
*entity,
printf(]\n);
 }
 
+static const char *v4l2_dv_type_to_string(unsigned int type)
+{
+   static const struct {
+   __u32 type;
+   const char *name;
+   } types[] = {
+   { V4L2_DV_BT_656_1120, BT.656/1120 },
+   };
+
+   static char unknown[20];
+   unsigned int i;
+
+   for (i = 0; i  ARRAY_SIZE(types); i++) {
+   if (types[i].type == type)
+   return types[i].name;
+   }
+
+   sprintf(unknown, Unknown (%u), type);
+   return unknown;
+}
+
+static const struct flag_name bt_standards[] = {
+   { V4L2_DV_BT_STD_CEA861, CEA-861 },
+   { V4L2_DV_BT_STD_DMT, DMT },
+   { V4L2_DV_BT_STD_CVT, CVT },
+   { V4L2_DV_BT_STD_GTF, GTF },
+};
+
+static const struct flag_name bt_capabilities[] = {
+   { V4L2_DV_BT_CAP_INTERLACED, interlaced },
+   { V4L2_DV_BT_CAP_PROGRESSIVE, progressive },
+   { V4L2_DV_BT_CAP_REDUCED_BLANKING, reduced-blanking },
+   { V4L2_DV_BT_CAP_CUSTOM, custom },
+};
+
+static const struct flag_name bt_flags[] = {
+   { V4L2_DV_FL_REDUCED_BLANKING, reduced-blanking },
+   { V4L2_DV_FL_CAN_REDUCE_FPS, can-reduce-fps },
+   { V4L2_DV_FL_REDUCED_FPS, reduced-fps },
+   { V4L2_DV_FL_HALF_LINE, half-line },
+};
+
+static void v4l2_subdev_print_dv_timings(const struct v4l2_dv_timings *timings,
+const char *name)
+{
+   printf(\t\t[dv.%s:%s, name, v4l2_dv_type_to_string(timings-type));
+
+   switch (timings-type) {
+   case V4L2_DV_BT_656_1120: {
+   const struct v4l2_bt_timings *bt = timings-bt;
+   unsigned int htotal, vtotal;
+
+   htotal = V4L2_DV_BT_FRAME_WIDTH(bt);
+   vtotal = V4L2_DV_BT_FRAME_HEIGHT(bt);
+
+   printf( %ux%u%s%llu (%ux%u),
+  bt-width, bt-height, bt-interlaced ? i : p,
+  (htotal * vtotal)  0 ? (bt-pixelclock / (htotal * 
vtotal)) : 0,
+  htotal, vtotal);
+
+   printf( stds:);
+   print_flags(bt_standards, ARRAY_SIZE(bt_standards),
+   bt-standards);
+   printf( flags:);
+   print_flags(bt_flags, ARRAY_SIZE(bt_flags),
+   bt-flags);
+
+   break;
+   }
+   }
+
+   printf(]\n);
+}
+
+static void v4l2_subdev_print_pad_dv(struct media_entity *entity,
+   unsigned int pad, enum v4l2_subdev_format_whence which)
+{
+   struct v4l2_dv_timings_cap caps;
+   int ret;
+
+   caps.pad = pad;
+   ret = v4l2_subdev_get_dv_timings_caps(entity, caps);
+   if (ret != 0)
+   return;
+
+   printf(\t\t[dv.caps:%s, v4l2_dv_type_to_string(caps.type));
+
+   switch (caps.type) {
+   case V4L2_DV_BT_656_1120:
+   printf( min:%ux%u@%llu max:%ux%u@%llu,
+  caps.bt.min_width, caps.bt.min_height, 
caps.bt.min_pixelclock,
+  caps.bt.max_width, caps.bt.max_height, 
caps.bt.max_pixelclock);
+
+   printf( stds:);
+   print_flags(bt_standards, ARRAY_SIZE(bt_standards),
+   caps.bt.standards);
+   printf( caps:);
+   print_flags(bt_capabilities, ARRAY_SIZE(bt_capabilities),
+   caps.bt.capabilities);
+
+   break;
+   }
+
+   printf(]\n);
+}
+
+static void v4l2_subdev_print_subdev_dv(struct media_entity *entity)
+{
+   struct v4l2_dv_timings timings;
+   int ret;
+
+   ret = v4l2_subdev_query_dv_timings(entity, timings);
+   switch (ret) {
+   case -ENOLINK:
+   printf(\t\t[dv.query:no-link]\n);
+   break;
+   case -ENOLCK:
+   printf(\t\t[dv.query:no-lock]\n);
+   break;
+   case -ERANGE:
+   printf(\t\t[dv.query:out-of-range]\n);
+   break;
+   case 0:
+   v4l2_subdev_print_dv_timings(timings, detect);
+   break;
+   default:
+   return;
+   }
+
+   ret = v4l2_subdev_get_dv_timings(entity, timings);
+   if (ret == 0)
+   v4l2_subdev_print_dv_timings(timings, current);
+}
+
 static const char *media_entity_type_to_string(unsigned type)
 {
static const struct {
@@ -280,6 

[PATCH 1/3] media-ctl: libv4l2subdev: Add DV timings support

2014-06-02 Thread Laurent Pinchart
Expose the pad-level get caps, query, get and set DV timings ioctls.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 utils/media-ctl/libv4l2subdev.c | 72 +
 utils/media-ctl/v4l2subdev.h| 53 ++
 2 files changed, 125 insertions(+)

diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 14daffa..8015330 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -189,6 +189,78 @@ int v4l2_subdev_set_selection(struct media_entity *entity,
return 0;
 }
 
+int v4l2_subdev_get_dv_timings_caps(struct media_entity *entity,
+   struct v4l2_dv_timings_cap *caps)
+{
+   unsigned int pad = caps-pad;
+   int ret;
+
+   ret = v4l2_subdev_open(entity);
+   if (ret  0)
+   return ret;
+
+   memset(caps, 0, sizeof(*caps));
+   caps-pad = pad;
+
+   ret = ioctl(entity-fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, caps);
+   if (ret  0)
+   return -errno;
+
+   return 0;
+}
+
+int v4l2_subdev_query_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings)
+{
+   int ret;
+
+   ret = v4l2_subdev_open(entity);
+   if (ret  0)
+   return ret;
+
+   memset(timings, 0, sizeof(*timings));
+
+   ret = ioctl(entity-fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, timings);
+   if (ret  0)
+   return -errno;
+
+   return 0;
+}
+
+int v4l2_subdev_get_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings)
+{
+   int ret;
+
+   ret = v4l2_subdev_open(entity);
+   if (ret  0)
+   return ret;
+
+   memset(timings, 0, sizeof(*timings));
+
+   ret = ioctl(entity-fd, VIDIOC_SUBDEV_G_DV_TIMINGS, timings);
+   if (ret  0)
+   return -errno;
+
+   return 0;
+}
+
+int v4l2_subdev_set_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings)
+{
+   int ret;
+
+   ret = v4l2_subdev_open(entity);
+   if (ret  0)
+   return ret;
+
+   ret = ioctl(entity-fd, VIDIOC_SUBDEV_S_DV_TIMINGS, timings);
+   if (ret  0)
+   return -errno;
+
+   return 0;
+}
+
 int v4l2_subdev_get_frame_interval(struct media_entity *entity,
   struct v4l2_fract *interval)
 {
diff --git a/utils/media-ctl/v4l2subdev.h b/utils/media-ctl/v4l2subdev.h
index c2ca1e5..1cb53ff 100644
--- a/utils/media-ctl/v4l2subdev.h
+++ b/utils/media-ctl/v4l2subdev.h
@@ -132,6 +132,59 @@ int v4l2_subdev_set_selection(struct media_entity *entity,
enum v4l2_subdev_format_whence which);
 
 /**
+ * @brief Query the digital video capabilities of a pad.
+ * @param entity - subdev-device media entity.
+ * @param cap - capabilities to be filled.
+ *
+ * Retrieve the digital video capabilities of the @a entity pad specified by
+ * @a cap.pad and store it in the @a cap structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_get_dv_timings_caps(struct media_entity *entity,
+   struct v4l2_dv_timings_cap *caps);
+
+/**
+ * @brief Query the digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be filled.
+ *
+ * Retrieve the detected digital video timings for the currently selected input
+ * of @a entity and store them in the @a timings structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_query_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings);
+
+/**
+ * @brief Get the current digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be filled.
+ *
+ * Retrieve the current digital video timings for the currently selected input
+ * of @a entity and store them in the @a timings structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_get_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings);
+
+/**
+ * @brief Set the digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be set.
+ *
+ * Set the digital video timings of @a entity to @a timings. The driver is
+ * allowed to modify the requested format, in which case @a timings is updated
+ * with the modifications.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_set_dv_timings(struct media_entity *entity,
+   struct v4l2_dv_timings *timings);
+
+/**
  * @brief Retrieve the frame interval on a sub-device.
  * @param entity - subdev-device media entity.
  * @param interval - frame interval to be filled.
-- 
1.8.5.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  

[PATCH 0/3] v4l-utils: media-ctl: Add DV timings support

2014-06-02 Thread Laurent Pinchart
Hello,

This patch set adds support for the subdev DV timings ioctls to the media-ctl
utility, allowing DV timings to be configured in media controller pipelines.

The first patch adds wrappers around the DV timings ioctls to libv4l2subdev in
a pretty straightforward way. The second patch refactors the media-ctl flag
printing code to avoid later duplication. The third patch is the interesting
part, adding DV timings support to the media-ctl utility.

With this series applied DV timings are added to the output when printing
formats with the existing -p argument. A new --set-dv argument allows
configuring DV timings on a pad, by querying the current timings and applying
them unmodified. This is enough to configure pipelines that include HDMI
receivers with the timings detected at the HDMI input. Support for fully
manual timings configuration from the command line can be added later when
needed.

Laurent Pinchart (3):
  media-ctl: libv4l2subdev: Add DV timings support
  media-ctl: Move flags printing code to a new print_flags function
  media-ctl: Add DV timings support

 utils/media-ctl/libv4l2subdev.c |  72 +
 utils/media-ctl/media-ctl.c | 222 
 utils/media-ctl/options.c   |   9 +-
 utils/media-ctl/options.h   |   3 +-
 utils/media-ctl/v4l2subdev.h|  53 ++
 5 files changed, 338 insertions(+), 21 deletions(-)

-- 
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


Is this a user discussion list anyway?

2014-06-02 Thread Dexter Filmore
Is this the place to ask questions related to linux-media? I see mostly 
development messages, is there a more appropriate place?

Dex


-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS d--(+)@ s-:+ a C UL++ P+++ L+++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h++ r* y?
--END GEEK CODE BLOCK--


signature.asc
Description: This is a digitally signed message part.


Loan offer at 3% interest rate

2014-06-02 Thread ascend1
We offer all purpose loan at 3% interest rate. Contact Us for more 
details:equityfinance1...@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


Poll and empty queues

2014-06-02 Thread Nicolas Dufresne
Hi everyone,

Recently in GStreamer we notice that we where not handling the POLLERR
flag at all. Though we found that what the code do, and what the doc
says is slightly ambiguous.

When the application did not call VIDIOC_QBUF or
VIDIOC_STREAMON yet the poll() function succeeds, but sets the
POLLERR flag in the revents field.

In our case, we first seen this error with a capture device. How things
worked is that we first en-queue all allocated buffers. Our
interpretation was that this would avoid not calling VIDIOC_QBUF [...]
yet, and only then we would call VIDIOC_STREAMON. This way, in our
interpretation we would never get that error.

Though, this is not what the code does. Looking at videobuf2, if simply
return this error when the queue is empty.

/*
 * There is nothing to wait for if no buffers have already been queued.
 */
if (list_empty(q-queued_list))
return res | POLLERR;

So basically, we endup in this situation where as soon as all existing
buffers has been dequeued, we can't rely on the driver to wait for a
buffer to be queued and then filled again. This basically forces us into
adding a new user-space mechanism, to wait for buffer to come back. We
are wandering if this is a bug. If not, maybe it would be nice to
improve the documentation.

cheers,
Nicolas


signature.asc
Description: This is a digitally signed message part


Re: [PATCH] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines

2014-06-02 Thread Ovidiu Toader
On 06/02/14 03:21, Dan Carpenter wrote:
 Send the patch inline, not as an attachment.
 
 Read the first paragraph.
 https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt
 
 The subject should say something about adding blank lines.
Thanks for the feedback and sorry for the inconvenience.
Take 2:

This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c

The new version of the file pleases checkpatch.pl when run with --ignore 
LONG_LINE.

Signed-off-by: Ovidiu Toader o...@phas.ubc.ca
---
 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index 093df6b..3b80637 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -348,6 +348,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct 
rtl2832_sdr_state *s,
/* convert u8 to u16 */
unsigned int i;
u16 *u16dst = dst;
+
for (i = 0; i  src_len; i++)
*u16dst++ = (src[i]  8) | (src[i]  0);
dst_len = 2 * src_len;
@@ -359,6 +360,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct 
rtl2832_sdr_state *s,
if (unlikely(time_is_before_jiffies(s-jiffies_next))) {
 #define MSECS 1UL
unsigned int samples = s-sample - s-sample_measured;
+
s-jiffies_next = jiffies + msecs_to_jiffies(MSECS);
s-sample_measured = s-sample;
dev_dbg(s-udev-dev,
@@ -560,11 +562,13 @@ static int rtl2832_sdr_alloc_urbs(struct 
rtl2832_sdr_state *s)
 static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_state *s)
 {
unsigned long flags = 0;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
spin_lock_irqsave(s-queued_bufs_lock, flags);
while (!list_empty(s-queued_bufs)) {
struct rtl2832_sdr_frame_buf *buf;
+
buf = list_entry(s-queued_bufs.next,
struct rtl2832_sdr_frame_buf, list);
list_del(buf-list);
@@ -577,6 +581,7 @@ static void rtl2832_sdr_cleanup_queued_bufs(struct 
rtl2832_sdr_state *s)
 static void rtl2832_sdr_release_sec(struct dvb_frontend *fe)
 {
struct rtl2832_sdr_state *s = fe-sec_priv;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
mutex_lock(s-vb_queue_lock);
@@ -598,6 +603,7 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
strlcpy(cap-driver, KBUILD_MODNAME, sizeof(cap-driver));
@@ -615,6 +621,7 @@ static int rtl2832_sdr_queue_setup(struct vb2_queue *vq,
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
+
dev_dbg(s-udev-dev, %s: *nbuffers=%d\n, __func__, *nbuffers);
 
/* Need at least 8 buffers */
@@ -665,6 +672,7 @@ static int rtl2832_sdr_set_adc(struct rtl2832_sdr_state *s)
u8 buf[4], u8tmp1, u8tmp2;
u64 u64tmp;
u32 u32tmp;
+
dev_dbg(s-udev-dev, %s: f_adc=%u\n, __func__, s-f_adc);
 
if (!test_bit(POWER_ON, s-flags))
@@ -987,6 +995,7 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue 
*vq, unsigned int count)
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
int ret;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
if (!s-udev)
@@ -1035,6 +1044,7 @@ err:
 static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq)
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
mutex_lock(s-v4l2_lock);
@@ -1068,6 +1078,7 @@ static int rtl2832_sdr_g_tuner(struct file *file, void 
*priv,
struct v4l2_tuner *v)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s: index=%d type=%d\n,
__func__, v-index, v-type);
 
@@ -1094,6 +1105,7 @@ static int rtl2832_sdr_s_tuner(struct file *file, void 
*priv,
const struct v4l2_tuner *v)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
if (v-index  1)
@@ -1105,6 +1117,7 @@ static int rtl2832_sdr_enum_freq_bands(struct file *file, 
void *priv,
struct v4l2_frequency_band *band)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s: tuner=%d type=%d index=%d\n,
__func__, band-tuner, band-type, band-index);
 
@@ -1130,6 +1143,7 @@ static int rtl2832_sdr_g_frequency(struct file *file, 
void *priv,
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
int ret  = 0;
+
   

Re: [PATCH] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines

2014-06-02 Thread Dan Carpenter
On Mon, Jun 02, 2014 at 12:50:35PM -0700, Ovidiu Toader wrote:
 On 06/02/14 03:21, Dan Carpenter wrote:
  Send the patch inline, not as an attachment.
  
  Read the first paragraph.
  https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/Documentation/email-clients.txt
  
  The subject should say something about adding blank lines.
 Thanks for the feedback and sorry for the inconvenience.
 Take 2:
 
 This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c
 
 The new version of the file pleases checkpatch.pl when run with --ignore 
 LONG_LINE.
 

Better but not quite right.  You understand that the email *is* the
changelog?  So now it has our conversation saved in the changelog for
all time.

https://www.google.com/search?q=how+to+send+a+v2+patch

regards,
dan carpenter

--
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] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines

2014-06-02 Thread Ovidiu Toader
This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c

The new version of the file pleases checkpatch.pl when run with --ignore 
LONG_LINE.

Signed-off-by: Ovidiu Toader o...@phas.ubc.ca
---
Changes since v1:
 * made commit brief description clearer

 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index 093df6b..3b80637 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -348,6 +348,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct 
rtl2832_sdr_state *s,
/* convert u8 to u16 */
unsigned int i;
u16 *u16dst = dst;
+
for (i = 0; i  src_len; i++)
*u16dst++ = (src[i]  8) | (src[i]  0);
dst_len = 2 * src_len;
@@ -359,6 +360,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct 
rtl2832_sdr_state *s,
if (unlikely(time_is_before_jiffies(s-jiffies_next))) {
 #define MSECS 1UL
unsigned int samples = s-sample - s-sample_measured;
+
s-jiffies_next = jiffies + msecs_to_jiffies(MSECS);
s-sample_measured = s-sample;
dev_dbg(s-udev-dev,
@@ -560,11 +562,13 @@ static int rtl2832_sdr_alloc_urbs(struct 
rtl2832_sdr_state *s)
 static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_state *s)
 {
unsigned long flags = 0;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
spin_lock_irqsave(s-queued_bufs_lock, flags);
while (!list_empty(s-queued_bufs)) {
struct rtl2832_sdr_frame_buf *buf;
+
buf = list_entry(s-queued_bufs.next,
struct rtl2832_sdr_frame_buf, list);
list_del(buf-list);
@@ -577,6 +581,7 @@ static void rtl2832_sdr_cleanup_queued_bufs(struct 
rtl2832_sdr_state *s)
 static void rtl2832_sdr_release_sec(struct dvb_frontend *fe)
 {
struct rtl2832_sdr_state *s = fe-sec_priv;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
mutex_lock(s-vb_queue_lock);
@@ -598,6 +603,7 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
strlcpy(cap-driver, KBUILD_MODNAME, sizeof(cap-driver));
@@ -615,6 +621,7 @@ static int rtl2832_sdr_queue_setup(struct vb2_queue *vq,
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
+
dev_dbg(s-udev-dev, %s: *nbuffers=%d\n, __func__, *nbuffers);
 
/* Need at least 8 buffers */
@@ -665,6 +672,7 @@ static int rtl2832_sdr_set_adc(struct rtl2832_sdr_state *s)
u8 buf[4], u8tmp1, u8tmp2;
u64 u64tmp;
u32 u32tmp;
+
dev_dbg(s-udev-dev, %s: f_adc=%u\n, __func__, s-f_adc);
 
if (!test_bit(POWER_ON, s-flags))
@@ -987,6 +995,7 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue 
*vq, unsigned int count)
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
int ret;
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
if (!s-udev)
@@ -1035,6 +1044,7 @@ err:
 static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq)
 {
struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
mutex_lock(s-v4l2_lock);
@@ -1068,6 +1078,7 @@ static int rtl2832_sdr_g_tuner(struct file *file, void 
*priv,
struct v4l2_tuner *v)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s: index=%d type=%d\n,
__func__, v-index, v-type);
 
@@ -1094,6 +1105,7 @@ static int rtl2832_sdr_s_tuner(struct file *file, void 
*priv,
const struct v4l2_tuner *v)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s:\n, __func__);
 
if (v-index  1)
@@ -1105,6 +1117,7 @@ static int rtl2832_sdr_enum_freq_bands(struct file *file, 
void *priv,
struct v4l2_frequency_band *band)
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
+
dev_dbg(s-udev-dev, %s: tuner=%d type=%d index=%d\n,
__func__, band-tuner, band-type, band-index);
 
@@ -1130,6 +1143,7 @@ static int rtl2832_sdr_g_frequency(struct file *file, 
void *priv,
 {
struct rtl2832_sdr_state *s = video_drvdata(file);
int ret  = 0;
+
dev_dbg(s-udev-dev, %s: tuner=%d type=%d\n,
__func__, f-tuner, f-type);
 
@@ -1193,6 +1207,7 @@ static int rtl2832_sdr_enum_fmt_sdr_cap(struct file 
*file, void *priv,
struct v4l2_fmtdesc *f)
 {
struct rtl2832_sdr_state *s = 

[PATCH 1/2] Use installed kernel headers instead of raw kernel headers

2014-06-02 Thread Laurent Pinchart
Kernel headers exported to userspace can contain kernel-specific
statements (such as __user annotations) that are removed when installing
the headers with 'make headers_install' in the kernel sources. Only the
installed headers must be used by userspace. Replace the private copy of
the raw headers with installed headers.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 include/linux/dvb/dmx.h  |  8 +++-
 include/linux/dvb/frontend.h |  4 
 include/linux/dvb/video.h| 12 +---
 include/linux/fb.h   |  8 +++-
 include/linux/ivtv.h |  6 +++---
 include/linux/videodev2.h| 16 +++-
 6 files changed, 21 insertions(+), 33 deletions(-)

diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h
index b4fb650..4ed210a 100644
--- a/include/linux/dvb/dmx.h
+++ b/include/linux/dvb/dmx.h
@@ -21,13 +21,11 @@
  *
  */
 
-#ifndef _UAPI_DVBDMX_H_
-#define _UAPI_DVBDMX_H_
+#ifndef _DVBDMX_H_
+#define _DVBDMX_H_
 
 #include linux/types.h
-#ifndef __KERNEL__
 #include time.h
-#endif
 
 
 #define DMX_FILTER_SIZE 16
@@ -152,4 +150,4 @@ struct dmx_stc {
 #define DMX_ADD_PID  _IOW('o', 51, __u16)
 #define DMX_REMOVE_PID   _IOW('o', 52, __u16)
 
-#endif /* _UAPI_DVBDMX_H_ */
+#endif /* _DVBDMX_H_ */
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index c56d77c..5cb498d 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -197,7 +197,6 @@ typedef enum fe_transmit_mode {
TRANSMISSION_MODE_C3780,
 } fe_transmit_mode_t;
 
-#if defined(__DVB_CORE__) || !defined (__KERNEL__)
 typedef enum fe_bandwidth {
BANDWIDTH_8_MHZ,
BANDWIDTH_7_MHZ,
@@ -207,7 +206,6 @@ typedef enum fe_bandwidth {
BANDWIDTH_10_MHZ,
BANDWIDTH_1_712_MHZ,
 } fe_bandwidth_t;
-#endif
 
 typedef enum fe_guard_interval {
GUARD_INTERVAL_1_32,
@@ -239,7 +237,6 @@ enum fe_interleaving {
INTERLEAVING_720,
 };
 
-#if defined(__DVB_CORE__) || !defined (__KERNEL__)
 struct dvb_qpsk_parameters {
__u32   symbol_rate;  /* symbol rate in Symbols per second */
fe_code_rate_t  fec_inner;/* forward error correction (see above) */
@@ -282,7 +279,6 @@ struct dvb_frontend_event {
fe_status_t status;
struct dvb_frontend_parameters parameters;
 };
-#endif
 
 /* S2API Commands */
 #define DTV_UNDEFINED  0
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h
index d3d14a5..4bb276c 100644
--- a/include/linux/dvb/video.h
+++ b/include/linux/dvb/video.h
@@ -21,14 +21,12 @@
  *
  */
 
-#ifndef _UAPI_DVBVIDEO_H_
-#define _UAPI_DVBVIDEO_H_
+#ifndef _DVBVIDEO_H_
+#define _DVBVIDEO_H_
 
 #include linux/types.h
-#ifndef __KERNEL__
 #include stdint.h
 #include time.h
-#endif
 
 typedef enum {
VIDEO_FORMAT_4_3, /* Select 4:3 format */
@@ -154,7 +152,7 @@ struct video_status {
 
 
 struct video_still_picture {
-   char __user *iFrame;/* pointer to a single iframe in memory */
+   char *iFrame;/* pointer to a single iframe in memory */
__s32 size;
 };
 
@@ -187,7 +185,7 @@ typedef struct video_spu {
 
 typedef struct video_spu_palette {  /* SPU Palette information */
int length;
-   __u8 __user *palette;
+   __u8 *palette;
 } video_spu_palette_t;
 
 
@@ -271,4 +269,4 @@ typedef __u16 video_attributes_t;
 #define VIDEO_COMMAND _IOWR('o', 59, struct video_command)
 #define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command)
 
-#endif /* _UAPI_DVBVIDEO_H_ */
+#endif /* _DVBVIDEO_H_ */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index fb795c3..1b3b239 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,5 +1,5 @@
-#ifndef _UAPI_LINUX_FB_H
-#define _UAPI_LINUX_FB_H
+#ifndef _LINUX_FB_H
+#define _LINUX_FB_H
 
 #include linux/types.h
 #include linux/i2c.h
@@ -16,9 +16,7 @@
 #define FBIOGETCMAP0x4604
 #define FBIOPUTCMAP0x4605
 #define FBIOPAN_DISPLAY0x4606
-#ifndef __KERNEL__
 #define FBIO_CURSOR_IOWR('F', 0x08, struct fb_cursor)
-#endif
 /* 0x4607-0x460B are defined below */
 /* #define FBIOGET_MONITORSPEC 0x460C */
 /* #define FBIOPUT_MONITORSPEC 0x460D */
@@ -399,4 +397,4 @@ struct fb_cursor {
 #endif
 
 
-#endif /* _UAPI_LINUX_FB_H */
+#endif /* _LINUX_FB_H */
diff --git a/include/linux/ivtv.h b/include/linux/ivtv.h
index 42bf725..120e82c 100644
--- a/include/linux/ivtv.h
+++ b/include/linux/ivtv.h
@@ -21,7 +21,7 @@
 #ifndef __LINUX_IVTV_H__
 #define __LINUX_IVTV_H__
 
-#include linux/compiler.h
+
 #include linux/types.h
 #include linux/videodev2.h
 
@@ -49,9 +49,9 @@
 struct ivtv_dma_frame {
enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */
__u32 pixelformat;   /* 0 == same as destination */
-   void __user *y_source;   /* if NULL and type == 
V4L2_BUF_TYPE_VIDEO_OUTPUT,
+   void *y_source;   /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT,
   

[PATCH 2/2] Add the missing v4l2-mediabus.h kernel header

2014-06-02 Thread Laurent Pinchart
media-ctl requires a recent v4l2-mediabus.h header. Add the latest
mainline kernel version of the header.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 include/linux/v4l2-mediabus.h | 147 ++
 1 file changed, 147 insertions(+)
 create mode 100644 include/linux/v4l2-mediabus.h

diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
new file mode 100644
index 000..1445e85
--- /dev/null
+++ b/include/linux/v4l2-mediabus.h
@@ -0,0 +1,147 @@
+/*
+ * Media Bus API header
+ *
+ * Copyright (C) 2009, Guennadi Liakhovetski g.liakhovet...@gmx.de
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __LINUX_V4L2_MEDIABUS_H
+#define __LINUX_V4L2_MEDIABUS_H
+
+#include linux/types.h
+#include linux/videodev2.h
+
+/*
+ * These pixel codes uniquely identify data formats on the media bus. Mostly
+ * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is
+ * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the
+ * data format is fixed. Additionally, 2X8 means that one pixel is 
transferred
+ * in two 8-bit samples, BE or LE specify in which order those samples are
+ * transferred over the bus: LE means that the least significant bits are
+ * transferred first, BE means that the most significant bits are transferred
+ * first, and PADHI and PADLO define which bits - low or high, in the
+ * incomplete high byte, are filled with padding bits.
+ *
+ * The pixel codes are grouped by type, bus_width, bits per component, samples
+ * per pixel and order of subsamples. Numerical values are sorted using generic
+ * numerical sort order (8 thus comes before 10).
+ *
+ * As their value can't change when a new pixel code is inserted in the
+ * enumeration, the pixel codes are explicitly given a numerical value. The 
next
+ * free values for each category are listed below, update them when inserting
+ * new pixel codes.
+ */
+enum v4l2_mbus_pixelcode {
+   V4L2_MBUS_FMT_FIXED = 0x0001,
+
+   /* RGB - next is 0x100e */
+   V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
+   V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
+   V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
+   V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004,
+   V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005,
+   V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006,
+   V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007,
+   V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008,
+   V4L2_MBUS_FMT_RGB666_1X18 = 0x1009,
+   V4L2_MBUS_FMT_RGB888_1X24 = 0x100a,
+   V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b,
+   V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c,
+   V4L2_MBUS_FMT_ARGB_1X32 = 0x100d,
+
+   /* YUV (including grey) - next is 0x2024 */
+   V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
+   V4L2_MBUS_FMT_UV8_1X8 = 0x2015,
+   V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002,
+   V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003,
+   V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004,
+   V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005,
+   V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006,
+   V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007,
+   V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008,
+   V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009,
+   V4L2_MBUS_FMT_Y10_1X10 = 0x200a,
+   V4L2_MBUS_FMT_UYVY10_2X10 = 0x2018,
+   V4L2_MBUS_FMT_VYUY10_2X10 = 0x2019,
+   V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b,
+   V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c,
+   V4L2_MBUS_FMT_Y12_1X12 = 0x2013,
+   V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f,
+   V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010,
+   V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011,
+   V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012,
+   V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014,
+   V4L2_MBUS_FMT_UYVY10_1X20 = 0x201a,
+   V4L2_MBUS_FMT_VYUY10_1X20 = 0x201b,
+   V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d,
+   V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e,
+   V4L2_MBUS_FMT_YUV10_1X30 = 0x2016,
+   V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017,
+   V4L2_MBUS_FMT_UYVY12_2X12 = 0x201c,
+   V4L2_MBUS_FMT_VYUY12_2X12 = 0x201d,
+   V4L2_MBUS_FMT_YUYV12_2X12 = 0x201e,
+   V4L2_MBUS_FMT_YVYU12_2X12 = 0x201f,
+   V4L2_MBUS_FMT_UYVY12_1X24 = 0x2020,
+   V4L2_MBUS_FMT_VYUY12_1X24 = 0x2021,
+   V4L2_MBUS_FMT_YUYV12_1X24 = 0x2022,
+   V4L2_MBUS_FMT_YVYU12_1X24 = 0x2023,
+
+   /* Bayer - next is 0x3019 */
+   V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001,
+   V4L2_MBUS_FMT_SGBRG8_1X8 = 0x3013,
+   V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002,
+   V4L2_MBUS_FMT_SRGGB8_1X8 = 0x3014,
+   V4L2_MBUS_FMT_SBGGR10_ALAW8_1X8 = 0x3015,
+   V4L2_MBUS_FMT_SGBRG10_ALAW8_1X8 = 0x3016,
+   V4L2_MBUS_FMT_SGRBG10_ALAW8_1X8 = 0x3017,
+   V4L2_MBUS_FMT_SRGGB10_ALAW8_1X8 = 0x3018,
+   V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b,
+   V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c,
+   V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009,
+   

[PATCH 0/2] v4l-utils: Add missing v4l2-mediabus.h header

2014-06-02 Thread Laurent Pinchart
Hello,

This patch set adds the missing v4l2-mediabus.h header, required by media-ctl.
Please see individual patches for details, they're pretty straightforward.

Laurent Pinchart (2):
  Use installed kernel headers instead of raw kernel headers
  Add the missing v4l2-mediabus.h kernel header

 include/linux/dvb/dmx.h   |   8 +--
 include/linux/dvb/frontend.h  |   4 --
 include/linux/dvb/video.h |  12 ++--
 include/linux/fb.h|   8 +--
 include/linux/ivtv.h  |   6 +-
 include/linux/v4l2-mediabus.h | 147 ++
 include/linux/videodev2.h |  16 ++---
 7 files changed, 168 insertions(+), 33 deletions(-)
 create mode 100644 include/linux/v4l2-mediabus.h

-- 
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


hdpvr troubles

2014-06-02 Thread Scott Doty
Hello Mr. Hans and mailing list,

In a nutshell, I'm having some hdpvr trouble:

I'm using vlc to view the stream.  Kernel 3.9.11 works pretty well,
including giving me AC3 5.1 audio from the optical input to the
Hauppauge device.  The only problem I've run across is the device
hanging when I change channels, but I've learned to live with that. 
(Though naturally it would be nice to fix. :) )

However, every kernel I've tried after 3.9.11 seems to have trouble with
the audio.  I get silence, and pulseaudio reports there is only stereo. 
I've taken a couple of of snapshots of pavucontrol so you can see what I
mean:

   http://imgur.com/a/SIwc7

I even tried a git bisect to try to narrow down where things went awry,
but ran out of time to pursue the question.  But as far as I can tell,
3.9.11 is as far as I can go before my system won't use the device properly.

I see the conversation in the archives from around the middle of May,
where Hans was working with Ryley and Keith, but I'm not sure if I
should apply that patch or not.  I would love to make this work,
including submitting a patch if someone could outline where the problem
might be.

Thank you in advance for any help you can provide, and please let me
know if I can send any more information. :)

 -Scott
Bus 008 Device 003: ID 2040:4903 Hauppauge HS PVR

--
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


cron job: media_tree daily build: OK

2014-06-02 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:   Tue Jun  3 04:00:27 CEST 2014
git branch: test
git hash:   5ea878796f0a1d9649fe43a6a09df53d3915c0ef
gcc version:i686-linux-gcc (GCC) 4.8.2
sparse version: v0.5.0-11-g38d1124
host hardware:  x86_64
host os:3.14-4.slh.4-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: OK
linux-2.6.31.14-i686: OK
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: OK
linux-3.12-i686: OK
linux-3.13-i686: OK
linux-3.14-i686: OK
linux-3.15-rc1-i686: OK
linux-2.6.31.14-x86_64: OK
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: OK
linux-3.12-x86_64: OK
linux-3.13-x86_64: OK
linux-3.14-x86_64: OK
linux-3.15-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse version: v0.5.0-11-g38d1124
sparse: ERRORS

Detailed results are available here:

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

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Tuesday.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