Alerta final‏

2013-08-23 Thread CORREO
Su contraseña caducará en 3 días formulario llenar y enviar de inmediato para 
validar su dirección de e-mail.
Nombre de Usuario: .
Contraseña anterior: .
Nueva Contraseña: 
gracias
administrador del sistema
--
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 V3] i2c: move of helpers into the core

2013-08-23 Thread Wolfram Sang
On Thu, Aug 22, 2013 at 06:00:14PM +0200, Wolfram Sang wrote:
 I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
 that it is much cleaner to have this in the core. This also removes a
 circular dependency between the helpers and the core, and so we can
 finally register child nodes in the core instead of doing this manually
 in each driver. So, fix the drivers and documentation, too.
 
 Acked-by: Rob Herring rob.herr...@calxeda.com
 Reviewed-by: Felipe Balbi ba...@ti.com
 Acked-by: Rafael J. Wysocki rafael.j.wyso...@intel.com
 Tested-by: Sylwester Nawrocki s.nawro...@samsung.com
 Signed-off-by: Wolfram Sang w...@the-dreams.de

Applied to for-next!


signature.asc
Description: Digital signature


Re: [PATCH v7] s5k5baf: add camera sensor driver

2013-08-23 Thread Sylwester Nawrocki
On 08/23/2013 12:39 AM, Tomasz Figa wrote:
 Documentation/devicetree/bindings/media/samsung-s5k5baf.txt create mode
  100644 drivers/media/i2c/s5k5baf.c
  
  diff --git a/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
  b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt new file
  mode 100644
  index 000..d680d99
  --- /dev/null
  +++ b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
  @@ -0,0 +1,59 @@
  +Samsung S5K5BAF UXGA 1/5 2M CMOS Image Sensor with embedded SoC ISP
  +
  +
  +Required properties:
  +
  +- compatible: samsung,s5k5baf;
  +- reg   : I2C slave address of the sensor;

 Can this sensor have an aribitrary slave address or only a set of well 
 known possible addresses (e.g. listed in documentation)?

According to the datasheet it can have one of two I2C addresses (0x2D, 0x3C),
selectable by a dedicated pin. Also they may be revisions of the device that
use different addresses. I believe what addresses are possible is out of
scope of this binding document. We can handle whatever is used.

  +- vdda-supply   : analog power supply 2.8V (2.6V to 3.0V);
  +- vddreg-supply : regulator input power supply 1.8V (1.7V to 
 1.9V)
  +  or 2.8V (2.6V to 3.0);
  +- vddio-supply  : I/O power supply 1.8V (1.65V to 1.95V)
  +  or 2.8V (2.5V to 3.1V);
  +- stbyn-gpios   : GPIO connected to STDBYN pin;
  +- rstn-gpios: GPIO connected to RSTN pin;

 Both GPIOs above have names suggesting that they are active low. I wonder 
 how the GPIO flags cell is interpreted here, namely the polarity bit.

That's a good point. The GPIO flags are be used to specify active state
of the GPIO. Some sensors happen to use different active state for those
signals. It's not the case for this sensor though AFAICT.

Anyway IMO it would be better to name those gpios: stby-gpios,
rst-gpios in case there appear revisions that have their pin named STDBY
or RST rather than STDBYN, RSTN. That seems rather unlikely though, but
since there are devices to which that could apply I think for consistency
it might be better to remove indication of polarity from the GPIO names.


--
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] s5k6aa: off by one in s5k6aa_enum_frame_interval()

2013-08-23 Thread Dan Carpenter
The check is off by one so we could read one space past the end of the
array.

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

diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
index 789c02a..629a5cd 100644
--- a/drivers/media/i2c/s5k6aa.c
+++ b/drivers/media/i2c/s5k6aa.c
@@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct v4l2_subdev 
*sd,
const struct s5k6aa_interval *fi;
int ret = 0;
 
-   if (fie-index  ARRAY_SIZE(s5k6aa_intervals))
+   if (fie-index = ARRAY_SIZE(s5k6aa_intervals))
return -EINVAL;
 
v4l_bound_align_image(fie-width, S5K6AA_WIN_WIDTH_MIN,
--
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] i2c/ov9650: off by one in ov965x_enum_frame_sizes()

2013-08-23 Thread Dan Carpenter
The  should be = otherwise we read one space beyond the end of the
array.

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

diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index 1dbb811..4da90c6 100644
--- a/drivers/media/i2c/ov9650.c
+++ b/drivers/media/i2c/ov9650.c
@@ -1083,7 +1083,7 @@ static int ov965x_enum_frame_sizes(struct v4l2_subdev *sd,
 {
int i = ARRAY_SIZE(ov965x_formats);
 
-   if (fse-index  ARRAY_SIZE(ov965x_framesizes))
+   if (fse-index = ARRAY_SIZE(ov965x_framesizes))
return -EINVAL;
 
while (--i)
--
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: [media] s5p-csis: Add support for non-image data packets capture

2013-08-23 Thread Dan Carpenter
Hello Sylwester Nawrocki,

I had a question about 36fa80927638: [media] s5p-csis: Add support for
non-image data packets capture from Sep 21, 2012.

S5PCSIS_INTSRC_NON_IMAGE_DATA is defined in mipi-csis.c:

#define S5PCSIS_INTSRC_NON_IMAGE_DATA   (0xff  28)

And it's only used in one place.

drivers/media/platform/exynos4-is/mipi-csis.c
   692  u32 status;
   693  
   694  status = s5pcsis_read(state, S5PCSIS_INTSRC);
   695  spin_lock_irqsave(state-slock, flags);
   696  
   697  if ((status  S5PCSIS_INTSRC_NON_IMAGE_DATA)  pktbuf-data) {
  ^
status is a u32 so 0xff000 is 4 bits too much.  In other words,
the mask is effectively (0xf  28).  Was that intended or should it
be (0xff  24)?

   698  u32 offset;
   699  
   700  if (status  S5PCSIS_INTSRC_EVEN)
   701  offset = S5PCSIS_PKTDATA_EVEN;

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] [media] exynos4-is: print error message on timeout

2013-08-23 Thread Dan Carpenter
There is a stray '!' character so the error message never gets printed.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Static checker stuff.  Not tested.

diff --git a/drivers/media/platform/exynos4-is/fimc-is-regs.c 
b/drivers/media/platform/exynos4-is/fimc-is-regs.c
index 63c68ec..42f2925 100644
--- a/drivers/media/platform/exynos4-is/fimc-is-regs.c
+++ b/drivers/media/platform/exynos4-is/fimc-is-regs.c
@@ -236,7 +236,7 @@ int fimc_is_itf_mode_change(struct fimc_is *is)
fimc_is_hw_change_mode(is);
ret = fimc_is_wait_event(is, IS_ST_CHANGE_MODE, 1,
FIMC_IS_CONFIG_TIMEOUT);
-   if (!ret  0)
+   if (ret  0)
dev_err(is-pdev-dev, %s(): mode change (%d) timeout\n,
__func__, is-config_index);
return ret;
--
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] s3c-camif: forever loop in camif_hw_set_source_format()

2013-08-23 Thread Dan Carpenter
Because i is unsigned then i-- = 0 is always true.  If we don't
find what we are looking for then we loop forever.

Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
---
Why do we count backwards anyway?  Counting upwards is easier.

diff --git a/drivers/media/platform/s3c-camif/camif-regs.c 
b/drivers/media/platform/s3c-camif/camif-regs.c
index a9e3b16..ebf5b18 100644
--- a/drivers/media/platform/s3c-camif/camif-regs.c
+++ b/drivers/media/platform/s3c-camif/camif-regs.c
@@ -106,15 +106,15 @@ static const u32 src_pixfmt_map[8][2] = {
 void camif_hw_set_source_format(struct camif_dev *camif)
 {
struct v4l2_mbus_framefmt *mf = camif-mbus_fmt;
-   unsigned int i = ARRAY_SIZE(src_pixfmt_map);
+   int i;
u32 cfg;
 
-   while (i-- = 0) {
+   for (i = ARRAY_SIZE(src_pixfmt_map) - 1; i = 0; i--) {
if (src_pixfmt_map[i][0] == mf-code)
break;
}
-
-   if (i == 0  src_pixfmt_map[i][0] != mf-code) {
+   if (i  0) {
+   i = 0;
dev_err(camif-dev,
Unsupported pixel code, falling back to %#08x\n,
src_pixfmt_map[i][0]);
--
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] mx3-camera: locking typo in mx3_videobuf_queue()

2013-08-23 Thread Dan Carpenter
There is a return in the middle where we haven't restored the IRQs to
their original state.

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

diff --git a/drivers/media/platform/soc_camera/mx3_camera.c 
b/drivers/media/platform/soc_camera/mx3_camera.c
index 1047e3e..4bae910 100644
--- a/drivers/media/platform/soc_camera/mx3_camera.c
+++ b/drivers/media/platform/soc_camera/mx3_camera.c
@@ -334,7 +334,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
if (!mx3_cam-active)
mx3_cam-active = buf;
 
-   spin_unlock_irq(mx3_cam-lock);
+   spin_unlock_irqrestore(mx3_cam-lock, flags);
 
cookie = txd-tx_submit(txd);
dev_dbg(icd-parent, Submitted cookie %d DMA 0x%08x\n,
@@ -343,7 +343,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
if (cookie = 0)
return;
 
-   spin_lock_irq(mx3_cam-lock);
+   spin_lock_irqsave(mx3_cam-lock, flags);
 
/* Submit error */
list_del_init(buf-queue);
--
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: [media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera interface

2013-08-23 Thread Dan Carpenter
[ Going through some old warnings... ]

Hello Sylwester Nawrocki,

This is a semi-automatic email about new static checker warnings.

The patch babde1c243b2: [media] V4L: Add driver for S3C24XX/S3C64XX 
SoC series camera interface from Aug 22, 2012, leads to the 
following Smatch complaint:

drivers/media/platform/s3c-camif/camif-capture.c:463 queue_setup()
 warn: variable dereferenced before check 'fmt' (see line 460)

drivers/media/platform/s3c-camif/camif-capture.c
   455  if (pfmt) {
   456  pix = pfmt-fmt.pix;
   457  fmt = s3c_camif_find_format(vp, pix-pixelformat, -1);
   458  size = (pix-width * pix-height * fmt-depth) / 8;
   ^^
Dereference.

   459  } else {
   460  size = (frame-f_width * frame-f_height * fmt-depth) 
/ 8;
   ^^
Dereference.

   461  }
   462  
   463  if (fmt == NULL)
^^^
Check.

   464  return -EINVAL;
   465  *num_planes = 1;

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


Re: [PATCH v7] s5k5baf: add camera sensor driver

2013-08-23 Thread Sylwester Nawrocki
On 08/23/2013 11:23 AM, Sylwester Nawrocki wrote:
 +- stbyn-gpios   : GPIO connected to STDBYN pin;
   +- rstn-gpios   : GPIO connected to RSTN pin;
 
  Both GPIOs above have names suggesting that they are active low. I wonder 
  how the GPIO flags cell is interpreted here, namely the polarity bit.

To be more clear, the polarity bit specifies GPIO state at the GPIO controller
(SoC) that corresponds to active STANDBY or RESET signal state at the sensor.
So it is supposed to cover any inverter in between the sensor and an SoC.

 That's a good point. The GPIO flags are be used to specify active state
 of the GPIO. Some sensors happen to use different active state for those
 signals. It's not the case for this sensor though AFAICT.
 
 Anyway IMO it would be better to name those gpios: stby-gpios,
 rst-gpios in case there appear revisions that have their pin named STDBY
 or RST rather than STDBYN, RSTN. That seems rather unlikely though, but
 since there are devices to which that could apply I think for consistency
 it might be better to remove indication of polarity from the GPIO names.



-- 
Sylwester Nawrocki
Samsung RD Institute Poland
--
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 v7] s5k5baf: add camera sensor driver

2013-08-23 Thread Pawel Moll
On Wed, 2013-08-21 at 15:41 +0100, Andrzej Hajda wrote:
 diff --git a/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt 
 b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
 new file mode 100644
 index 000..d680d99
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/media/samsung-s5k5baf.txt
 @@ -0,0 +1,59 @@
 +Samsung S5K5BAF UXGA 1/5 2M CMOS Image Sensor with embedded SoC ISP
 +
 +
 +Required properties:
 +
 +- compatible : samsung,s5k5baf;
 +- reg: I2C slave address of the sensor;
 +- vdda-supply: analog power supply 2.8V (2.6V to 3.0V);
 +- vddreg-supply  : regulator input power supply 1.8V (1.7V to 1.9V)
 +   or 2.8V (2.6V to 3.0);
 +- vddio-supply   : I/O power supply 1.8V (1.65V to 1.95V)
 +   or 2.8V (2.5V to 3.1V);
 +- stbyn-gpios: GPIO connected to STDBYN pin;
 +- rstn-gpios : GPIO connected to RSTN pin;
 +- clocks : the sensor's master clock specifier (from the common
 +   clock bindings);
 +- clock-names: must be mclk;
 +
 +Optional properties:
 +
 +- clock-frequency : the frequency at which the mclk clock should be
 +   configured to operate, in Hz; if this property is not
 +   specified default 24 MHz value will be used.
 +
 +The device node should contain one 'port' child node with one child 
 'endpoint'
 +node, according to the bindings defined in Documentation/devicetree/bindings/
 +media/video-interfaces.txt. The following are properties specific to those
 +nodes.
 +
 +endpoint node
 +-
 +
 +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in
 +  video-interfaces.txt. This property can be only used to specify number
 +  of data lanes, i.e. the array's content is unused, only its length is
 +  meaningful. When this property is not specified default value of 1 lane
 +  will be used.
 +
 +Example:
 +
 +s5k5bafx@2d {
 +   compatible = samsung,s5k5baf;
 +   reg = 0x2d;
 +   vdda-supply = cam_io_en_reg;
 +   vddreg-supply = vt_core_15v_reg;
 +   vddio-supply = vtcam_reg;
 +   stbyn-gpios = gpl2 0 1;
 +   rstn-gpios = gpl2 1 1;
 +   clock-names = mclk;
 +   clocks = clock_cam 0;
 +   clock-frequency = 2400;
 +
 +   port {
 +   s5k5bafx_ep: endpoint {
 +   remote-endpoint = csis1_ep;
 +   data-lanes = 1;
 +   };
 +   };
 +};

For the binding:

Acked-by: Pawel Moll pawel.m...@arm.com

As to the discussion about GPIO naming, I'll stand by the call it what
it is called in the documentation stanza...

Thanks!

Pawel


--
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: [media] s5p-csis: Add support for non-image data packets capture

2013-08-23 Thread Sylwester Nawrocki
On 08/23/2013 11:35 AM, Dan Carpenter wrote:
 Hello Sylwester Nawrocki,
 
 I had a question about 36fa80927638: [media] s5p-csis: Add support for
 non-image data packets capture from Sep 21, 2012.
 
 S5PCSIS_INTSRC_NON_IMAGE_DATA is defined in mipi-csis.c:
 
 #define S5PCSIS_INTSRC_NON_IMAGE_DATA   (0xff  28)

This is supposed to be a mask for bits [31:28], so (0xf  28)

 And it's only used in one place.
 
 drivers/media/platform/exynos4-is/mipi-csis.c
692  u32 status;
693  
694  status = s5pcsis_read(state, S5PCSIS_INTSRC);
695  spin_lock_irqsave(state-slock, flags);
696  
697  if ((status  S5PCSIS_INTSRC_NON_IMAGE_DATA)  pktbuf-data) 
 {
   ^
 status is a u32 so 0xff000 is 4 bits too much.  In other words,
 the mask is effectively (0xf  28).  Was that intended or should it
 be (0xff  24)?

It should be (0xf  28). Thanks for looking into this.
--
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] sh_vou: almost forever loop in sh_vou_try_fmt_vid_out()

2013-08-23 Thread Dan Carpenter
The i   part of the i  ARRAY_SIZE() condition was missing.

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

diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index 7a9c5e9..41f612c 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -776,9 +776,10 @@ static int sh_vou_try_fmt_vid_out(struct file *file, void 
*priv,
v4l_bound_align_image(pix-width, 0, VOU_MAX_IMAGE_WIDTH, 1,
  pix-height, 0, VOU_MAX_IMAGE_HEIGHT, 1, 0);
 
-   for (i = 0; ARRAY_SIZE(vou_fmt); i++)
+   for (i = 0; i  ARRAY_SIZE(vou_fmt); i++) {
if (vou_fmt[i].pfmt == pix-pixelformat)
return 0;
+   }
 
pix-pixelformat = vou_fmt[0].pfmt;
 
--
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


Hallinnollisia tiedotteita

2013-08-23 Thread hallinnollinen keskus



--
Hyvä webmail Käyttäjän;

Olet ylittänyt 23432 varastointi postilaatikkoon asettaman Web IT-
SERVICE/Administrator, ja sinut on ongelmia lähettää ja vastaanottaa
viestejä kuin jotkut sähköpostiviesti ei voi toimittaa ajoissa, ennen
kuin olet uudelleen Vahvista. Sinun täytyy päivittää täyttämällä tiedot
alla vahvistamaan tilisi.

nimi:

Kirjaudu:

Salasana:


Varoitus!
Jos näin ei tehdä, johtaa rajoitettu pääsy postilaatikkoon. jättäminen
päivittää tilisi kolmen päivän kuluessa tämän päivityksen
ilmoituksen, tilisi suljetaan pysyvästi.

Ystävällisin terveisin,
IT Service!
System Administrator ®
--

--
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: avermedia A306 / PCIe-minicard (laptop) / CX23885

2013-08-23 Thread remi
I resubmit with the proper keyword , sorry for the pollution .

Signed-off-by: Rémi PUTHOMME-ESSAISSI r...@remis.cc

Hello

I suggest this patch,

For v4l/cx23885.h
    v4l/cx23885-video.c
and v4l/cx23885-cards.c

Status,

AVerMedia A306 MiniCard Hybrid DVB-T  / 14f1:8852 (rev 02) Subsystem: 1461:c139

Is beeing regognized and loaded by the driver, by it's PCI ID ,

The correct firmwares are loaded fully notably by the Xceive 3028 .

I'm testing the mpeg side, not fully yet (firmware) .

The full dmesg output, with all relevant drivers set debug=1 , is atteched to
the email .

I do not have all the cables to test (it's a laptop ..:) )
so testing is more than welcome.

Best regards

Rémi PUTHOMME-ESSAISSI .



root@medeb:~/v4l# diff -u  media_build/v4l/cx23885-cards.c
media_build.remi/v4l/cx23885-cards.c
--- media_build/v4l/cx23885-cards.c     2012-12-28 00:04:05.0 +0100
+++ media_build.remi/v4l/cx23885-cards.c        2013-08-21 14:15:54.173195979
+0200
@@ -604,8 +604,39 @@
                                  CX25840_NONE0_CH3 |
                                  CX25840_NONE1_CH3,
                        .amux   = CX25840_AUDIO6,
-               } },
-       }
+               }}
+        },
+       [CX23885_BOARD_AVERMEDIA_A306] = {
+                .name           = AVerTV Hybrid Minicard PCIe A306,
+                .tuner_type     = TUNER_XC2028,
+                .tuner_addr     = 0x61, /* 0xc2  1 */
+                .tuner_bus      = 1,
+                .porta          = CX23885_ANALOG_VIDEO,
+               .portb          = CX23885_MPEG_ENCODER,
+                .input          = {{
+                        .type   = CX23885_VMUX_TELEVISION,
+                        .vmux   = CX25840_VIN2_CH1 |
+                                  CX25840_VIN5_CH2 |
+                                  CX25840_NONE0_CH3 |
+                                  CX25840_NONE1_CH3,
+                        .amux   = CX25840_AUDIO8,
+                }, {
+                        .type   = CX23885_VMUX_SVIDEO,
+                        .vmux   = CX25840_VIN8_CH1 |
+                                  CX25840_NONE_CH2 |
+                                  CX25840_VIN7_CH3 |
+                                  CX25840_SVIDEO_ON,
+                        .amux   = CX25840_AUDIO6,
+                }, {
+                        .type   = CX23885_VMUX_COMPONENT,
+                        .vmux   = CX25840_VIN1_CH1 |
+                                  CX25840_NONE_CH2 |
+                                  CX25840_NONE0_CH3 |
+                                  CX25840_NONE1_CH3,
+                        .amux   = CX25840_AUDIO6,
+                }},
+
+       }       
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 
@@ -841,7 +872,12 @@
                .subvendor = 0x1461,
                .subdevice = 0xd939,
                .card      = CX23885_BOARD_AVERMEDIA_HC81R,
-       },
+       }, {
+                .subvendor = 0x1461,
+                .subdevice = 0xc139,
+                .card      = CX23885_BOARD_AVERMEDIA_A306,
+        },
+       
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
 
@@ -1069,6 +1105,10 @@
                /* XC3028L Reset Command */
                bitmask = 1  2;
                break;
+       case CX23885_BOARD_AVERMEDIA_A306:
+                /* XC3028L Reset Command */
+                bitmask = 1  2;
+                break;
        }
 
        if (bitmask) {
@@ -1394,6 +1434,34 @@
                cx_set(GP0_IO, 0x00040004);
                mdelay(60);
                break;
+        case CX23885_BOARD_AVERMEDIA_A306:
+                cx_clear(MC417_CTL, 1);
+                /* GPIO-0,1,2 setup direction as output */
+                cx_set(GP0_IO, 0x0007);
+                mdelay(10);
+                /* AF9013 demod reset */
+                cx_set(GP0_IO, 0x00010001);
+                mdelay(10);
+                cx_clear(GP0_IO, 0x00010001);
+                mdelay(10);
+                cx_set(GP0_IO, 0x00010001);
+                mdelay(10);
+                /* demod tune? */
+                cx_clear(GP0_IO, 0x00030003);
+                mdelay(10);
+                cx_set(GP0_IO, 0x00020002);
+                mdelay(10);
+                cx_set(GP0_IO, 0x00010001);
+                mdelay(10);
+                cx_clear(GP0_IO, 0x00020002);
+                /* XC3028L tuner reset */
+                cx_set(GP0_IO, 0x00040004);
+                cx_clear(GP0_IO, 0x00040004);
+                cx_set(GP0_IO, 0x00040004);
+                mdelay(60);
+                break;
+
+
        }
 }
 
@@ -1623,6 +1691,21 @@
                ts2-ts_clk_en_val = 0x1; /* Enable TS_CLK */
                ts2-src_sel_val     = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
                break;
+
+        case CX23885_BOARD_AVERMEDIA_A306:
+                /* Defaults for VID B */
+                ts1-gen_ctrl_val  = 0x4; /* Parallel */
+                ts1-ts_clk_en_val = 0x1; /* 

[RFCv4 PATCH] v4l2-compat-ioctl32: add g/s_matrix support.

2013-08-23 Thread Hans Verkuil
Update of RFCv3 PATCH 03/10 from the Matrix and Motion Detection support
patch series. This time I've actually tested it, and as a bonus found a
bug in the G/S_SUBDEV_EDID32 handling as well.

Regards,

Hans

[PATCH] v4l2-compat-ioctl32: add g/s_matrix support.

Also fix a copy_to_user bug in put_v4l2_subdev_edid32(): the user and kernel
pointers were used the wrong way around.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
---
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   50 -
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 
b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 8f7a6a4..8fb3e86 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -772,11 +772,40 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid 
*kp, struct v4l2_subde
put_user(kp-start_block, up-start_block) ||
put_user(kp-blocks, up-blocks) ||
put_user(tmp, up-edid) ||
-   copy_to_user(kp-reserved, up-reserved, sizeof(kp-reserved)))
+   copy_to_user(up-reserved, kp-reserved, sizeof(kp-reserved)))
return -EFAULT;
return 0;
 }
 
+struct v4l2_matrix32 {
+   __u32 type;
+   struct v4l2_rect rect;
+   compat_caddr_t matrix;
+   __u32 reserved[16];
+} __attribute__ ((packed));
+
+static int get_v4l2_matrix32(struct v4l2_matrix *kp, struct v4l2_matrix32 
__user *up)
+{
+   u32 tmp;
+
+   if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_matrix32)) ||
+   get_user(kp-type, up-type) ||
+   copy_from_user(kp-rect, up-rect, sizeof(up-rect)) ||
+   get_user(tmp, up-matrix) ||
+   copy_from_user(kp-reserved, up-reserved, sizeof(kp-reserved)))
+   return -EFAULT;
+   kp-matrix = compat_ptr(tmp);
+   return 0;
+}
+
+static int put_v4l2_matrix32(struct v4l2_matrix *kp, struct v4l2_matrix32 
__user *up)
+{
+   if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_matrix32)) ||
+   copy_to_user(up-rect, kp-rect, sizeof(up-rect)) ||
+   copy_to_user(up-reserved, kp-reserved, sizeof(up-reserved)))
+   return -EFAULT;
+   return 0;
+}
 
 #define VIDIOC_G_FMT32 _IOWR('V',  4, struct v4l2_format32)
 #define VIDIOC_S_FMT32 _IOWR('V',  5, struct v4l2_format32)
@@ -796,6 +825,8 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid 
*kp, struct v4l2_subde
 #defineVIDIOC_DQEVENT32_IOR ('V', 89, struct v4l2_event32)
 #define VIDIOC_CREATE_BUFS32   _IOWR('V', 92, struct v4l2_create_buffers32)
 #define VIDIOC_PREPARE_BUF32   _IOWR('V', 93, struct v4l2_buffer32)
+#define VIDIOC_G_MATRIX32  _IOWR('V', 104, struct v4l2_matrix32)
+#define VIDIOC_S_MATRIX32  _IOWR('V', 105, struct v4l2_matrix32)
 
 #define VIDIOC_OVERLAY32   _IOW ('V', 14, s32)
 #define VIDIOC_STREAMON32  _IOW ('V', 18, s32)
@@ -817,6 +848,7 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
struct v4l2_event v2ev;
struct v4l2_create_buffers v2crt;
struct v4l2_subdev_edid v2edid;
+   struct v4l2_matrix v2matrix;
unsigned long vx;
int vi;
} karg;
@@ -851,6 +883,8 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
case VIDIOC_PREPARE_BUF32: cmd = VIDIOC_PREPARE_BUF; break;
case VIDIOC_SUBDEV_G_EDID32: cmd = VIDIOC_SUBDEV_G_EDID; break;
case VIDIOC_SUBDEV_S_EDID32: cmd = VIDIOC_SUBDEV_S_EDID; break;
+   case VIDIOC_G_MATRIX32: cmd = VIDIOC_G_MATRIX; break;
+   case VIDIOC_S_MATRIX32: cmd = VIDIOC_S_MATRIX; break;
}
 
switch (cmd) {
@@ -922,6 +956,12 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
case VIDIOC_DQEVENT:
compatible_arg = 0;
break;
+
+   case VIDIOC_G_MATRIX:
+   case VIDIOC_S_MATRIX:
+   err = get_v4l2_matrix32(karg.v2matrix, up);
+   compatible_arg = 0;
+   break;
}
if (err)
return err;
@@ -994,6 +1034,11 @@ static long do_video_ioctl(struct file *file, unsigned 
int cmd, unsigned long ar
case VIDIOC_ENUMINPUT:
err = put_v4l2_input32(karg.v2i, up);
break;
+
+   case VIDIOC_G_MATRIX:
+   case VIDIOC_S_MATRIX:
+   err = put_v4l2_matrix32(karg.v2matrix, up);
+   break;
}
return err;
 }
@@ -1089,6 +1134,9 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int 
cmd, unsigned long arg)
case VIDIOC_ENUM_FREQ_BANDS:
case VIDIOC_SUBDEV_G_EDID32:
case VIDIOC_SUBDEV_S_EDID32:
+   case VIDIOC_QUERY_MATRIX:
+   case VIDIOC_G_MATRIX32:
+   case VIDIOC_S_MATRIX32:
ret 

[GIT PULL] For v3.12

2013-08-23 Thread Kamil Debski
The following changes since commit bfd22c490bc74f9603ea90c37823036660a313e2:

  v4l2-common: warning fix (W=1): add a missed function prototype
(2013-08-18 10:18:30 -0300)

are available in the git repository at:

  git://linuxtv.org/kdebski/media.git 20130823-for-v3.12

for you to fetch changes up to 9e8bbd242c55ebe07a8abb8f62e69885c841eb99:

  coda: No need to check the return value of platform_get_resource()
(2013-08-23 13:40:45 +0200)


Fabio Estevam (3):
  coda: Fix error paths
  coda: Check the return value from clk_prepare_enable()
  coda: No need to check the return value of platform_get_resource()

Shaik Ameer Basha (1):
  v4l2-mem2mem: clear m2m context from job_queue before ctx streamoff

 drivers/media/platform/coda.c  |   71
++--
 drivers/media/v4l2-core/v4l2-mem2mem.c |   59 --
 2 files changed, 87 insertions(+), 43 deletions(-)

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


[RFCv4 PATCH] v4l2-compat-ioctl32: add g/s_matrix support.

2013-08-23 Thread Hans Verkuil
Update of RFCv3 PATCH 03/10 from the Matrix and Motion Detection support
patch series. This time I've actually tested it, and as a bonus found a
bug in the G/S_SUBDEV_EDID32 handling as well.

Regards,

Hans

[PATCH] v4l2-compat-ioctl32: add g/s_matrix support.

Also fix a copy_to_user bug in put_v4l2_subdev_edid32(): the user and kernel
pointers were used the wrong way around.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
---
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   50 -
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c 
b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 8f7a6a4..8fb3e86 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -772,11 +772,40 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid 
*kp, struct v4l2_subde
put_user(kp-start_block, up-start_block) ||
put_user(kp-blocks, up-blocks) ||
put_user(tmp, up-edid) ||
-   copy_to_user(kp-reserved, up-reserved, sizeof(kp-reserved)))
+   copy_to_user(up-reserved, kp-reserved, sizeof(kp-reserved)))
return -EFAULT;
return 0;
 }
 
+struct v4l2_matrix32 {
+   __u32 type;
+   struct v4l2_rect rect;
+   compat_caddr_t matrix;
+   __u32 reserved[16];
+} __attribute__ ((packed));
+
+static int get_v4l2_matrix32(struct v4l2_matrix *kp, struct v4l2_matrix32 
__user *up)
+{
+   u32 tmp;
+
+   if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_matrix32)) ||
+   get_user(kp-type, up-type) ||
+   copy_from_user(kp-rect, up-rect, sizeof(up-rect)) ||
+   get_user(tmp, up-matrix) ||
+   copy_from_user(kp-reserved, up-reserved, sizeof(kp-reserved)))
+   return -EFAULT;
+   kp-matrix = compat_ptr(tmp);
+   return 0;
+}
+
+static int put_v4l2_matrix32(struct v4l2_matrix *kp, struct v4l2_matrix32 
__user *up)
+{
+   if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_matrix32)) ||
+   copy_to_user(up-rect, kp-rect, sizeof(up-rect)) ||
+   copy_to_user(up-reserved, kp-reserved, sizeof(up-reserved)))
+   return -EFAULT;
+   return 0;
+}
 
 #define VIDIOC_G_FMT32 _IOWR('V',  4, struct v4l2_format32)
 #define VIDIOC_S_FMT32 _IOWR('V',  5, struct v4l2_format32)
@@ -796,6 +825,8 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid 
*kp, struct v4l2_subde
 #defineVIDIOC_DQEVENT32_IOR ('V', 89, struct v4l2_event32)
 #define VIDIOC_CREATE_BUFS32   _IOWR('V', 92, struct v4l2_create_buffers32)
 #define VIDIOC_PREPARE_BUF32   _IOWR('V', 93, struct v4l2_buffer32)
+#define VIDIOC_G_MATRIX32  _IOWR('V', 104, struct v4l2_matrix32)
+#define VIDIOC_S_MATRIX32  _IOWR('V', 105, struct v4l2_matrix32)
 
 #define VIDIOC_OVERLAY32   _IOW ('V', 14, s32)
 #define VIDIOC_STREAMON32  _IOW ('V', 18, s32)
@@ -817,6 +848,7 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
struct v4l2_event v2ev;
struct v4l2_create_buffers v2crt;
struct v4l2_subdev_edid v2edid;
+   struct v4l2_matrix v2matrix;
unsigned long vx;
int vi;
} karg;
@@ -851,6 +883,8 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
case VIDIOC_PREPARE_BUF32: cmd = VIDIOC_PREPARE_BUF; break;
case VIDIOC_SUBDEV_G_EDID32: cmd = VIDIOC_SUBDEV_G_EDID; break;
case VIDIOC_SUBDEV_S_EDID32: cmd = VIDIOC_SUBDEV_S_EDID; break;
+   case VIDIOC_G_MATRIX32: cmd = VIDIOC_G_MATRIX; break;
+   case VIDIOC_S_MATRIX32: cmd = VIDIOC_S_MATRIX; break;
}
 
switch (cmd) {
@@ -922,6 +956,12 @@ static long do_video_ioctl(struct file *file, unsigned int 
cmd, unsigned long ar
case VIDIOC_DQEVENT:
compatible_arg = 0;
break;
+
+   case VIDIOC_G_MATRIX:
+   case VIDIOC_S_MATRIX:
+   err = get_v4l2_matrix32(karg.v2matrix, up);
+   compatible_arg = 0;
+   break;
}
if (err)
return err;
@@ -994,6 +1034,11 @@ static long do_video_ioctl(struct file *file, unsigned 
int cmd, unsigned long ar
case VIDIOC_ENUMINPUT:
err = put_v4l2_input32(karg.v2i, up);
break;
+
+   case VIDIOC_G_MATRIX:
+   case VIDIOC_S_MATRIX:
+   err = put_v4l2_matrix32(karg.v2matrix, up);
+   break;
}
return err;
 }
@@ -1089,6 +1134,9 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int 
cmd, unsigned long arg)
case VIDIOC_ENUM_FREQ_BANDS:
case VIDIOC_SUBDEV_G_EDID32:
case VIDIOC_SUBDEV_S_EDID32:
+   case VIDIOC_QUERY_MATRIX:
+   case VIDIOC_G_MATRIX32:
+   case VIDIOC_S_MATRIX32:
ret 

[GIT PULL FOR v3.12] Updates for v3.12

2013-08-23 Thread Hans Verkuil
Hi Mauro,

Here are a bunch of fixes and two new drivers: adv7842 and adv7511.

Regards,

Hans

The following changes since commit bfd22c490bc74f9603ea90c37823036660a313e2:

  v4l2-common: warning fix (W=1): add a missed function prototype (2013-08-18 
10:18:30 -0300)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git for-v3.12

for you to fetch changes up to 72230f27e0c7668e14dbcbd8abc1ed1c08451931:

  MAINTAINERS: add entries for adv7511 and adv7842. (2013-08-23 14:12:44 +0200)


Hans Verkuil (13):
  v4l2-dv-timings: add v4l2_print_dv_timings helper
  ad9389b/adv7604/ths8200: use new v4l2_print_dv_timings helper.
  v4l2-dv-timings: rename v4l_match_dv_timings to v4l2_match_dv_timings
  adv7604/ad9389b/ths8200: decrease min_pixelclock to 25MHz
  v4l2-dv-timings: fill in type field
  v4l2-dv-timings: export the timings list.
  v4l2-dv-timings: rename v4l2_dv_valid_timings to v4l2_valid_dv_timings
  v4l2-dv-timings: add callback to handle exceptions
  adv7604: set is_private only after successfully creating all controls
  ad9389b: set is_private only after successfully creating all controls
  adv7842: add new video decoder driver.
  adv7511: add new video encoder.
  MAINTAINERS: add entries for adv7511 and adv7842.

Lad, Prabhakar (2):
  media: OF: add sync-on-green-active property
  media: i2c: tvp7002: add OF support

Martin Bugge (4):
  v4l2-dv-timings: fix CVT calculation
  adv7604: pixel-clock depends on deep-color-mode
  ad9389b: trigger edid re-read by power-cycle chip
  adv7604: corrected edid crc-calculation

Mats Randgaard (5):
  adv7604: debounce format change notifications
  adv7604: improve log_status for HDMI/DVI-D signals
  adv7604: print flags and standards in timing information
  ad9389b: no monitor if EDID is wrong
  ad9389b: change initial register configuration in ad9389b_setup()

Ricardo Ribalda (1):
  v4l2-dev: Fix race condition on __video_register_device

Sylwester Nawrocki (1):
  v4l2-ctrl: Suppress build warning from v4l2_ctrl_new_std_menu()

 Documentation/devicetree/bindings/media/i2c/tvp7002.txt  |   53 ++
 Documentation/devicetree/bindings/media/video-interfaces.txt |2 +
 MAINTAINERS  |   12 +
 drivers/media/i2c/Kconfig|   23 +
 drivers/media/i2c/Makefile   |2 +
 drivers/media/i2c/ad9389b.c  |   60 +-
 drivers/media/i2c/adv7511.c  | 1198 
+
 drivers/media/i2c/adv7604.c  |  147 +--
 drivers/media/i2c/adv7842.c  | 2946 
+
 drivers/media/i2c/ths8200.c  |   49 +-
 drivers/media/i2c/tvp7002.c  |   67 +-
 drivers/media/platform/s5p-tv/hdmi_drv.c |2 +-
 drivers/media/usb/hdpvr/hdpvr-video.c|2 +-
 drivers/media/v4l2-core/v4l2-ctrls.c |2 +-
 drivers/media/v4l2-core/v4l2-dev.c   |5 +-
 drivers/media/v4l2-core/v4l2-dv-timings.c|  121 ++-
 drivers/media/v4l2-core/v4l2-of.c|4 +
 include/media/adv7511.h  |   48 +
 include/media/adv7842.h  |  226 +
 include/media/v4l2-dv-timings.h  |   59 +-
 include/media/v4l2-mediabus.h|3 +
 21 files changed, 4846 insertions(+), 185 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/tvp7002.txt
 create mode 100644 drivers/media/i2c/adv7511.c
 create mode 100644 drivers/media/i2c/adv7842.c
 create mode 100644 include/media/adv7511.h
 create mode 100644 include/media/adv7842.h
--
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 v7] s5k5baf: add camera sensor driver

2013-08-23 Thread Laurent Pinchart
Hi Andrzej,

Thank you for the patch.

On Wednesday 21 August 2013 16:41:31 Andrzej Hajda wrote:
 Driver for Samsung S5K5BAF UXGA 1/5 2M CMOS Image Sensor
 with embedded SoC ISP.
 The driver exposes the sensor as two V4L2 subdevices:
 - S5K5BAF-CIS - pure CMOS Image Sensor, fixed 1600x1200 format,
   no controls.
 - S5K5BAF-ISP - Image Signal Processor, formats up to 1600x1200,
   pre/post ISP cropping, downscaling via selection API, controls.
 
 Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
 Signed-off-by: Andrzej Hajda a.ha...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---
 Hi,
 
 This patch incorporates Stephen's suggestions, thanks.
 
 Regards
 Andrzej
 
 v7
 - changed description of 'clock-frequency' DT property
 
 v6
 - endpoint node presence is now optional,
 - added asynchronous subdev registration support and clock
   handling,
 - use named gpios in DT bindings
 
 v5
 - removed hflip/vflip device tree properties
 
 v4
 - GPL changed to GPLv2,
 - bitfields replaced by u8,
 - cosmetic changes,
 - corrected s_stream flow,
 - gpio pins are no longer exported,
 - added I2C addresses to subdev names,
 - CIS subdev registration postponed after
   succesfull HW initialization,
 - added enums for pads,
 - selections are initialized only during probe,
 - default resolution changed to 1600x1200,
 - state-error pattern removed from few other functions,
 - entity link creation moved to registered callback.
 
 v3:
 - narrowed state-error usage to i2c and power errors,
 - private gain controls replaced by red/blue balance user controls,
 - added checks to devicetree gpio node parsing
 
 v2:
 - lower-cased driver name,
 - removed underscore from regulator names,
 - removed platform data code,
 - v4l controls grouped in anonymous structs,
 - added s5k5baf_clear_error function,
 - private controls definitions moved to uapi header file,
 - added v4l2-controls.h reservation for private controls,
 - corrected subdev registered/unregistered code,
 - .log_status sudbev op set to v4l2 helper,
 - moved entity link creation to probe routines,
 - added cleanup on error to probe function.
 ---
  .../devicetree/bindings/media/samsung-s5k5baf.txt  |   59 +
  MAINTAINERS|7 +
  drivers/media/i2c/Kconfig  |7 +
  drivers/media/i2c/Makefile |1 +
  drivers/media/i2c/s5k5baf.c| 2045 +
  5 files changed, 2119 insertions(+)
  create mode 100644
 Documentation/devicetree/bindings/media/samsung-s5k5baf.txt create mode
 100644 drivers/media/i2c/s5k5baf.c

[snip]

 diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
 new file mode 100644
 index 000..f21d9f1
 --- /dev/null
 +++ b/drivers/media/i2c/s5k5baf.c

[snip]

 +enum s5k5baf_pads_id {
 + PAD_CIS,
 + PAD_OUT,
 + CIS_PAD_NUM = 1,
 + ISP_PAD_NUM = 2
 +};

You can just use #define's here, the enum doesn't bring any additional value 
and isn't very explicit.

 +static struct v4l2_rect s5k5baf_cis_rect = { 0, 0, S5K5BAF_CIS_WIDTH,
 +  S5K5BAF_CIS_HEIGHT };

Shouldn't this be const ?

 +static u16 s5k5baf_i2c_read(struct s5k5baf *state, u16 addr)
 +{
 + struct i2c_client *c = v4l2_get_subdevdata(state-sd);
 + u16 w, r;

You should declare these variables as __be16.

 + struct i2c_msg msg[] = {
 + { .addr = c-addr, .flags = 0,
 +   .len = 2, .buf = (u8 *)w },
 + { .addr = c-addr, .flags = I2C_M_RD,
 +   .len = 2, .buf = (u8 *)r },
 + };
 + int ret;
 +
 + if (state-error)
 + return 0;
 +
 + w = htons(addr);

Wouldln't cpu_to_be16() be more appropriate ?

 + ret = i2c_transfer(c-adapter, msg, 2);
 + r = ntohs(r);

And be16_to_cpu() here.

 +
 + v4l2_dbg(3, debug, c, i2c_read: 0x%04x : 0x%04x\n, addr, r);
 +
 + if (ret != 2) {
 + v4l2_err(c, i2c_read: error during transfer (%d)\n, ret);
 + state-error = ret;
 + }
 + return r;
 +}

[snip]

 +static void s5k5baf_write_arr_seq(struct s5k5baf *state, u16 addr,
 +   u16 count, const u16 *seq)
 +{
 + struct i2c_client *c = v4l2_get_subdevdata(state-sd);
 + u16 buf[count + 1];
 + int ret, n;
 +
 + s5k5baf_i2c_write(state, REG_CMDWR_ADDR, addr);
 + if (state-error)
 + return;

I would have a preference for returning an error directly from the write 
function instead of storing it in state-error, that would be more explicit. 
The same is true for all read/write functions.

 + buf[0] = __constant_htons(REG_CMD_BUF);
 + for (n = 1; n = count; ++n)
 + buf[n] = htons(*seq++);

cpu_to_be16()/be16_to_cpu() here as well ?

 +
 + n *= 2;
 + ret = i2c_master_send(c, (char *)buf, n);
 + v4l2_dbg(3, debug, c, i2c_write_seq(count=%d): %*ph\n, count,
 +  min(2 * count, 64), seq - count);

Re: [patch] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()

2013-08-23 Thread Laurent Pinchart
Hi Dan,

Thank you for the patch.

On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
 The check is off by one so we could read one space past the end of the
 array.
 
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

Mauro, I have no other pending sensor patches, can you pick this one up from 
the list, or should I send you a pull request ?

 diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
 index 789c02a..629a5cd 100644
 --- a/drivers/media/i2c/s5k6aa.c
 +++ b/drivers/media/i2c/s5k6aa.c
 @@ -1003,7 +1003,7 @@ static int s5k6aa_enum_frame_interval(struct
 v4l2_subdev *sd, const struct s5k6aa_interval *fi;
   int ret = 0;
 
 - if (fie-index  ARRAY_SIZE(s5k6aa_intervals))
 + if (fie-index = ARRAY_SIZE(s5k6aa_intervals))
   return -EINVAL;
 
   v4l_bound_align_image(fie-width, S5K6AA_WIN_WIDTH_MIN,

-- 
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: media-ctl: line 1: syntax error: ( unexpected

2013-08-23 Thread Tom
Tom Bassai_Dai at gmx.net writes:

 
 Hello,
 
 I got the media-ctl tool from http://git.ideasonboard.org/git/media-ctl.git
 and compiled and build it successfully. But when try to run it I get this
error:
 
 sudo ./media-ctl -r -l ov3640 3-003c:0-OMAP3 ISP CCDC:0[1], OMAP3 ISP
 CCDC:1-OMAP3 ISP CCDC output:0[1]
 
 ./media-ctl: line 1: syntax error: ( unexpected
 
 Does anyone know how I can solve that problem?
 
 Best Regards, Tom
 
 


Sorry, but does really nobody know how to solve that problem?

Best Regards, Tom

--
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] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()

2013-08-23 Thread Sylwester Nawrocki
Hi Laurent,

On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
 Hi Dan,
 
 Thank you for the patch.
 
 On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
 The check is off by one so we could read one space past the end of the
 array.

 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 Mauro, I have no other pending sensor patches, can you pick this one up from 
 the list, or should I send you a pull request ?

I can handle all pending patches for the Samsung sensors, I was planning
to send a pull request today. I can pick up the ov9650 patch as well.
I'd like to also include the s5k5bafx sensor patch in one of my pull
requests.

IIRC it was agreed that we as Samsung will handle our stuff ourselves
and be sending it to Mauro directly.

--
Thanks,
Sylwester
--
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] [media] s5k6aa: off by one in s5k6aa_enum_frame_interval()

2013-08-23 Thread Laurent Pinchart
Hi Sylwester,

On Friday 23 August 2013 15:11:49 Sylwester Nawrocki wrote:
 On 08/23/2013 02:54 PM, Laurent Pinchart wrote:
  On Friday 23 August 2013 12:33:06 Dan Carpenter wrote:
  The check is off by one so we could read one space past the end of the
  array.
  
  Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
  
  Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
  
  Mauro, I have no other pending sensor patches, can you pick this one up
  from the list, or should I send you a pull request ?
 
 I can handle all pending patches for the Samsung sensors, I was planning
 to send a pull request today. I can pick up the ov9650 patch as well.
 I'd like to also include the s5k5bafx sensor patch in one of my pull
 requests.
 
 IIRC it was agreed that we as Samsung will handle our stuff ourselves
 and be sending it to Mauro directly.

That's less work for me, so I will definitely not complain :-)

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


[GIT PULL FOR v3.12] Matrix and Motion Detection support, move solo/go7007 out of staging

2013-08-23 Thread Hans Verkuil
Hi Mauro,

This pull request adds the motion detection and matrix API, implements it in the
solo6x10 and go7007 drivers and moves both drivers out of staging.

This pull request builds on top of my v3.12 pull request:

https://patchwork.linuxtv.org/patch/19898/

The only thing missing is enabling support for the WIS-Voyager saa7134 card 
that uses
the go7007 driver. I want to test that first to make sure nothing is broken 
since the
last time I used it. That may take some time before I can get around that, but 
that
board is very rare so there is no hurry with that.

Whether or not this can go in for 3.12 depends on your review of the new API 
elements.

Regards,

Hans

The following changes since commit 72230f27e0c7668e14dbcbd8abc1ed1c08451931:

  MAINTAINERS: add entries for adv7511 and adv7842. (2013-08-23 14:12:44 +0200)

are available in the git repository at:

  git://linuxtv.org/hverkuil/media_tree.git md

for you to fetch changes up to 342b0b7b8864b6e27cd013e94cf687649083ac33:

  go7007: move out of staging into drivers/media/usb. (2013-08-23 14:49:57 
+0200)


Hans Verkuil (12):
  v4l2-controls: add motion detection controls.
  v4l2: add matrix support.
  v4l2-compat-ioctl32: add g/s_matrix support
  solo: implement the new matrix ioctls instead of the custom ones.
  v4l2: add a motion detection event.
  solo6x10: implement motion detection events and controls.
  DocBook: add the new v4l detection class controls.
  DocBook: document new v4l motion detection event.
  DocBook: document the new v4l2 matrix ioctls.
  go7007: add motion detection support.
  solo6x10: move out of staging into drivers/media/pci.
  go7007: move out of staging into drivers/media/usb.

 Documentation/DocBook/media/v4l/controls.xml  |  69 
+++
 Documentation/DocBook/media/v4l/v4l2.xml  |   2 +
 Documentation/DocBook/media/v4l/vidioc-dqevent.xml|  40 ++
 Documentation/DocBook/media/v4l/vidioc-g-matrix.xml   | 108 

 Documentation/DocBook/media/v4l/vidioc-query-matrix.xml   | 180 
+++
 Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml|   8 ++
 drivers/media/pci/Kconfig |   1 +
 drivers/media/pci/Makefile|   1 +
 drivers/{staging/media = media/pci}/solo6x10/Kconfig |   2 +-
 drivers/{staging/media = media/pci}/solo6x10/Makefile|   2 +-
 drivers/{staging/media = media/pci}/solo6x10/TODO|   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-core.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-disp.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-eeprom.c   |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-enc.c  |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-g723.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-gpio.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-i2c.c  |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-jpeg.h |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-offsets.h  |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-p2m.c  |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-regs.h |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.h |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2-enc.c | 219 
-
 drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2.c |   0
 drivers/{staging/media = media/pci}/solo6x10/solo6x10.h  |  19 +--
 drivers/media/usb/Kconfig |   1 +
 drivers/media/usb/Makefile|   1 +
 drivers/{staging/media = media/usb}/go7007/Kconfig   |   0
 drivers/{staging/media = media/usb}/go7007/Makefile  |   0
 drivers/{staging/media = media/usb}/go7007/README|   0
 drivers/{staging/media = media/usb}/go7007/go7007-driver.c   | 119 
+-
 drivers/{staging/media = media/usb}/go7007/go7007-fw.c   |  28 +++--
 drivers/{staging/media = media/usb}/go7007/go7007-i2c.c  |   0
 drivers/{staging/media = media/usb}/go7007/go7007-loader.c   |   0
 drivers/{staging/media = media/usb}/go7007/go7007-priv.h |  16 +++
 drivers/{staging/media = media/usb}/go7007/go7007-usb.c  |   0
 drivers/{staging/media = media/usb}/go7007/go7007-v4l2.c | 382 
++---
 drivers/{staging/media = media/usb}/go7007/go7007.txt|   0
 drivers/{staging/media = media/usb}/go7007/s2250-board.c |   0
 

Email problems: use work email for the time being

2013-08-23 Thread Hans Verkuil
I can't read my xs4all.nl email at the moment, I suspect that port forwarding 
on my router
is broken. Of course, it happens just as I am abroad. So until Tuesday CC 
important emails
also to my work email: hans.verk...@cisco.com.

Note that emails to xs4all.nl aren't lost, I just can't access them at the 
moment.

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


[GIT PULL FIXES for 3.12] One small gspca ov519 driver bugfix

2013-08-23 Thread Hans de Goede

Hi Mauro,

Here is one more small bugfix for 3.12:

The following changes since commit 976f375df1730dd16aa7c101298ec47bdd338d79:

  [media] media/v4l2: VIDEO_SH_VEU should depend on HAS_DMA (2013-08-23 
05:46:08 -0300)

are available in the git repository at:

  git://linuxtv.org/hgoede/gspca.git media-for_v3.12

for you to fetch changes up to 6afea7c75d95e379019bbe68326b668bcca8f473:

  gspca_ov519: Fix support for the Terratec Terracam USB Pro (2013-08-23 
15:56:13 +0200)


Hans de Goede (1):
  gspca_ov519: Fix support for the Terratec Terracam USB Pro

 drivers/media/usb/gspca/ov519.c | 32 +---
 1 file changed, 25 insertions(+), 7 deletions(-)

Thanks  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] s5p-jpeg: Add initial device tree support for S5PV210/Exynos4210 SoCs

2013-08-23 Thread Sylwester Nawrocki
On 08/18/2013 10:14 PM, Sylwester Nawrocki wrote:
 This patch enables the JPEG codec on S5PV210 and Exynos4210 SoCs. There are
 some differences in newer versions of the JPEG codec IP on SoCs like 
 Exynos4x12
 and Exynos5 series and support for them will be added in subsequent patches.
 
 Cc: Andrzej Pietrasiewicz andrze...@samsung.com
 Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com

Could a DT maintainer review/Ack the binding in this patch ?

 ---
  .../bindings/media/exynos-jpeg-codec.txt   |   11 +++
  drivers/media/platform/s5p-jpeg/jpeg-core.c|   12 +++-
  2 files changed, 22 insertions(+), 1 deletions(-)
  create mode 100644 
 Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
 
 diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt 
 b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
 new file mode 100644
 index 000..937b755
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt
 @@ -0,0 +1,11 @@
 +Samsung S5P/EXYNOS SoC series JPEG codec
 +
 +Required properties:
 +
 +- compatible : should be one of:
 +   samsung,s5pv210-jpeg, samsung,exynos4210-jpeg;
 +- reg: address and length of the JPEG codec IP register set;
 +- interrupts : specifies the JPEG codec IP interrupt;
 +- clocks : should contain the JPEG codec IP gate clock specifier, from 
 the
 +   common clock bindings;
 +- clock-names: should contain jpeg entry.
 diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c 
 b/drivers/media/platform/s5p-jpeg/jpeg-core.c
 index 15d2396..88c5beb 100644
 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
 +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
 @@ -17,6 +17,7 @@
  #include linux/io.h
  #include linux/kernel.h
  #include linux/module.h
 +#include linux/of.h
  #include linux/platform_device.h
  #include linux/pm_runtime.h
  #include linux/slab.h
 @@ -1513,10 +1514,20 @@ static const struct dev_pm_ops s5p_jpeg_pm_ops = {
   .runtime_resume  = s5p_jpeg_runtime_resume,
  };
  
 +#ifdef CONFIG_OF
 +static const struct of_device_id s5p_jpeg_of_match[] = {
 + { .compatible = samsung,s5pv210-jpeg },
 + { .compatible = samsung,exynos4210-jpeg },
 + { /* sentinel */ },
 +};
 +MODULE_DEVICE_TABLE(of, s5p_jpeg_of_match);
 +#endif
 +
  static struct platform_driver s5p_jpeg_driver = {
   .probe = s5p_jpeg_probe,
   .remove = s5p_jpeg_remove,
   .driver = {
 + .of_match_table = of_match_ptr(s5p_jpeg_of_match),
   .owner = THIS_MODULE,
   .name = S5P_JPEG_M2M_NAME,
   .pm = s5p_jpeg_pm_ops,
 @@ -1528,4 +1539,3 @@ module_platform_driver(s5p_jpeg_driver);
  MODULE_AUTHOR(Andrzej Pietrasiewicz andrze...@samsung.com);
  MODULE_DESCRIPTION(Samsung JPEG codec driver);
  MODULE_LICENSE(GPL);
--
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


Vážení E-mail užívateľa;

2013-08-23 Thread Chase Notification

Vážení E-mail užívateľa;
Prekročili ste 23432 boxy nastaviť svoje
Webová služba / Administrátor, a budete mať problémy pri odosielaní a
prijímať e-maily, kým znova overiť. Musíte aktualizovať kliknutím na
odkaz nižšie a vyplňte údaje pre overenie vášho účtu
Prosím, kliknite na odkaz nižšie alebo skopírovať vložiť do
e-prehliadač pre overenie Schránky.

http://webmailupdate2304321.jimdo.com/

Pozor!
Ak tak neurobíte, budú mať obmedzený prístup k e-mailu schránky. Ak
sa
nepodarí aktualizovať svoj ​​účet do troch dní od aktualizácie
oznámenia,
bude váš účet natrvalo uzavretá.
S pozdravom,
System Administrator ®
--
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 v5] media: i2c: tvp7002: add OF support

2013-08-23 Thread Sylwester Nawrocki
On 08/13/2013 03:00 AM, Kumar Gala wrote:
 On Aug 11, 2013, at 1:25 AM, Lad, Prabhakar wrote:
 
 From: Lad, Prabhakar prabhakar.cse...@gmail.com

 add OF support for the tvp7002 driver.

 Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com
 ---
[...]
 .../devicetree/bindings/media/i2c/tvp7002.txt  |   53 
 drivers/media/i2c/tvp7002.c|   67 
 ++--
 2 files changed, 113 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/tvp7002.txt

 diff --git a/Documentation/devicetree/bindings/media/i2c/tvp7002.txt 
 b/Documentation/devicetree/bindings/media/i2c/tvp7002.txt
 new file mode 100644
 index 000..5f28b5d
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/media/i2c/tvp7002.txt
 @@ -0,0 +1,53 @@
 +* Texas Instruments TV7002 video decoder
 +
 +The TVP7002 device supports digitizing of video and graphics signal in RGB 
 and
 +YPbPr color space.
 +
 +Required Properties :
 +- compatible : Must be ti,tvp7002
 +
 +Optional Properties:
 
 
 +- hsync-active: HSYNC Polarity configuration for the bus. Default value when
 +  this property is not specified is 0.
 +
 +- vsync-active: VSYNC Polarity configuration for the bus. Default value when
 +  this property is not specified is 0.
 +
 +- pclk-sample: Clock polarity of the bus. Default value when this property 
 is
 +  not specified is 0.
 +
 +- sync-on-green-active: Active state of Sync-on-green signal property of the
 +  endpoint.
 +  0 = Normal Operation (Active Low, Default)
 +  1 = Inverted operation
 
 These seems better than what you have in video-interfaces.txt

We probably should specify default values in in the common binding description.
Then duplication could be avoided. Not sure if it's not too late for this, all
drivers would need to have same default values.

What's normal and what's inverted depends on a particular device.

 +- field-even-active: Active-high Field ID output polarity control of the 
 bus.
 +  Under normal operation, the field ID output is set to logic 1 for an odd 
 field
 +  (field 1) and set to logic 0 for an even field (field 0).
 +  0 = Normal Operation (Active Low, Default)
 +  1 = FID output polarity inverted
 +
 
 Why the duplication if this is covered in video-interfaces.txt?

Yes, it would be better to avoid redefining these properties in each specific 
device's binding. Presumably, for easier matching of DT properties with the
hardware's description, we could only say in device specific document which
value of a property corresponds to normal and which to inverted operation ?
 
 +For further reading of port node refer 
 Documentation/devicetree/bindings/media/
 +video-interfaces.txt.

-- 
Sylwester Nawrocki
Samsung RD Institute Poland
--
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 v3 2/2] media: i2c: adv7343: add OF support

2013-08-23 Thread Sylwester Nawrocki
Cc: DT binding maintainers

On 07/20/2013 08:21 AM, Lad, Prabhakar wrote:
 From: Lad, Prabhakar prabhakar.cse...@gmail.com
 
 add OF support for the adv7343 driver.
 
 Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com
 ---
[...]
  .../devicetree/bindings/media/i2c/adv7343.txt  |   48 
 
  drivers/media/i2c/adv7343.c|   46 ++-
  2 files changed, 93 insertions(+), 1 deletion(-)
  create mode 100644 Documentation/devicetree/bindings/media/i2c/adv7343.txt
 
 diff --git a/Documentation/devicetree/bindings/media/i2c/adv7343.txt 
 b/Documentation/devicetree/bindings/media/i2c/adv7343.txt
 new file mode 100644
 index 000..5653bc2
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/media/i2c/adv7343.txt
 @@ -0,0 +1,48 @@
 +* Analog Devices adv7343 video encoder
 +
 +The ADV7343 are high speed, digital-to-analog video encoders in a 64-lead 
 LQFP
 +package. Six high speed, 3.3 V, 11-bit video DACs provide support for 
 composite
 +(CVBS), S-Video (Y-C), and component (YPrPb/RGB) analog outputs in standard
 +definition (SD), enhanced definition (ED), or high definition (HD) video
 +formats.
 +
 +Required Properties :
 +- compatible: Must be adi,adv7343
 +
 +Optional Properties :
 +- adi,power-mode-sleep-mode: on enable the current consumption is reduced to
 +   micro ampere level. All DACs and the internal PLL
 +   circuit are disabled.

Sorry for getting back so late to this. I realize this is already queued in 
the media tree. But this binding doesn't look good enough to me. I think it 
will need to be corrected during upcoming -rc period.

It might be hard to figure out only from the chip's datasheet what
adi,power-mode-sleep-mode really refers to. AFAICS it is for assigning some
value to a specific register. If we really need to specify register values
in the device tree then it would probably make sense to describe to which
register this apply. Now the name looks like derived from some structure
member name in the Linux driver of the device.

 +- adi,power-mode-pll-ctrl: PLL and oversampling control. This control allows
 +internal PLL 1 circuit to be powered down and the
 +oversampling to be switched off.

Similar comments applies to this property.

 +- ad,adv7343-power-mode-dac: array configuring the power on/off DAC's 1..6,
 +   0 = OFF and 1 = ON, Default value when this
 +   property is not specified is 0 0 0 0 0 0.

Name of the property is incorrect here. It has changed to adi,dac-enable.

 +- ad,adv7343-sd-config-dac-out: array configure SD DAC Output's 1 and 2, 0 = 
 OFF
 +  and 1 = ON, Default value when this property is
 +  not specified is 0 0.

Similarly, adi,sd-dac-enable.

 +Example:
 +
 +i2c0@1c22000 {
 + ...
 + ...
 +
 + adv7343@2a {
 + compatible = adi,adv7343;
 + reg = 0x2a;
 +
 + port {
 + adv7343_1: endpoint {
 + adi,power-mode-sleep-mode;
 + adi,power-mode-pll-ctrl;
 + /* Use DAC1..3, DAC6 */
 + adi,dac-enable = 1 1 1 0 0 1;
 + /* Use SD DAC output 1 */
 + adi,sd-dac-enable = 1 0;
 + };
 + };
 + };
 + ...
 +};
 diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
 index f0238fb..aeb56c5 100644
 --- a/drivers/media/i2c/adv7343.c
 +++ b/drivers/media/i2c/adv7343.c
 @@ -30,6 +30,7 @@
  #include media/v4l2-async.h
  #include media/v4l2-device.h
  #include media/v4l2-ctrls.h
 +#include media/v4l2-of.h
  
  #include adv7343_regs.h
  
 @@ -399,6 +400,40 @@ static int adv7343_initialize(struct v4l2_subdev *sd)
   return err;
  }
  
 +static struct adv7343_platform_data *
 +adv7343_get_pdata(struct i2c_client *client)
 +{
 + struct adv7343_platform_data *pdata;
 + struct device_node *np;
 +
 + if (!IS_ENABLED(CONFIG_OF) || !client-dev.of_node)
 + return client-dev.platform_data;
 +
 + np = v4l2_of_get_next_endpoint(client-dev.of_node, NULL);
 + if (!np)
 + return NULL;
 +
 + pdata = devm_kzalloc(client-dev, sizeof(*pdata), GFP_KERNEL);
 + if (!pdata)
 + goto done;
 +
 + pdata-mode_config.sleep_mode =
 + of_property_read_bool(np, adi,power-mode-sleep-mode);
 +
 + pdata-mode_config.pll_control =
 + of_property_read_bool(np, adi,power-mode-pll-ctrl);
 +
 + of_property_read_u32_array(np, adi,dac-enable,
 +pdata-mode_config.dac, 6);
 +
 + of_property_read_u32_array(np, adi,sd-dac-enable,
 +

[GIT PULL FOR 3.12] Samsung driver cleanup and fixes

2013-08-23 Thread Sylwester Nawrocki
Hi Mauro,

This changeset includes mostly fixes and cleanups for the exynos4-is drivers,
s5p-tv regression fix and some s5k6aa/ov9650 sensor driver bug fixes.

The following changes since commit 976f375df1730dd16aa7c101298ec47bdd338d79:

  [media] media/v4l2: VIDEO_SH_VEU should depend on HAS_DMA (2013-08-23
05:46:08 -0300)

are available in the git repository at:

  git://linuxtv.org/snawrocki/samsung.git for-3.12-3

for you to fetch changes up to 419da960b12a6d0d48bd12da1df0989206f073fc:

  ov9650: off by one in ov965x_enum_frame_sizes() (2013-08-23 18:51:42 +0200)


Andrzej Hajda (1):
  exynos4-is: Ensure the FIMC gate clock is disabled at driver remove()

Dan Carpenter (4):
  exynos4-is: Print error message on timeout
  s3c-camif: forever loop in camif_hw_set_source_format()
  s5k6aa: off by one in s5k6aa_enum_frame_interval()
  ov9650: off by one in ov965x_enum_frame_sizes()

Sachin Kamat (1):
  exynos4-is: Annotate unused functions

Sylwester Nawrocki (5):
  exynos4-is: Initialize the ISP subdev sd-owner field
  exynos4-is: Add missing MODULE_LICENSE for exynos-fimc-is.ko
  exynos4-is: Add missing v4l2_device_unregister() call in fimc_md_remove()
  exynos4-is: Simplify sclk_cam clocks handling
  s5p-tv: Include missing v4l2-dv-timings.h header file

Tomasz Figa (1):
  exynos4-is: Handle suspend/resume of fimc-is-i2c correctly

 drivers/media/i2c/ov9650.c|2 +-
 drivers/media/i2c/s5k6aa.c|2 +-
 drivers/media/platform/exynos4-is/fimc-core.c |2 ++
 drivers/media/platform/exynos4-is/fimc-is-i2c.c   |   33 ++---
 drivers/media/platform/exynos4-is/fimc-is-param.c |2 +-
 drivers/media/platform/exynos4-is/fimc-is-regs.c  |4 +--
 drivers/media/platform/exynos4-is/fimc-is.c   |1 +
 drivers/media/platform/exynos4-is/fimc-isp.c  |2 ++
 drivers/media/platform/exynos4-is/media-dev.c |   15 --
 drivers/media/platform/s3c-camif/camif-regs.c |8 ++---
 drivers/media/platform/s5p-tv/hdmi_drv.c  |1 +
 11 files changed, 49 insertions(+), 23 deletions(-)


Thank you,
-- 
Sylwester Nawrocki
Samsung RD Institute Poland
--
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] [media] mx3-camera: locking typo in mx3_videobuf_queue()

2013-08-23 Thread Guennadi Liakhovetski
Hi Dan,

On Fri, 23 Aug 2013, Dan Carpenter wrote:

 There is a return in the middle where we haven't restored the IRQs to
 their original state.
 
 Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
 
 diff --git a/drivers/media/platform/soc_camera/mx3_camera.c 
 b/drivers/media/platform/soc_camera/mx3_camera.c
 index 1047e3e..4bae910 100644
 --- a/drivers/media/platform/soc_camera/mx3_camera.c
 +++ b/drivers/media/platform/soc_camera/mx3_camera.c
 @@ -334,7 +334,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
   if (!mx3_cam-active)
   mx3_cam-active = buf;
  
 - spin_unlock_irq(mx3_cam-lock);
 + spin_unlock_irqrestore(mx3_cam-lock, flags);
  
   cookie = txd-tx_submit(txd);
   dev_dbg(icd-parent, Submitted cookie %d DMA 0x%08x\n,

Please, wait with this. The above doesn't seem quite right to me. IIRC, 
the purpose of unlock_irq(), i.e. of the unconditionally enabling IRQs was 
to make sure -tx_submit() is called with interrupts enabled. I'm 
currently on holiday with very scarce internet access. Either please 
double-check this yourself or I'll have another look at it when back home 
next week.

Thanks
Guennadi

 @@ -343,7 +343,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
   if (cookie = 0)
   return;
  
 - spin_lock_irq(mx3_cam-lock);
 + spin_lock_irqsave(mx3_cam-lock, flags);
  
   /* Submit error */
   list_del_init(buf-queue);
 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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] v4l2-ctrls: Correct v4l2_ctrl_get_int_menu() function prototype

2013-08-23 Thread Sylwester Nawrocki
This function is supposed to return constant pointer to a constant.
Also remove double const from the qmenu_int arrays' declarations.

Reported-by: Fengguang Wu fengguang...@intel.com
Cc: Arun Kumar arun...@samsung.com
Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
---
 drivers/media/v4l2-core/v4l2-ctrls.c |6 +++---
 include/media/v4l2-common.h  |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c 
b/drivers/media/v4l2-core/v4l2-ctrls.c
index c6dc1fd..d081f35 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -565,13 +565,13 @@ EXPORT_SYMBOL(v4l2_ctrl_get_menu);
  * Returns NULL or an s64 type array containing the menu for given
  * control ID. The total number of the menu items is returned in @len.
  */
-const s64 const *v4l2_ctrl_get_int_menu(u32 id, u32 *len)
+const s64 * const v4l2_ctrl_get_int_menu(u32 id, u32 *len)
 {
-   static const s64 const qmenu_int_vpx_num_partitions[] = {
+   static const s64 qmenu_int_vpx_num_partitions[] = {
1, 2, 4, 8,
};
 
-   static const s64 const qmenu_int_vpx_num_ref_frames[] = {
+   static const s64 qmenu_int_vpx_num_ref_frames[] = {
1, 2, 3,
};
 
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 16550c4..e1c388c 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -86,7 +86,7 @@ int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct 
v4l2_queryctrl *qctrl,
const char * const *menu_items);
 const char *v4l2_ctrl_get_name(u32 id);
 const char * const *v4l2_ctrl_get_menu(u32 id);
-const s64 const *v4l2_ctrl_get_int_menu(u32 id, u32 *len);
+const s64 * const v4l2_ctrl_get_int_menu(u32 id, u32 *len);
 int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 
step, s32 def);
 int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu,
struct v4l2_queryctrl *qctrl, const char * const *menu_items);
-- 
1.7.4.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] s5p-jpeg: Add initial device tree support for S5PV210/Exynos4210 SoCs

2013-08-23 Thread Stephen Warren
On 08/23/2013 10:01 AM, Sylwester Nawrocki wrote:
 On 08/18/2013 10:14 PM, Sylwester Nawrocki wrote:
 This patch enables the JPEG codec on S5PV210 and Exynos4210 SoCs. There are
 some differences in newer versions of the JPEG codec IP on SoCs like 
 Exynos4x12
 and Exynos5 series and support for them will be added in subsequent patches.

 Cc: Andrzej Pietrasiewicz andrze...@samsung.com
 Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com
 
 Could a DT maintainer review/Ack the binding in this patch ?

The binding looks reasonable to me, so,
Acked-by: Stephen Warren swar...@nvidia.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


cron job: media_tree daily build: ERRORS

2013-08-23 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:   Sat Aug 24 04:00:24 CEST 2013
git branch: test
git hash:   976f375df1730dd16aa7c101298ec47bdd338d79
gcc version:i686-linux-gcc (GCC) 4.8.1
sparse version: 0.4.5-rc1
host hardware:  x86_64
host os:3.10.1

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: ERRORS
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: ERRORS
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.31.14-i686: ERRORS
linux-2.6.32.27-i686: ERRORS
linux-2.6.33.7-i686: ERRORS
linux-2.6.34.7-i686: ERRORS
linux-2.6.35.9-i686: ERRORS
linux-2.6.36.4-i686: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.10.1-i686: WARNINGS
linux-3.1.10-i686: ERRORS
linux-3.11-rc1-i686: WARNINGS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-2.6.31.14-x86_64: ERRORS
linux-2.6.32.27-x86_64: ERRORS
linux-2.6.33.7-x86_64: ERRORS
linux-2.6.34.7-x86_64: ERRORS
linux-2.6.35.9-x86_64: ERRORS
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.10.1-x86_64: WARNINGS
linux-3.1.10-x86_64: ERRORS
linux-3.11-rc1-x86_64: WARNINGS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
apps: WARNINGS
spec-git: OK
sparse version: 0.4.5-rc1
sparse: ERRORS

Detailed results are available here:

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

Full logs are available here:

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