Re: [PATCH v1] ARM: i.mx: mx3fb: add overlay support

2012-04-19 Thread Guennadi Liakhovetski
Hi Alex

Thanks for reviving, fixing and submitting this code!

On Wed, 18 Apr 2012, Alex Gershgorin wrote:

 This patch is based on the original version submitted by Guennadi 
 Liakhovetski,
 the patch initializes overlay channel, adds ioctl for configuring
 transparency of the overlay and graphics planes, CONFIG_FB_MX3_OVERLAY
 is also supported.
 
 In case that CONFIG_FB_MX3_OVERLAY is not defined, mx3fb is completely
 backward compatible.
 
 Blend mode, only global alpha blending has been tested.
 
 Signed-off-by: Alex Gershgorin al...@meprolight.com
 Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

Thanks for the credit (;-)), but no, putting my Sob after yours means, 
that I took your patch and forwarded it on to the next maintainer, which 
is clearly not the case here:-) The original i.MX31 framebuffer overlay 
code from my old patches also clearly wasn't written by me, since I didn't 
have a chance to test it. So, if you like, you can try to trace back 
original authors of that code and ask them, how they want to be credited 
here, otherwise just mentioning, that this work is based on some earlier 
patch series i.MX31: dmaengine and framebuffer drivers from 2008 by ... 
should be enough.

I don't think I can review this patch in sufficient depth, just a couple 
of minor comments below

 ---
 
 Applies to v3.4-rc3
 ---
  drivers/video/Kconfig |7 +
  drivers/video/mx3fb.c |  318 
 -
  include/linux/mxcfb.h |   93 ++
  3 files changed, 388 insertions(+), 30 deletions(-)
  create mode 100644 include/linux/mxcfb.h
 
 diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
 index a290be5..acbfccc 100644
 --- a/drivers/video/Kconfig
 +++ b/drivers/video/Kconfig
 @@ -2368,6 +2368,13 @@ config FB_MX3
 far only synchronous displays are supported. If you plan to use
 an LCD display with your i.MX31 system, say Y here.
  
 +config FB_MX3_OVERLAY
 + bool MX3 Overlay support
 + default n
 + depends on FB_MX3
 + ---help---
 +   Say Y here to enable overlay support
 +
  config FB_BROADSHEET
   tristate E-Ink Broadsheet/Epson S1D13521 controller support
   depends on FB
 diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
 index eec0d7b..0fb8a72 100644
 --- a/drivers/video/mx3fb.c
 +++ b/drivers/video/mx3fb.c
 @@ -26,6 +26,7 @@
  #include linux/console.h
  #include linux/clk.h
  #include linux/mutex.h
 +#include linux/mxcfb.h
  
  #include mach/dma.h
  #include mach/hardware.h
 @@ -238,6 +239,7 @@ static const struct fb_videomode mx3fb_modedb[] = {
  
  struct mx3fb_data {
   struct fb_info  *fbi;
 + struct fb_info  *fbi_ovl;
   int backlight_level;
   void __iomem*reg_base;
   spinlock_t  lock;
 @@ -246,6 +248,9 @@ struct mx3fb_data {
   uint32_th_start_width;
   uint32_tv_start_width;
   enum disp_data_mapping  disp_data_fmt;
 +
 + /* IDMAC / dmaengine interface */
 + struct idmac_channel*idmac_channel[2];  /* We need 2 channels */
  };
  
  struct dma_chan_request {
 @@ -272,6 +277,17 @@ struct mx3fb_info {
   u32 sync;   /* preserve var-sync flags */
  };
  
 +/* Allocated overlay buffer */
 +struct mx3fb_alloc_list {
 + struct list_headlist;
 + dma_addr_t  phy_addr;
 + void*cpu_addr;
 + size_t  size;
 +};
 +
 +/* A list of overlay buffers */
 +static LIST_HEAD(fb_alloc_list);

Static variables are evil:-) Which you prove below by protecting this 
global list-head by a per-device mutex. No, I have no idea whether anyone 
ever comes up with an SoC with multiple instances of this device, but at 
least this seems inconsistent to me.

 +
  static void mx3fb_dma_done(void *);
  
  /* Used fb-mode and bpp. Can be set on kernel command line, therefore 
 file-static. */
 @@ -303,7 +319,11 @@ static void sdc_fb_init(struct mx3fb_info *fbi)
   struct mx3fb_data *mx3fb = fbi-mx3fb;
   uint32_t reg;
  
 - reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
 + reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF)  ~SDC_COM_GWSEL;
 +
 + /* Also enable foreground for overlay graphic window is foreground */
 + if (mx3fb-fbi_ovl  fbi == mx3fb-fbi_ovl-par)
 + reg |= (SDC_COM_FG_EN | SDC_COM_GWSEL);

Superfluous parenthesis.

  
   mx3fb_write_reg(mx3fb, reg | SDC_COM_BG_EN, SDC_COM_CONF);
  }
 @@ -312,13 +332,24 @@ static void sdc_fb_init(struct mx3fb_info *fbi)
  static uint32_t sdc_fb_uninit(struct mx3fb_info *fbi)
  {
   struct mx3fb_data *mx3fb = fbi-mx3fb;
 - uint32_t reg;
 + uint32_t reg, chan_mask;
  
   reg = mx3fb_read_reg(mx3fb, SDC_COM_CONF);
  
 - mx3fb_write_reg(mx3fb, reg  ~SDC_COM_BG_EN, SDC_COM_CONF);
 + /*
 +  * Don't we have to automatically disable overlay when disabling
 +  * background? 

Re: [RFC 05/13] v4l: vb2-dma-contig: add support for DMABUF exporting

2012-04-19 Thread Tomasz Stanislawski
Hi Laurent,
Thank you for your review.
Please refer to the comments below.

On 04/17/2012 04:08 PM, Laurent Pinchart wrote:
 Hi Tomasz,
 
 Thanks for the patch.
 
 On Tuesday 10 April 2012 15:10:39 Tomasz Stanislawski wrote:
 This patch adds support for exporting a dma-contig buffer using
 DMABUF interface.

 Signed-off-by: Tomasz Stanislawski t.stanisl...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---

[snip]

 +static struct sg_table *vb2_dc_dmabuf_ops_map(
 +struct dma_buf_attachment *db_attach, enum dma_data_direction dir)
 +{
 +struct dma_buf *dbuf = db_attach-dmabuf;
 +struct vb2_dc_buf *buf = dbuf-priv;
 +struct vb2_dc_attachment *attach = db_attach-priv;
 +struct sg_table *sgt;
 +struct scatterlist *rd, *wr;
 +int i, ret;
 
 You can make i an unsigned int :-)
 

Right.. splitting declaration may be also a good idea :)

 +
 +/* return previously mapped sg table */
 +if (attach)
 +return attach-sgt;
 
 This effectively keeps the mapping around as long as the attachment exists. 
 We 
 don't try to swap out buffers in V4L2 as is done in DRM at the moment, so it 
 might not be too much of an issue, but the behaviour of the implementation 
 will change if we later decide to map/unmap the buffers in the map/unmap 
 handlers. Do you think that could be a problem ?

I don't that it is a problem. If an importer calls dma_map_sg then
caching sgt on an exporter side reduces a cost of an allocating
and an initialization of sgt.

 
 +
 +attach = kzalloc(sizeof *attach, GFP_KERNEL);
 +if (!attach)
 +return ERR_PTR(-ENOMEM);
 
 Why don't you allocate the vb2_dc_attachment here instead of 
 vb2_dc_dmabuf_ops_attach() ?
 

Good point.
The attachment could be allocated at vb2_dc_attachment but all its
fields would be uninitialized. I mean an empty sgt and an undefined
dma direction. I decided to allocate the attachment in vb2_dc_dmabuf_ops_map
because only than all information needed to create a valid attachment
object are available.

The other solution might be the allocation at vb2_dc_attachment. The field dir
would be set to DMA_NONE. If this filed is equal to DMA_NONE at
vb2_dc_dmabuf_ops_map then sgt is allocated and mapped and direction field is
updated. If value is not DMA_NONE then the sgt is reused.

Do you think that it is a good idea?

 +sgt = attach-sgt;
 +attach-dir = dir;
 +
 +/* copying the buf-base_sgt to attachment */
 
 I would add an explanation regarding why you need to copy the SG list. 
 Something like.
 
 Copy the buf-base_sgt scatter list to the attachment, as we can't map the 
 same scatter list to multiple devices at the same time.
 

ok

 +ret = sg_alloc_table(sgt, buf-sgt_base-orig_nents, GFP_KERNEL);
 +if (ret) {
 +kfree(attach);
 +return ERR_PTR(-ENOMEM);
 +}
 +
 +rd = buf-sgt_base-sgl;
 +wr = sgt-sgl;
 +for (i = 0; i  sgt-orig_nents; ++i) {
 +sg_set_page(wr, sg_page(rd), rd-length, rd-offset);
 +rd = sg_next(rd);
 +wr = sg_next(wr);
 +}

 +/* mapping new sglist to the client */
 +ret = dma_map_sg(db_attach-dev, sgt-sgl, sgt-orig_nents, dir);
 +if (ret = 0) {
 +printk(KERN_ERR failed to map scatterlist\n);
 +sg_free_table(sgt);
 +kfree(attach);
 +return ERR_PTR(-EIO);
 +}
 +
 +db_attach-priv = attach;
 +
 +return sgt;
 +}
 +
 +static void vb2_dc_dmabuf_ops_unmap(struct dma_buf_attachment *db_attach,
 +struct sg_table *sgt, enum dma_data_direction dir)
 +{
 +/* nothing to be done here */
 +}
 +
 +static void vb2_dc_dmabuf_ops_release(struct dma_buf *dbuf)
 +{
 +/* drop reference obtained in vb2_dc_get_dmabuf */
 +vb2_dc_put(dbuf-priv);
 
 Shouldn't you set vb2_dc_buf::dma_buf to NULL here ? Otherwise the next 
 vb2_dc_get_dmabuf() call will return a DMABUF object that has been freed.
 

No.

The buffer object is destroyed at vb2_dc_put when reference count drops to 0.
It happens could happen after only REQBUF(count=0) or on last close().
The DMABUF object is created only for MMAP buffers. The DMABUF object is based
only on results of dma_alloc_coherent and dma_get_pages (or its future 
equivalent).
Therefore the DMABUF object is valid as long as the buffer is valid.

Notice that dmabuf object could be created in vb2_dc_alloc. I moved
it to vb2_dc_get_dmabuf to avoid a creation of an object that
may not be used.

 +}
 +
 +static struct dma_buf_ops vb2_dc_dmabuf_ops = {
 +.attach = vb2_dc_dmabuf_ops_attach,
 +.detach = vb2_dc_dmabuf_ops_detach,
 +.map_dma_buf = vb2_dc_dmabuf_ops_map,
 +.unmap_dma_buf = vb2_dc_dmabuf_ops_unmap,
 +.release = vb2_dc_dmabuf_ops_release,
 +};
 +
 +static struct dma_buf *vb2_dc_get_dmabuf(void *buf_priv)
 +{
 +struct vb2_dc_buf *buf = buf_priv;
 +struct dma_buf *dbuf;
 +
 +if (buf-dma_buf)
 +return buf-dma_buf;
 
 Can't there be a race 

HVR-950Q: (AssemblePSIP) Error: offset181, pes length current cannot be queried

2012-04-19 Thread Brian J. Murrell
I was recording 3 programs last night using Mythtv (0.25) with my
HVR-950Q.  All three recordings stopped dead after Mythtv reported:

Apr 18 20:32:04 pvr mythbackend[1857]: E DVBRead mpeg/mpegstreamdata.cpp:362 
(AssemblePSIP) Error: offset181, pes length  current cannot be queried

It also later reported:

Apr 18 20:59:59 pvr mythbackend[1857]: W DeviceReadBuffer 
DeviceReadBuffer.cpp:525 (Poll) DevRdB(/dev/dvb/adapter0/frontend0): Poll took 
an unusually long time 1674946 ms

The only messages on the kernel message buffering during that whole
time were:

Apr 18 20:00:00 pvr kernel: [ 1659.927835] xc5000: waiting for firmware upload 
(dvb-fe-xc5000-1.6.114.fw)...
Apr 18 20:00:00 pvr kernel: [ 1659.938474] xc5000: firmware read 12401 bytes.
Apr 18 20:00:00 pvr kernel: [ 1659.942973] xc5000: firmware uploading...
Apr 18 20:00:07 pvr kernel: [ 1666.608017] xc5000: firmware upload complete...
Apr 18 20:59:59 pvr kernel: [ 5259.143919] xc5000: waiting for firmware upload 
(dvb-fe-xc5000-1.6.114.fw)...
Apr 18 20:59:59 pvr kernel: [ 5259.170733] xc5000: firmware read 12401 bytes.
Apr 18 20:59:59 pvr kernel: [ 5259.175227] xc5000: firmware uploading...
Apr 18 21:00:06 pvr kernel: [ 5265.872024] xc5000: firmware upload complete...

I am using (Ubuntu) Linux kernel 3.2.0-18-generic

Any ideas what happened?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature


Re: [PATCH v4 11/14] v4l: vb2-dma-contig: add support for dma_buf importing

2012-04-19 Thread Tomasz Stanislawski
Hi Laurent,

On 04/17/2012 02:57 AM, Laurent Pinchart wrote:
 Hi Tomasz,
 
 Thanks for the patch.
 
 On Friday 13 April 2012 17:47:53 Tomasz Stanislawski wrote:
 From: Sumit Semwal sumit.sem...@ti.com

 This patch makes changes for adding dma-contig as a dma_buf user. It
 provides function implementations for the {attach, detach, map,
 unmap}_dmabuf() mem_ops of DMABUF memory type.

 Signed-off-by: Sumit Semwal sumit.sem...@ti.com
 Signed-off-by: Sumit Semwal sumit.sem...@linaro.org
  [author of the original patch]
 Signed-off-by: Tomasz Stanislawski t.stanisl...@samsung.com
  [integration with refactored dma-contig allocator]
 
 Pending the comment below,
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 +static void vb2_dc_detach_dmabuf(void *mem_priv)
 +{
 +struct vb2_dc_buf *buf = mem_priv;
 +
 +if (WARN_ON(buf-dma_addr))
 +vb2_dc_unmap_dmabuf(buf);
 
 This should never happen, and would be a videobuf2 bug otherwise, right ?
 

Theoretically it should not happen with latest vb2-core patches.
However there is little sense to crash the kernel if it is possible
to handle this bug. Maybe I should add some comments before the check.

 +
 +/* detach this attachment */
 +dma_buf_detach(buf-db_attach-dmabuf, buf-db_attach);
 +kfree(buf);
 +}
 

Regards,
Tomasz Stanislawski
--
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


Subject: [PATCH] [Trivial] Staging: go7007: wis-tw2804 upstyle to v4l2

2012-04-19 Thread volokh
 Some update to new v4l2 controls

 Signed-off-by:Volokh Konstantin m...@bk.ru
---
 drivers/staging/media/go7007/wis-tw2804.c |  378 +
 1 files changed, 228 insertions(+), 150 deletions(-)

diff --git a/drivers/staging/media/go7007/wis-tw2804.c 
b/drivers/staging/media/go7007/wis-tw2804.c
index 9134f03..cffaa2b 100644
--- a/drivers/staging/media/go7007/wis-tw2804.c
+++ b/drivers/staging/media/go7007/wis-tw2804.c
@@ -21,10 +21,13 @@
 #include linux/videodev2.h
 #include linux/ioctl.h
 #include linux/slab.h
+#include media/v4l2-subdev.h
+#include media/v4l2-device.h
 
 #include wis-i2c.h
 
 struct wis_tw2804 {
+   struct v4l2_subdev sd;
int channel;
int norm;
int brightness;
@@ -33,6 +36,13 @@ struct wis_tw2804 {
int hue;
 };
 
+static inline struct wis_tw2804 *to_state(struct v4l2_subdev *sd)
+{
+   return container_of(sd, struct wis_tw2804, sd);
+}
+
+static int tw2804_log_status(struct v4l2_subdev *sd);
+
 static u8 global_registers[] = {
0x39, 0x00,
0x3a, 0xff,
@@ -105,223 +115,291 @@ static u8 channel_registers[] = {
 
 static int write_reg(struct i2c_client *client, u8 reg, u8 value, int channel)
 {
-   return i2c_smbus_write_byte_data(client, reg | (channel  6), value);
+   int i;
+
+   for (i = 0; i  10; i++)
+   /*return */if (i2c_smbus_write_byte_data(client,
+   reg|(channel6), value)  0)
+   return -1;
+   return 0;
 }
 
+/**static u8 read_reg(struct i2c_client *client, u8 reg, int channel)
+{
+  return i2c_smbus_read_byte_data(client,reg|(channel6));
+}*/
+
 static int write_regs(struct i2c_client *client, u8 *regs, int channel)
 {
int i;
 
for (i = 0; regs[i] != 0xff; i += 2)
-   if (i2c_smbus_write_byte_data(client,
-   regs[i] | (channel  6), regs[i + 1])  0)
+   if (i2c_smbus_write_byte_data(client
+   , regs[i] | (channel  6), regs[i + 1])  0)
return -1;
return 0;
 }
 
-static int wis_tw2804_command(struct i2c_client *client,
-   unsigned int cmd, void *arg)
+static int wis_tw2804_command(
+   struct i2c_client *client,
+   unsigned int cmd,
+   void *arg)
 {
-   struct wis_tw2804 *dec = i2c_get_clientdata(client);
+   struct v4l2_subdev *sd = i2c_get_clientdata(client);
+   struct wis_tw2804 *dec = to_state(sd);
+   int *input;
+
+   printk(KERN_INFOwis-tw2804: call command %d\n, cmd);
 
if (cmd == DECODER_SET_CHANNEL) {
-   int *input = arg;
+   printk(KERN_INFOwis-tw2804: DecoderSetChannel call command 
%d\n, cmd);
+
+   input = arg;
 
if (*input  0 || *input  3) {
-   printk(KERN_ERR wis-tw2804: channel %d is not 
-   between 0 and 3!\n, *input);
+   printk(KERN_ERRwis-tw2804: channel %d is not between 0 
and 3!\n, *input);
return 0;
}
dec-channel = *input;
-   printk(KERN_DEBUG wis-tw2804: initializing TW2804 
-   channel %d\n, dec-channel);
-   if (dec-channel == 0 
-   write_regs(client, global_registers, 0)  0) {
-   printk(KERN_ERR wis-tw2804: error initializing 
-   TW2804 global registers\n);
+   printk(KERN_DEBUGwis-tw2804: initializing TW2804 channel 
%d\n, dec-channel);
+   if (dec-channel == 0  write_regs(client,
+   global_registers, 0)  0) {
+   printk(KERN_ERRwis-tw2804: error initializing TW2804 
global registers\n);
return 0;
}
if (write_regs(client, channel_registers, dec-channel)  0) {
-   printk(KERN_ERR wis-tw2804: error initializing 
-   TW2804 channel %d\n, dec-channel);
+   printk(KERN_ERRwis-tw2804: error initializing TW2804 
channel %d\n, dec-channel);
return 0;
}
return 0;
}
 
if (dec-channel  0) {
-   printk(KERN_DEBUG wis-tw2804: ignoring command %08x until 
-   channel number is set\n, cmd);
+   printk(KERN_DEBUGwis-tw2804: ignoring command %08x until 
channel number is set\n, cmd);
return 0;
}
 
-   switch (cmd) {
-   case VIDIOC_S_STD:
-   {
-   v4l2_std_id *input = arg;
-   u8 regs[] = {
-   0x01, *input  V4L2_STD_NTSC ? 0xc4 : 0x84,
-   0x09, *input  V4L2_STD_NTSC ? 0x07 : 0x04,
-   0x0a, *input  V4L2_STD_NTSC ? 0xf0 : 0x20,
-   

can't rmmod au0828; modprobe au0828 and have a working device

2012-04-19 Thread Brian J. Murrell
I have an HVR-950Q:

[44847.234403] tveeprom 0-0050: Hauppauge model 72001, rev B3F0, serial# ***
[44847.294643] tveeprom 0-0050: MAC address is **:**:**:**:**:**
[44847.343417] tveeprom 0-0050: tuner model is Xceive XC5000 (idx 150, type 76)
[44847.402873] tveeprom 0-0050: TV standards NTSC(M) ATSC/DVB Digital (eeprom 
0x88)
[44847.465471] tveeprom 0-0050: audio processor is AU8522 (idx 44)
[44847.515481] tveeprom 0-0050: decoder processor is AU8522 (idx 42)
[44847.567162] tveeprom 0-0050: has no radio, has IR receiver, has no IR 
transmitter
[44847.630272] hauppauge_eeprom: hauppauge eeprom: model=72001

I cannot seem to get it to work after removing the au0828 xc5000 au8522
modules and then modprobing the au0828 module.

If I physically remove the device and plug it back in, it will work
fine, however using rmmod/modprobe it seems to fail on trying to read
from it.  For example:

$ gnutv -adapter 0 -out stdout -channels chans 100-3

just yields a:

Using frontend Auvitek AU8522 QAM/8VSB Frontend, type ATSC
status   | signal  | snr  | ber  | unc  | 

where the value to the right of the signal and snr toggles between
 and 0118 but no output is ever emitted.

Why would I need to use rmmod and modprobe to remove and reinstall
the driver you might ask?  To be honest I'd prefer not to have to
but with these drivers loaded suspend-to-ram hangs.  This never used
to be the case on previous (2.6.32ish) kernels but now with the 3.2
kernels that I have been using it is the case.

So in fact, if the hanging-on-suspend problem could be fixed, this
other issue with a failing device after rmmod/modprobe would be moot.

Any ideas on either problem?

Cheers,
b.



signature.asc
Description: OpenPGP digital signature


Re: Subject: [PATCH] [Trivial] Staging: go7007: wis-tw2804 upstyle to v4l2

2012-04-19 Thread Dan Carpenter
On Thu, Apr 19, 2012 at 03:26:17PM +0400, volokh wrote:
  static int write_reg(struct i2c_client *client, u8 reg, u8 value, int 
 channel)
  {
 - return i2c_smbus_write_byte_data(client, reg | (channel  6), value);
 + int i;
 +
 + for (i = 0; i  10; i++)
 + /*return */if (i2c_smbus_write_byte_data(client,
 + reg|(channel6), value)  0)
 + return -1;
 + return 0;
  }

There are several style problems with this function.
1) Bogus comment doesn't add any information.
2) Multi-line indents get curly parens, for stlye reasons even
   though it's not needed for semantic reasons.
3) Preserve the return codes from lower levels.
4) Don't return -1.  -1 means -EPERM and this is not a permision
   issue.
5) Put spaces around math operators.  These were correct in the
   original code.

This function should look like:

static int write_reg(struct i2c_client *client, u8 reg, u8 value, int channel)
{
int ret;
int i;

for (i = 0; i  10; i++) {
ret = i2c_smbus_write_byte_data(client, reg | (channel  6),
value);
if (ret)
return ret;
}
return 0;
}

Now that the function is readable, why are we writing to the
register 10 times?

  
 +/**static u8 read_reg(struct i2c_client *client, u8 reg, int channel)
 +{
 +  return i2c_smbus_read_byte_data(client,reg|(channel6));
 +}*/
 +

Bogus comment adds nothing.

  static int write_regs(struct i2c_client *client, u8 *regs, int channel)
  {
   int i;
  
   for (i = 0; regs[i] != 0xff; i += 2)
 - if (i2c_smbus_write_byte_data(client,
 - regs[i] | (channel  6), regs[i + 1])  0)
 + if (i2c_smbus_write_byte_data(client
 + , regs[i] | (channel  6), regs[i + 1])  0)

The comma was in the correct place in the original code...  This
change is wrong.

   return -1;
   return 0;
  }
  
 -static int wis_tw2804_command(struct i2c_client *client,
 - unsigned int cmd, void *arg)
 +static int wis_tw2804_command(
 + struct i2c_client *client,
 + unsigned int cmd,
 + void *arg)

The style was correct in the original code.  This change is wrong.

  {
 - struct wis_tw2804 *dec = i2c_get_clientdata(client);
 + struct v4l2_subdev *sd = i2c_get_clientdata(client);
 + struct wis_tw2804 *dec = to_state(sd);
 + int *input;
 +
 + printk(KERN_INFOwis-tw2804: call command %d\n, cmd);

This seems like a very spammy printk().  :/  Put a space after the
KERN_INFO.

  
   if (cmd == DECODER_SET_CHANNEL) {
 - int *input = arg;

The input was better here, where it was declared originally.

 + printk(KERN_INFOwis-tw2804: DecoderSetChannel call command 
 %d\n, cmd);
 +
 + input = arg;
  
   if (*input  0 || *input  3) {
 - printk(KERN_ERR wis-tw2804: channel %d is not 
 - between 0 and 3!\n, *input);
 + printk(KERN_ERRwis-tw2804: channel %d is not between 0 
 and 3!\n, *input);

These kinds of unrelated changes don't belong in a new feature
patch.  Cleanups, fixes, and features don't mix.  In this situation,
I would just leave it as is.  I know checkpatch.pl complains, but
it's up to the maintainer to decide what to do.  If you decide to
change it (in a separate patch) the format would be:

printk(KERN_ERR
   wis-tw2804: channel %d is not between 0 and 
3!\n,
   *input);

When people submit big patches there is a lot to complain about and
they don't get merged.  I'm a hundred lines into the review and I
haven't even got to any changes which matter or are improvements.

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 V2 4/5] [Documentation] Media: Update docs for V4L2 FM new features

2012-04-19 Thread Hans Verkuil
Hi Manjunatha,

A quick review:

On Wednesday, April 18, 2012 18:06:42 manjunatha_ha...@ti.com wrote:
 From: Manjunatha Halli x0130...@ti.com
 
 The list of new features -
   1) New control class for FM RX
   2) New FM RX CID's - De-Emphasis filter mode and RDS AF switch
   3) New FM TX CID - RDS Alternate frequency set.
 
 Signed-off-by: Manjunatha Halli x0130...@ti.com
 ---
  Documentation/DocBook/media/v4l/compat.xml |3 +
  Documentation/DocBook/media/v4l/controls.xml   |   78 
 
  Documentation/DocBook/media/v4l/dev-rds.xml|5 +-
  .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   |7 ++
  4 files changed, 91 insertions(+), 2 deletions(-)
 
 diff --git a/Documentation/DocBook/media/v4l/compat.xml 
 b/Documentation/DocBook/media/v4l/compat.xml
 index bce97c5..df1f345 100644
 --- a/Documentation/DocBook/media/v4l/compat.xml
 +++ b/Documentation/DocBook/media/v4l/compat.xml
 @@ -2311,6 +2311,9 @@ more information./para
 paraAdded FM Modulator (FM TX) Extended Control Class: 
 constantV4L2_CTRL_CLASS_FM_TX/constant and their Control IDs./para
   /listitem
   listitem
 + paraAdded FM Receiver (FM RX) Extended Control Class: 
 constantV4L2_CTRL_CLASS_FM_RX/constant and their Control IDs./para
 + /listitem
 + listitem
 paraAdded Remote Controller chapter, describing the default Remote 
 Controller mapping for media devices./para
   /listitem
/orderedlist
 diff --git a/Documentation/DocBook/media/v4l/controls.xml 
 b/Documentation/DocBook/media/v4l/controls.xml
 index b84f25e..f6c8034 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3018,6 +3018,12 @@ to find receivers which can scroll strings sized as 32 
 x N or 64 x N characters.
  with steps of 32 or 64 characters. The result is it must always contain a 
 string with size multiple of 32 or 64. /entry
 /row
 row
 +   entry 
 spanname=idconstantV4L2_CID_RDS_TX_AF_FREQ/constantnbsp;/entry
 +   entryinteger/entry
 +   /row
 +   rowentry spanname=descrSets the RDS Alternate Frequency value 
 which allows a receiver to re-tune to a different frequency providing the 
 same station when the first signal becomes too weak (e.g., when moving out of 
 range). /entry

What is the unit of this frequency? I assume that is defined in the RDS 
standard?

 +   /row
 +   row
   entry 
 spanname=idconstantV4L2_CID_AUDIO_LIMITER_ENABLED/constantnbsp;/entry
   entryboolean/entry
 /row
 @@ -3146,6 +3152,78 @@ manually or automatically if set to zero. Unit, range 
 and step are driver-specif
  xref linkend=en50067 / document, from CENELEC./para
  /section
  
 +section id=fm-rx-controls
 +  titleFM Receiver Control Reference/title
 +
 +  paraThe FM Receiver (FM_RX) class includes controls for common 
 features of
 +FM Reception capable devices. Currently this class includes parameter for 
 Alternate
 +frequency./para
 +
 +  table pgwide=1 frame=none id=fm-rx-control-id
 +  titleFM_RX Control IDs/title
 +
 +  tgroup cols=4
 +colspec colname=c1 colwidth=1* /
 +colspec colname=c2 colwidth=6* /
 +colspec colname=c3 colwidth=2* /
 +colspec colname=c4 colwidth=6* /
 +spanspec namest=c1 nameend=c2 spanname=id /
 +spanspec namest=c2 nameend=c4 spanname=descr /
 +thead
 +  row
 +entry spanname=id align=leftID/entry
 +entry align=leftType/entry
 +  /rowrow rowsep=1entry spanname=descr 
 align=leftDescription/entry
 +  /row
 +/thead
 +tbody valign=top
 +  rowentry/entry/row
 +  row
 +entry 
 spanname=idconstantV4L2_CID_FM_RX_CLASS/constantnbsp;/entry
 +entryclass/entry
 +  /rowrowentry spanname=descrThe FM_RX class
 +descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a
 +description of this control class./entry
 +  /row
 +  row
 +entry 
 spanname=idconstantV4L2_CID_RDS_AF_SWITCH/constantnbsp;/entry
 +entryboolean/entry
 +  /row
 +  rowentry spanname=descrEnable or Disable's FM RX RDS 
 Alternate frequency feature./entry

How does this work? If this is enabled, will the receiver automagically switch 
to
the alternate frequency if the signal becomes too weak? And how does that affect
VIDIOC_G_FREQUENCY?

 +  /row
 +  row
 + entry 
 spanname=idconstantV4L2_CID_TUNE_DEEMPHASIS/constantnbsp;/entry
 + entryinteger/entry
 +   /row
 +   row id=v4l2-deemphasisentry spanname=descrConfigures the 
 de-emphasis value for reception.
 +A pre-emphasis filter is applied to the broadcast to accentuate the high 
 audio frequencies.
 +Depending on the region, a time constant of either 50 or 75 useconds is 
 used. The enumnbsp;v4l2_deemphasis
 +defines possible values for 

Re: ATSC-MH driver support for the Hauppauge WinTV Aero-m

2012-04-19 Thread Mauro Carvalho Chehab
Em 10-04-2012 00:49, Michael Krufky escreveu:
 These patches have been around and tested for quite some time.  Every
 few weeks I have to regenerate them in order to stay in sync with the
 media tree.  I think it's time for some review and possibly merge into
 the master development repository.  This complies with what was
 discussed in at the media developer kernel summit in Prague, Oct 2011.
  Once merged, I'll have time to work on some userspace utilities.  For
 now, I have created a very basic ATSC-MH scanning application that
 demonstrates the API additions.  The app can be found here:
 http://linuxtv.org/hg/~mkrufky/mhscan
 
 Please review:
 
 The following changes since commit 296da3cd14db9eb5606924962b2956c9c656dbb0:
 
   [media] pwc: poll(): Check that the device has not beem claimed for
 streaming already (2012-03-27 11:42:04 -0300)
 
 are available in the git repository at:
   git://git.linuxtv.org/mkrufky/mxl111sf mh_for_v3.5
 
 Michael Krufky (8):
   linux-dvb v5 API support for ATSC-MH

This patch is incomplete:
- It doesn't increment the version number;
- Docbook is untouched.

Also, I didn't see any post of those patches at the ML. Please post the
patches at the ML for review before sending a pull request, especially
when API changes are there.

   mxl111sf-tuner: tune SYS_ATSCMH just like SYS_ATSC
   DVB: add support for the LG2160 ATSC-MH demodulator
   lg2160: update internal api interfaces and enable build
   dvb-demux: add functionality to send raw payload to the dvr device
   dvb-usb: add support for dvb-usb-adapters that deliver raw payload
   dvb-usb: increase MAX_NO_OF_FE_PER_ADAP from 2 to 3
   mxl111sf: add ATSC-MH support
 
  drivers/media/dvb/dvb-core/dvb_demux.c |   10 +
  drivers/media/dvb/dvb-core/dvb_demux.h |2 +
  drivers/media/dvb/dvb-core/dvb_frontend.c  |   92 ++-
  drivers/media/dvb/dvb-core/dvb_frontend.h  |   22 +
  drivers/media/dvb/dvb-usb/Kconfig  |1 +
  drivers/media/dvb/dvb-usb/dvb-usb-urb.c|   12 +
  drivers/media/dvb/dvb-usb/dvb-usb.h|3 +-
  drivers/media/dvb/dvb-usb/mxl111sf-tuner.c |1 +
  drivers/media/dvb/dvb-usb/mxl111sf.c   |  871 -
  drivers/media/dvb/frontends/Kconfig|8 +
  drivers/media/dvb/frontends/Makefile   |1 +
  drivers/media/dvb/frontends/lg2160.c   | 1461 
 
  drivers/media/dvb/frontends/lg2160.h   |   84 ++
  include/linux/dvb/frontend.h   |   54 +-
  14 files changed, 2572 insertions(+), 50 deletions(-)
  create mode 100644 drivers/media/dvb/frontends/lg2160.c
  create mode 100644 drivers/media/dvb/frontends/lg2160.h




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

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


[PATCH] as3645a: move .remove under .devexit.text

2012-04-19 Thread Andy Shevchenko
There is no needs to keep .remove under .exit.text. This driver is for a
standalone chip that could be on any board and connected to any i2c bus.

Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 drivers/media/video/as3645a.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/as3645a.c b/drivers/media/video/as3645a.c
index 7a3371f..dc2571f 100644
--- a/drivers/media/video/as3645a.c
+++ b/drivers/media/video/as3645a.c
@@ -846,7 +846,7 @@ done:
return ret;
 }
 
-static int __exit as3645a_remove(struct i2c_client *client)
+static int __devexit as3645a_remove(struct i2c_client *client)
 {
struct v4l2_subdev *subdev = i2c_get_clientdata(client);
struct as3645a *flash = to_as3645a(subdev);
@@ -877,7 +877,7 @@ static struct i2c_driver as3645a_i2c_driver = {
.pm   = as3645a_pm_ops,
},
.probe  = as3645a_probe,
-   .remove = __exit_p(as3645a_remove),
+   .remove = __devexit_p(as3645a_remove),
.id_table = as3645a_id_table,
 };
 
-- 
1.7.9.1

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


Re: [RFC/PATCH] v4l: added V4L2_BUF_FLAG_EOS flag indicating the last frame in the stream

2012-04-19 Thread Mauro Carvalho Chehab
Em 13-04-2012 13:31, Kamil Debski escreveu:
 Hi,
 
 From: linux-media-ow...@vger.kernel.org [mailto:linux-media-
 Sent: 10 April 2012 11:51

 v4l: added V4L2_BUF_FLAG_EOS flag indicating the last frame in the stream

 Some devices requires indicator if the buffer is the last one in the
 stream.
 Applications and drivers can use this flag in such case.

 Signed-off-by: Andrzej Hajda a.ha...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---

 Hello,

 This patch adds new v4l2_buffer flag V4L2_BUF_FLAG_EOS. This flag is set
 by applications on the output buffer to indicate the last buffer of the
 stream.

 Some devices (eg. s5p_mfc) requires presence of the end-of-stream
 indicator
 together with the last buffer.
 Common practice of sending empty buffer to indicate end-of-strem do not
 work in
 such case.

 I would like to ask for review and comments.

 Apologies for duplicated e-mails - sendmail problems.

 Regards
 Andrzej Hajda

 
 [snip]
 
 Maybe I could throw some more light at the problem.
 
 The problem is that when the encoding is done it is necessary to mark the
 last frame of the video that is encoded. It is needed because the hardware
 may need to return some encoded buffers that are kept in the hardware.

Are you talking only about V4L2_BUF_TYPE_VIDEO_OUTPUT? 

 Why the buffers are kept in hardware one might ask? The answer to this
 question is following. The video frames are enqueued in MFC in presentation
 order and the encoded frames are dequeued in decoding order.
 
 Let's see an example:
  1234567
 The presentation order is:   IBBPBBP--
 The decoding order here is:  --IPBBPBB
 (the P frames have to be decoded before B frames as B frames reference
 both preceding and following frame; when no B frames are used then
 there is no delay)
 
 So there is a delay of two buffers returned on the CAPTURE side to the
 OUTPUT queue. After the last frame is encoded these buffers have to be
 returned to the user. Our hardware needs to know that it is the last frame
 before it is encoded, so the idea is to add a flag that would mark the
 buffer as the last one.
 
 The flag could also be used to mark the last frame during decoding - now
 it is done by setting bytesused to 0. The EOS flag could be used in addition
 to that.
 
 Comments are welcome.

For V4L2_BUF_TYPE_VIDEO_CAPTURE, a change like the one proposed has issues
to be considered: this kind of issue may happen on any driver delivering MPEG
format. 

So, if we're willing to introduce flags for MPEG-specific handling like that, 
then all drivers delivering mpeg outputs should be patched, and not only the
drivers you're maintaining, otherwise userspace applications can't trust that 
this feature is there.

Btw, the encoder API, designed to mpeg encoders addresses it on a different way:
V4L2_ENC_CMD_STOP stops an mpeg stream, but it waits until the end of a group
of pictures:
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-encoder-cmd.html

At least for video capture, this seems to work fine.

For video output, it could make sense to have a flag mark the end of a GoP,
but, again, if we're thinking that the source could be a V4L2 capture, the
GoP end should be marked there, and the patches adding support for it will
need to touch the existing drivers that have mpeg encoders/decoders, in order
to be sure that, after a certain V4L2 API, all of them will support such
feature.

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


Re: [PATCH v4 02/14] Documentation: media: description of DMABUF importing in V4L2

2012-04-19 Thread Tomasz Stanislawski
On 04/17/2012 01:25 AM, Laurent Pinchart wrote:
 Hi Tomasz,
 
 Thanks for the patch.
 
 On Friday 13 April 2012 17:47:44 Tomasz Stanislawski wrote:
 This patch adds description and usage examples for importing
 DMABUF file descriptor in V4L2.

 Signed-off-by: Tomasz Stanislawski t.stanisl...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 
 [snip]
 
 diff --git a/Documentation/DocBook/media/v4l/io.xml
 b/Documentation/DocBook/media/v4l/io.xml index b815929..dc5979d 100644
 --- a/Documentation/DocBook/media/v4l/io.xml
 +++ b/Documentation/DocBook/media/v4l/io.xml
 @@ -472,6 +472,162 @@ rest should be evident./para
/footnote/para
/section

 +  section id=dmabuf
 +titleStreaming I/O (DMA buffer importing)/title
 
 This section is very similar to the Streaming I/O (User Pointers) section. Do 
 you think we should merge the two ? I could handle that if you want.
 

Hi Laurent,

One may find similar sentences in MMAP, USERPTR and DMABUF.
Maybe the common parts like description of STREAMON/OFF,
QBUF/DQBUF shuffling should be moved to separate section
like Streaming :).

Maybe it is worth to introduce a separate patch for this change.

Frankly, I would prefer to keep the Doc in the current form till
importer support gets merged. Later the Doc could be fixed.

BTW. What is the sense of merging userptr and dmabuf section
if userptr is going to dropped in long-term?

Regards,
Tomasz Stanislawski
--
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: ATSC-MH driver support for the Hauppauge WinTV Aero-m

2012-04-19 Thread Michael Krufky
On Thu, Apr 19, 2012 at 9:36 AM, Mauro Carvalho Chehab
mche...@redhat.com wrote:
 Em 10-04-2012 00:49, Michael Krufky escreveu:
 These patches have been around and tested for quite some time.  Every
 few weeks I have to regenerate them in order to stay in sync with the
 media tree.  I think it's time for some review and possibly merge into
 the master development repository.  This complies with what was
 discussed in at the media developer kernel summit in Prague, Oct 2011.
  Once merged, I'll have time to work on some userspace utilities.  For
 now, I have created a very basic ATSC-MH scanning application that
 demonstrates the API additions.  The app can be found here:
 http://linuxtv.org/hg/~mkrufky/mhscan

 Please review:

 The following changes since commit 296da3cd14db9eb5606924962b2956c9c656dbb0:

   [media] pwc: poll(): Check that the device has not beem claimed for
 streaming already (2012-03-27 11:42:04 -0300)

 are available in the git repository at:
   git://git.linuxtv.org/mkrufky/mxl111sf mh_for_v3.5

 Michael Krufky (8):
       linux-dvb v5 API support for ATSC-MH

 This patch is incomplete:
        - It doesn't increment the version number;
        - Docbook is untouched.

 Also, I didn't see any post of those patches at the ML. Please post the
 patches at the ML for review before sending a pull request, especially
 when API changes are there.

Mauro,

Thanks for the feedback.  I'll make the Docbook changes, then I'll
patchbomb the mailing list (it's just a handful of patches for the API
change) and follow it up with another pull request.

Cheers,

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


Re: [PATCH 1/1] [media] ite-cir: postpone ISR registration

2012-04-19 Thread Luis Henriques
On Wed, Apr 18, 2012 at 09:54:07PM +0100, Luis Henriques wrote:
 An early registration of an ISR was causing a crash to several users (for
 example here: http://bugs.launchpad.net/bugs/972723  The reason was that
 IRQs were being triggered before the driver initialisation was completed.
 
 This patch fixes this by moving the invocation to request_irq() to a later
 stage on the driver probe function.
 
 Signed-off-by: Luis Henriques luis.henriq...@canonical.com
 ---
  drivers/media/rc/ite-cir.c |8 
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
 index 682009d..98d8ccf 100644
 --- a/drivers/media/rc/ite-cir.c
 +++ b/drivers/media/rc/ite-cir.c
 @@ -1521,10 +1521,6 @@ static int ite_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id
   dev_desc-io_region_size, ITE_DRIVER_NAME))
   goto failure;
  
 - if (request_irq(itdev-cir_irq, ite_cir_isr, IRQF_SHARED,
 - ITE_DRIVER_NAME, (void *)itdev))
 - goto failure;
 -
   /* set driver data into the pnp device */
   pnp_set_drvdata(pdev, itdev);
   itdev-pdev = pdev;
 @@ -1600,6 +1596,10 @@ static int ite_probe(struct pnp_dev *pdev, const 
 struct pnp_device_id
   rdev-driver_name = ITE_DRIVER_NAME;
   rdev-map_name = RC_MAP_RC6_MCE;
  
 + if (request_irq(itdev-cir_irq, ite_cir_isr, IRQF_SHARED,
 + ITE_DRIVER_NAME, (void *)itdev))
 + goto failure;
 +
   ret = rc_register_device(rdev);
   if (ret)
   goto failure;
 -- 
 1.7.9.5

I completely forgot to add:

Cc: sta...@vger.kernel.org

to my email.

Cheers,
--
Luis
--
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.5] Various fixes

2012-04-19 Thread Hans Verkuil
While I was cleaning up some older drivers I came across a few bugs that are
fixed here. The fixes are all trivial one-liners.

Regards,

Hans

The following changes since commit f4d4e7656b26a6013bc5072c946920d2e2c44e8e:

  [media] em28xx: Make em28xx-input.c a separate module (2012-04-10 20:45:41 
-0300)

are available in the git repository at:

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

for you to fetch changes up to f85e735051e71410bfd695536a25c1013bceeabc:

  vivi: fix duplicate line. (2012-04-19 17:38:52 +0200)


Hans Verkuil (4):
  V4L: fix incorrect refcounting.
  V4L2: drivers implementing vidioc_default should also return -ENOTTY
  v4l2-ctrls.c: zero min/max/step/def values for 64 bit integers.
  vivi: fix duplicate line.

 Documentation/video4linux/v4l2-framework.txt |   14 +-
 drivers/media/radio/dsbr100.c|1 -
 drivers/media/radio/radio-keene.c|1 -
 drivers/media/video/cx18/cx18-ioctl.c|2 +-
 drivers/media/video/davinci/vpfe_capture.c   |2 +-
 drivers/media/video/ivtv/ivtv-ioctl.c|2 +-
 drivers/media/video/meye.c   |2 +-
 drivers/media/video/mxb.c|2 +-
 drivers/media/video/v4l2-ctrls.c |1 +
 drivers/media/video/vivi.c   |2 +-
 10 files changed, 16 insertions(+), 13 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


cron job: media_tree daily build: ERRORS

2012-04-19 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:Thu Apr 19 19:00:17 CEST 2012
git hash:e245afe984b120704f15bc8d391fdb6cf96cfe0c
gcc version:  i686-linux-gcc (GCC) 4.6.3
host hardware:x86_64
host os:  3.1-2.slh.1-amd64

linux-git-arm-eabi-exynos: ERRORS
linux-git-arm-eabi-omap: ERRORS
linux-git-armv5-ixp: WARNINGS
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: WARNINGS
linux-git-powerpc64: OK
linux-git-x86_64: WARNINGS
linux-2.6.31.12-i686: ERRORS
linux-2.6.32.6-i686: ERRORS
linux-2.6.33-i686: ERRORS
linux-2.6.34-i686: ERRORS
linux-2.6.35.3-i686: ERRORS
linux-2.6.36-i686: ERRORS
linux-2.6.37-i686: ERRORS
linux-2.6.38.2-i686: ERRORS
linux-2.6.39.1-i686: ERRORS
linux-3.0-i686: ERRORS
linux-3.1-i686: ERRORS
linux-3.2.1-i686: ERRORS
linux-3.3-i686: WARNINGS
linux-2.6.31.12-x86_64: ERRORS
linux-2.6.32.6-x86_64: ERRORS
linux-2.6.33-x86_64: ERRORS
linux-2.6.34-x86_64: ERRORS
linux-2.6.35.3-x86_64: ERRORS
linux-2.6.36-x86_64: ERRORS
linux-2.6.37-x86_64: ERRORS
linux-2.6.38.2-x86_64: ERRORS
linux-2.6.39.1-x86_64: ERRORS
linux-3.0-x86_64: ERRORS
linux-3.1-x86_64: ERRORS
linux-3.2.1-x86_64: ERRORS
linux-3.3-x86_64: WARNINGS
apps: WARNINGS
spec-git: WARNINGS
sparse: ERRORS

Detailed results are available here:

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

Full logs are available here:

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

The V4L-DVB specification 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


re: [media] fintek-cir: add support for newer chip version

2012-04-19 Thread Dan Carpenter
Hi Mauro,

The patch 83ec8225b6ae: [media] fintek-cir: add support for newer 
chip version from Feb 14, 2012, leads to the following warning:
drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
 warn: known condition '1032 != 2052'

drivers/media/rc/fintek-cir.c
   197  /*
   198   * Newer reviews of this chipset uses port 8 instead of 5
   199   */
   200  if ((chip != 0x0408) || (chip != 0x0804))
 ^^
One of these conditions is always true.

Probably it should it be:
if ((chip == 0x0408) || (chip == 0x0804))
or:
if ((chip != 0x0408)  (chip != 0x0804))
depending one if those are the newer or the older chipsets.  I googled
for it a bit and then decided to just email you.  :P

   201  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV2;
   202  else
   203  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV1;
   204  

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: [RFC] b2c2_flexcop_pci: Add suspend/resume support

2012-04-19 Thread Mauro Carvalho Chehab
Hi Stefan,

Em 15-04-2012 11:18, Stefan Bauer escreveu:
 Dear linux-dvb developers, dear Matthias,
 
 
 proper suspend and resume support for the b2c2_flexcop_pci driver is still 
 missing as pointed out by these two bug reports:
 
 https://bugs.gentoo.org/show_bug.cgi?id=288267
 https://bugzilla.kernel.org/show_bug.cgi?id=14394
 
 The first report contains a proposed patch to add suspend/resume support 
 written by Matthias Schwarzott z...@gentoo.org. I and some others (see 
 first bug report) confirm that it's actually working.
 
 Behaviour without the patch: b2c2_flexcop_pci must be unloaded before 
 suspending (means TV applications must be closed), and reloaded after 
 resuming.
 Behaviour with the patch: No module unloading/reloading necessary any more.
 Known issues: TV application still needs to be closed before suspend. 
 Otherwise the device is not functional (kaffeine shows only black screen) 
 after resume. Reloading the module revives the device in that case.
 
 I'd kindly ask you to review the attached patch by Matthias and consider its 
 upstream inclusion after the issues are sorted out. I'm more than willing to 
 assist and test as I can.

I don't have any b2c2 device, so I can't actually test it. on a quick lock,
it seems sane on my eyes. In order for us to merge, we need the patch author's
Signed-off-by.

Regards,
Mauro

 
 
 Kind regards,
 Stefan Bauer
 ---8---
 diff --git a/drivers/media/dvb/b2c2/flexcop-common.h 
 b/drivers/media/dvb/b2c2/flexcop-common.h
 index 437912e..c5f11a6 100644
 --- a/drivers/media/dvb/b2c2/flexcop-common.h
 +++ b/drivers/media/dvb/b2c2/flexcop-common.h
 @@ -117,6 +117,9 @@ int flexcop_device_initialize(struct flexcop_device *);
  void flexcop_device_exit(struct flexcop_device *fc);
  void flexcop_reset_block_300(struct flexcop_device *fc);
  
 +void flexcop_device_suspend(struct flexcop_device *fc);
 +void flexcop_device_resume(struct flexcop_device *fc);
 +
  /* from flexcop-dma.c */
  int flexcop_dma_allocate(struct pci_dev *pdev,
   struct flexcop_dma *dma, u32 size);
 diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c 
 b/drivers/media/dvb/b2c2/flexcop-pci.c
 index 44f8fb5..1ef4b82 100644
 --- a/drivers/media/dvb/b2c2/flexcop-pci.c
 +++ b/drivers/media/dvb/b2c2/flexcop-pci.c
 @@ -293,8 +293,6 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
  
   info(card revision %x, fc_pci-pdev-revision);
  
 - if ((ret = pci_enable_device(fc_pci-pdev)) != 0)
 - return ret;
   pci_set_master(fc_pci-pdev);
  
   if ((ret = pci_request_regions(fc_pci-pdev, DRIVER_NAME)) != 0)
 @@ -308,7 +306,6 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
   goto err_pci_release_regions;
   }
  
 - pci_set_drvdata(fc_pci-pdev, fc_pci);
   spin_lock_init(fc_pci-irq_lock);
   if ((ret = request_irq(fc_pci-pdev-irq, flexcop_pci_isr,
   IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0)
 @@ -319,7 +316,6 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
  
  err_pci_iounmap:
   pci_iounmap(fc_pci-pdev, fc_pci-io_mem);
 - pci_set_drvdata(fc_pci-pdev, NULL);
  err_pci_release_regions:
   pci_release_regions(fc_pci-pdev);
  err_pci_disable_device:
 @@ -332,9 +328,7 @@ static void flexcop_pci_exit(struct flexcop_pci *fc_pci)
   if (fc_pci-init_state  FC_PCI_INIT) {
   free_irq(fc_pci-pdev-irq, fc_pci);
   pci_iounmap(fc_pci-pdev, fc_pci-io_mem);
 - pci_set_drvdata(fc_pci-pdev, NULL);
   pci_release_regions(fc_pci-pdev);
 - pci_disable_device(fc_pci-pdev);
   }
   fc_pci-init_state = ~FC_PCI_INIT;
  }
 @@ -373,6 +367,11 @@ static int flexcop_pci_probe(struct pci_dev *pdev,
  
   /* bus specific part */
   fc_pci-pdev = pdev;
 + ret = pci_enable_device(pdev);
 + if (ret != 0)
 + goto err_kfree;
 +
 + pci_set_drvdata(pdev, fc_pci);
   if ((ret = flexcop_pci_init(fc_pci)) != 0)
   goto err_kfree;
  
 @@ -398,6 +397,7 @@ err_fc_exit:
  err_pci_exit:
   flexcop_pci_exit(fc_pci);
  err_kfree:
 + pci_set_drvdata(pdev, NULL);
   flexcop_device_kfree(fc);
   return ret;
  }
 @@ -415,9 +415,74 @@ static void flexcop_pci_remove(struct pci_dev *pdev)
   flexcop_pci_dma_exit(fc_pci);
   flexcop_device_exit(fc_pci-fc_dev);
   flexcop_pci_exit(fc_pci);
 + pci_set_drvdata(pdev, NULL);
 + pci_disable_device(pdev);
   flexcop_device_kfree(fc_pci-fc_dev);
  }
  
 +#ifdef CONFIG_PM
 +static int flexcop_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
 +{
 + struct flexcop_pci *fc_pci = pci_get_drvdata(pdev);
 + struct flexcop_device *fc = fc_pci-fc_dev;
 +
 + /* most parts are from flexcop_pci_remove */
 +
 + if (irq_chk_intv  0)
 + cancel_delayed_work(fc_pci-irq_check_work);
 +
 + flexcop_pci_dma_exit(fc_pci);
 + flexcop_device_suspend(fc);
 + flexcop_pci_exit(fc_pci);
 +
 + 

Re: [PATCH 1/6] m88ds3103, montage dvb-s/s2 demodulator driver

2012-04-19 Thread Mauro Carvalho Chehab

Hi Max,

Em 15-04-2012 12:53, nibble.max escreveu:
 Montage m88ds3103 demodulator and ts2022 tuner driver.
 
 Signed-off-by: Max nibble nibble@gmail.com

Please always test any patch you send upstream with ./scripts/checkpatch.pl.

It analyses the code and checks if it is following the Linux Coding Style
(Documentation/CodingStyle).

From what I've seen, there are several small CodingStyle issues on this patch.

There's also another problem here: this driver is mixing an I2C tuner driver
with the demod one. Please split. If the tuner is simple enough, you an add
it to:
drivers/media/common/tuners/tuner-simple.c
or at:
drivers/media/dvb/frontends/dvb-pll.c

But please don't mix tuners with demods. Mixing it causes code duplication and
more time lost when debugging it (as two different version of the same driver
can have different bugs).

I'll analyze it deeper after you fix those two issues.

Thanks,
Mauro


 ---
  drivers/media/dvb/frontends/Kconfig |7 +
  drivers/media/dvb/frontends/Makefile|2 +
  drivers/media/dvb/frontends/m88ds3103.c | 1851 
 +++
  drivers/media/dvb/frontends/m88ds3103.h |   53 +
  4 files changed, 1913 insertions(+)
  create mode 100644 drivers/media/dvb/frontends/m88ds3103.c
  create mode 100644 drivers/media/dvb/frontends/m88ds3103.h
 
 diff --git a/drivers/media/dvb/frontends/Kconfig 
 b/drivers/media/dvb/frontends/Kconfig
 index e11adb6..d2bb312 100644
 --- a/drivers/media/dvb/frontends/Kconfig
 +++ b/drivers/media/dvb/frontends/Kconfig
 @@ -214,6 +214,13 @@ config DVB_CX24116
   help
 A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
  
 +config DVB_M88DS3103
 + tristate Montage DS3103 based
 + depends on DVB_CORE  I2C
 + default m if DVB_FE_CUSTOMISE
 + help
 +   A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
 +   
  config DVB_SI21XX
   tristate Silicon Labs SI21XX based
   depends on DVB_CORE  I2C
 diff --git a/drivers/media/dvb/frontends/Makefile 
 b/drivers/media/dvb/frontends/Makefile
 index 6ca7557..84ddf41 100644
 --- a/drivers/media/dvb/frontends/Makefile
 +++ b/drivers/media/dvb/frontends/Makefile
 @@ -98,5 +98,7 @@ obj-$(CONFIG_DVB_A8293) += a8293.o
  obj-$(CONFIG_DVB_TDA10071) += tda10071.o
  obj-$(CONFIG_DVB_RTL2830) += rtl2830.o
  obj-$(CONFIG_DVB_M88RS2000) += m88rs2000.o
 +obj-$(CONFIG_DVB_M88DS3103) += m88ds3103.o
  obj-$(CONFIG_DVB_AF9033) += af9033.o
  
 +
 diff --git a/drivers/media/dvb/frontends/m88ds3103.c 
 b/drivers/media/dvb/frontends/m88ds3103.c
 new file mode 100644
 index 000..a186ba0
 --- /dev/null
 +++ b/drivers/media/dvb/frontends/m88ds3103.c
 @@ -0,0 +1,1851 @@
 +/*
 +Montage Technology M88DS3103/M88TS2022 - DVBS/S2 Satellite demod/tuner 
 driver
 +
 +Copyright (C) 2011 Max nibblenibble@gmail.com
 +Copyright (C) 2010 Montage Technologywww.montage-tech.com
 +Copyright (C) 2009 Konstantin Dimitrov.
 +
 +This program is free software; you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
 +the Free Software Foundation; either version 2 of the License, or
 +(at your option) any later version.
 +
 +This program is distributed in the hope that it will be useful,
 +but WITHOUT ANY WARRANTY; without even the implied warranty of
 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +GNU General Public License for more details.
 +
 +You should have received a copy of the GNU General Public License
 +along with this program; if not, write to the Free Software
 +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
 +#include linux/slab.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/moduleparam.h
 +#include linux/init.h
 +#include linux/firmware.h
 +
 +#include dvb_frontend.h
 +#include m88ds3103.h
 +
 +static int debug;
 +module_param(debug, int, 0644);
 +MODULE_PARM_DESC(debug, Activates frontend debugging (default:0));
 +
 +#define dprintk(args...) \
 + do { \
 + if (debug) \
 + printk(KERN_INFO m88ds3103:  args); \
 + } while (0)
 +
 +#define FW_DOWN_SIZE 32
 +#define FW_DOWN_LOOP (8192/FW_DOWN_SIZE)
 +#define DS3103_DEFAULT_FIRMWARE dvb-fe-ds3103.fw
 +#define DS3000_DEFAULT_FIRMWARE dvb-fe-ds300x.fw
 +#define MT_FE_MCLK_KHZ 96000 /* in kHz */
 +#define MT_FE_CRYSTAL_KHZ   27000 /* in kHz */
 +#define FREQ_OFFSET_AT_SMALL_SYM_RATE_KHz 3000
 +#define DS3000_ID0x3000
 +#define DS3103_ID0x3103
 +#define TS2020_ID0x2020
 +#define TS2022_ID0x2022
 +#define UNKNOW_ID0x
 +
 +/* For M88DS3103 demod dvbs mode.*/
 +static u8 ds3103_dvbs_init_tab[] = {
 + 0x23, 0x07,
 + 0x08, 0x03,
 + 0x0c, 0x02,
 + 0x21, 0x54,
 + 0x25, 0x82,
 + 0x27, 0x31,
 + 0x30, 0x08,
 + 0x31, 0x40,
 + 0x32, 0x32,
 + 0x33, 0x35,
 + 0x35, 0xff,
 + 0x3a, 0x00,
 + 

Re: [PATCH 2/6] m88ds3103, dvbsky dvb-s2 usb box.

2012-04-19 Thread Mauro Carvalho Chehab
Em 15-04-2012 12:53, nibble.max escreveu:
 dvbsky dvb-s2 usb box based on montage m88ds3103 demodulator.
 
 Signed-off-by: Max nibble nibble@gmail.com
 ---
  drivers/media/dvb/dvb-usb/Kconfig  |1 +
  drivers/media/dvb/dvb-usb/dw2102.c |  236 
 +++-
  2 files changed, 236 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/media/dvb/dvb-usb/Kconfig 
 b/drivers/media/dvb/dvb-usb/Kconfig
 index be1db75..bf63f29 100644
 --- a/drivers/media/dvb/dvb-usb/Kconfig
 +++ b/drivers/media/dvb/dvb-usb/Kconfig
 @@ -279,6 +279,7 @@ config DVB_USB_DW2102
   select DVB_STV0288 if !DVB_FE_CUSTOMISE
   select DVB_STB6000 if !DVB_FE_CUSTOMISE
   select DVB_CX24116 if !DVB_FE_CUSTOMISE
 + select DVB_M88DS3103 if !DVB_FE_CUSTOMISE
   select DVB_SI21XX if !DVB_FE_CUSTOMISE
   select DVB_TDA10023 if !DVB_FE_CUSTOMISE
   select DVB_MT312 if !DVB_FE_CUSTOMISE
 diff --git a/drivers/media/dvb/dvb-usb/dw2102.c 
 b/drivers/media/dvb/dvb-usb/dw2102.c
 index 451c5a7..0b1bbd2 100644
 --- a/drivers/media/dvb/dvb-usb/dw2102.c
 +++ b/drivers/media/dvb/dvb-usb/dw2102.c
 @@ -19,6 +19,7 @@
  #include stb6000.h
  #include eds1547.h
  #include cx24116.h
 +#include m88ds3103.h
  #include tda1002x.h
  #include mt312.h
  #include zl10039.h
 @@ -882,6 +883,44 @@ static int s660_set_voltage(struct dvb_frontend *fe, 
 fe_sec_voltage_t voltage)
   return 0;
  }
  
 +static int bstusb_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t 
 voltage)
 +{
 +
 + struct dvb_usb_adapter *udev_adap =
 + (struct dvb_usb_adapter *)(fe-dvb-priv);
 +
 + u8 obuf[3] = { 0xe, 0x80, 0 };
 + u8 ibuf[] = { 0 };
 + 
 + info(US6830: %s!\n, __func__);
 + 
 + if (voltage == SEC_VOLTAGE_OFF)
 + obuf[2] = 0;
 + else 
 + obuf[2] = 1;
 + 
 + if (dvb_usb_generic_rw(udev_adap-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x0e transfer failed.);
 + 
 + return 0;
 +}
 +
 +static int bstusb_restart(struct dvb_frontend *fe)
 +{
 +
 + struct dvb_usb_adapter *udev_adap =
 + (struct dvb_usb_adapter *)(fe-dvb-priv);
 + 
 + u8 obuf[3] = { 0x36, 3, 0 };
 + u8 ibuf[] = { 0 };
 + 
 +
 + if (dvb_usb_generic_rw(udev_adap-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x36 transfer failed.);
 + 
 + return 0;
 +}
 +
  static void dw210x_led_ctrl(struct dvb_frontend *fe, int offon)
  {
   static u8 led_off[] = { 0 };
 @@ -987,6 +1026,24 @@ static struct ds3000_config su3000_ds3000_config = {
   .ci_mode = 1,
  };
  
 +static struct m88ds3103_config US6830_ds3103_config = {
 + .demod_address = 0x68,
 + .ci_mode = 1,
 + .pin_ctrl = 0x83,
 + .ts_mode = 0,
 + .start_ctrl = bstusb_restart,
 + .set_voltage = bstusb_set_voltage,
 +};
 +
 +static struct m88ds3103_config US6832_ds3103_config = {
 + .demod_address = 0x68,
 + .ci_mode = 1,
 + .pin_ctrl = 0x80,
 + .ts_mode = 0,
 + .start_ctrl = bstusb_restart,
 + .set_voltage = bstusb_set_voltage,
 +};
 +
  static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
  {
   struct dvb_tuner_ops *tuner_ops = NULL;
 @@ -1214,6 +1271,72 @@ static int su3000_frontend_attach(struct 
 dvb_usb_adapter *d)
   return 0;
  }
  
 +static int US6830_frontend_attach(struct dvb_usb_adapter *d)
 +{
 + u8 obuf[3] = { 0xe, 0x83, 0 };
 + u8 ibuf[] = { 0 };
 +
 +
 + info(US6830: %s!\n, __func__);
 + 
 + if (dvb_usb_generic_rw(d-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x0e transfer failed.);
 +
 + obuf[0] = 0xe;
 + obuf[1] = 0x83;
 + obuf[2] = 1;
 +
 + if (dvb_usb_generic_rw(d-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x0e transfer failed.);
 +
 + obuf[0] = 0x51;
 +
 + if (dvb_usb_generic_rw(d-dev, obuf, 1, ibuf, 1, 0)  0)
 + err(command 0x51 transfer failed.);
 +
 + d-fe_adap[0].fe = dvb_attach(m88ds3103_attach, US6830_ds3103_config,
 + d-dev-i2c_adap);
 + if (d-fe_adap[0].fe == NULL)
 + return -EIO;
 +
 + info(Attached M88DS3103!\n);
 +
 + return 0;
 +}
 +
 +static int US6832_frontend_attach(struct dvb_usb_adapter *d)
 +{
 + u8 obuf[3] = { 0xe, 0x83, 0 };
 + u8 ibuf[] = { 0 };
 +
 +
 + info(US6832: %s!\n, __func__);
 + 
 + if (dvb_usb_generic_rw(d-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x0e transfer failed.);
 +
 + obuf[0] = 0xe;
 + obuf[1] = 0x83;
 + obuf[2] = 1;
 +
 + if (dvb_usb_generic_rw(d-dev, obuf, 3, ibuf, 1, 0)  0)
 + err(command 0x0e transfer failed.);
 +
 + obuf[0] = 0x51;
 +
 + if (dvb_usb_generic_rw(d-dev, obuf, 1, ibuf, 1, 0)  0)
 + err(command 0x51 transfer failed.);
 +
 + d-fe_adap[0].fe = dvb_attach(m88ds3103_attach, US6832_ds3103_config,
 + 

Re: [PATCH 4/6] m88ds3103, dvbsky dvb-s2 cx23885 pcie card.

2012-04-19 Thread Mauro Carvalho Chehab
Em 15-04-2012 12:53, nibble.max escreveu:
 dvbsky dvb-s2 pcie based on montage m88ds3103 demodulator.
 
 Signed-off-by: Max nibble nibble@gmail.com
 ---
  drivers/media/video/cx23885/Kconfig |1 +
  drivers/media/video/cx23885/cx23885-cards.c |  107 
 +++
  drivers/media/video/cx23885/cx23885-dvb.c   |   52 +
  drivers/media/video/cx23885/cx23885-f300.c  |   55 ++
  drivers/media/video/cx23885/cx23885-f300.h  |6 ++
  drivers/media/video/cx23885/cx23885-input.c |   15 
  drivers/media/video/cx23885/cx23885.h   |3 +
  7 files changed, 239 insertions(+)
 
 diff --git a/drivers/media/video/cx23885/Kconfig 
 b/drivers/media/video/cx23885/Kconfig
 index b391e9b..20337c7 100644
 --- a/drivers/media/video/cx23885/Kconfig
 +++ b/drivers/media/video/cx23885/Kconfig
 @@ -20,6 +20,7 @@ config VIDEO_CX23885
   select DVB_LNBP21 if !DVB_FE_CUSTOMISE
   select DVB_STV6110 if !DVB_FE_CUSTOMISE
   select DVB_CX24116 if !DVB_FE_CUSTOMISE
 + select DVB_M88DS3103 if !DVB_FE_CUSTOMISE
   select DVB_STV0900 if !DVB_FE_CUSTOMISE
   select DVB_DS3000 if !DVB_FE_CUSTOMISE
   select DVB_STV0367 if !DVB_FE_CUSTOMISE
 diff --git a/drivers/media/video/cx23885/cx23885-cards.c 
 b/drivers/media/video/cx23885/cx23885-cards.c
 index 19b5499..fdf9d0f 100644
 --- a/drivers/media/video/cx23885/cx23885-cards.c
 +++ b/drivers/media/video/cx23885/cx23885-cards.c
 @@ -497,6 +497,20 @@ struct cx23885_board cx23885_boards[] = {
   .name   = TerraTec Cinergy T PCIe Dual,
   .portb  = CX23885_MPEG_DVB,
   .portc  = CX23885_MPEG_DVB,
 + },
 +
 + [CX23885_BOARD_BST_PS8512] = {
 + .name   = Bestunar PS8512,
 + .portb  = CX23885_MPEG_DVB,
 + },
 + [CX23885_BOARD_DVBSKY_S950] = {
 + .name   = DVBSKY S950,
 + .portb  = CX23885_MPEG_DVB,
 + },
 + [CX23885_BOARD_DVBSKY_S952] = {
 + .name   = DVBSKY S952,
 + .portb  = CX23885_MPEG_DVB,
 + .portc  = CX23885_MPEG_DVB,
   }
  };
  const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
 @@ -705,6 +719,18 @@ struct cx23885_subid cx23885_subids[] = {
   .subvendor = 0x153b,
   .subdevice = 0x117e,
   .card  = CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL,
 + }, {
 + .subvendor = 0x14f1,
 + .subdevice = 0x8512,
 + .card  = CX23885_BOARD_BST_PS8512,
 + }, {
 + .subvendor = 0x4254,
 + .subdevice = 0x0950,
 + .card  = CX23885_BOARD_DVBSKY_S950, 
 + }, {
 + .subvendor = 0x4254,
 + .subdevice = 0x0952,
 + .card  = CX23885_BOARD_DVBSKY_S952,
   },
  };
  const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
 @@ -1216,9 +1242,57 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
   /* enable irq */
   cx_write(GPIO_ISM, 0x);/* INTERRUPTS active low*/
   break;
 + case CX23885_BOARD_DVBSKY_S950:
 + case CX23885_BOARD_BST_PS8512:  
 + cx23885_gpio_enable(dev, GPIO_2, 1);
 + cx23885_gpio_clear(dev, GPIO_2);
 + msleep(100);
 + cx23885_gpio_set(dev, GPIO_2);
 + break;
 + case CX23885_BOARD_DVBSKY_S952: 
 + cx_write(MC417_CTL, 0x0037);/* enable GPIO3-18 pins */
 + 
 + cx23885_gpio_enable(dev, GPIO_2, 1);
 + cx23885_gpio_enable(dev, GPIO_11, 1);
 + 
 + cx23885_gpio_clear(dev, GPIO_2);
 + cx23885_gpio_clear(dev, GPIO_11);
 + msleep(100);
 + cx23885_gpio_set(dev, GPIO_2);
 + cx23885_gpio_set(dev, GPIO_11);
 + 
 + break;
   }
  }
  
 +static int cx23885_ir_patch(struct i2c_adapter *i2c, u8 reg, u8 mask)
 +{
 + struct i2c_msg msgs[2];
 + u8 tx_buf[2], rx_buf[1];
 + /* Write register address */
 + tx_buf[0] = reg;
 + msgs[0].addr = 0x4c;
 + msgs[0].flags = 0;
 + msgs[0].len = 1;
 + msgs[0].buf = (char *) tx_buf;
 + /* Read data from register */
 + msgs[1].addr = 0x4c;
 + msgs[1].flags = I2C_M_RD;
 + msgs[1].len = 1;
 + msgs[1].buf = (char *) rx_buf;  
 + 
 + i2c_transfer(i2c, msgs, 2);
 +
 + tx_buf[0] = reg;
 + tx_buf[1] = rx_buf[0] | mask;
 + msgs[0].addr = 0x4c;
 + msgs[0].flags = 0;
 + msgs[0].len = 2;
 + msgs[0].buf = (char *) tx_buf;
 + 
 + return i2c_transfer(i2c, msgs, 1);
 +}
 +
  int cx23885_ir_init(struct cx23885_dev *dev)
  {
   static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg[] = {
 @@ -1301,6 +1375,20 @@ int cx23885_ir_init(struct cx23885_dev *dev)
   

Re: [PATCH 5/6] m88ds3103, dvbsky remote control key map.

2012-04-19 Thread Mauro Carvalho Chehab
Em 15-04-2012 12:53, nibble.max escreveu:
 dvbsky remote control key map for pci/pcie card.
 
 Signed-off-by: Max nibble nibble@gmail.com
 ---
  drivers/media/rc/keymaps/Makefile|1 +
  drivers/media/rc/keymaps/rc-dvbsky.c |   78 
 ++
  2 files changed, 79 insertions(+)
  create mode 100644 drivers/media/rc/keymaps/rc-dvbsky.c
 
 diff --git a/drivers/media/rc/keymaps/Makefile 
 b/drivers/media/rc/keymaps/Makefile
 index 49ce266..e6a882b 100644
 --- a/drivers/media/rc/keymaps/Makefile
 +++ b/drivers/media/rc/keymaps/Makefile
 @@ -26,6 +26,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
   rc-dm1105-nec.o \
   rc-dntv-live-dvb-t.o \
   rc-dntv-live-dvbt-pro.o \
 + rc-dvbsky.o \
   rc-em-terratec.o \
   rc-encore-enltv2.o \
   rc-encore-enltv.o \
 diff --git a/drivers/media/rc/keymaps/rc-dvbsky.c 
 b/drivers/media/rc/keymaps/rc-dvbsky.c
 new file mode 100644
 index 000..2bd9977
 --- /dev/null
 +++ b/drivers/media/rc/keymaps/rc-dvbsky.c
 @@ -0,0 +1,78 @@
 +/* rc-dvbsky.c - Keytable for Dvbsky Remote Controllers
 + *
 + * keymap imported from ir-keymaps.c

No, you didn't import it from ir-keymaps.c ;) This is the old file where several
keymaps used to be stored.

 + *
 + *
 + * Copyright (c) 2010-2011 by Mauro Carvalho Chehab mche...@redhat.com

Huh? I didn't wrote this keymap.

 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + */
 +
 +#include media/rc-map.h
 +#include linux/module.h
 +/*
 + * This table contains the complete RC5 code, instead of just the data part
 + */
 +
 +static struct rc_map_table rc5_dvbsky[] = {
 + { 0x, KEY_0 },
 + { 0x0001, KEY_1 },
 + { 0x0002, KEY_2 },
 + { 0x0003, KEY_3 },
 + { 0x0004, KEY_4 },
 + { 0x0005, KEY_5 },
 + { 0x0006, KEY_6 },
 + { 0x0007, KEY_7 },
 + { 0x0008, KEY_8 },
 + { 0x0009, KEY_9 },  
 + { 0x000a, KEY_MUTE },
 + { 0x000d, KEY_OK },
 + { 0x000b, KEY_STOP },
 + { 0x000c, KEY_EXIT },   
 + { 0x000e, KEY_CAMERA }, /*Snap shot*/
 + { 0x000f, KEY_SUBTITLE }, /*PIP*/
 + { 0x0010, KEY_VOLUMEUP },
 + { 0x0011, KEY_VOLUMEDOWN },
 + { 0x0012, KEY_FAVORITES },
 + { 0x0013, KEY_LIST }, /*Info*/
 + { 0x0016, KEY_PAUSE },
 + { 0x0017, KEY_PLAY },
 + { 0x001f, KEY_RECORD },
 + { 0x0020, KEY_CHANNELDOWN },
 + { 0x0021, KEY_CHANNELUP },
 + { 0x0025, KEY_POWER2 },
 + { 0x0026, KEY_REWIND },
 + { 0x0027, KEY_FASTFORWARD },
 + { 0x0029, KEY_LAST },
 + { 0x002b, KEY_MENU },   
 + { 0x002c, KEY_EPG },
 + { 0x002d, KEY_ZOOM },   

Hmm... are you sure that your IR getkey function is right? 
There are a few RC-5 IR's that uses only 6 bits, but this is not
common. I suspect that your code is missing the higher bits.

It would be nice if you could test it with another RC5 IR, or
to test your RC-5 with some other IR receiver, in order to double
check it.

 +};
 +
 +static struct rc_map_list rc5_dvbsky_map = {
 + .map = {
 + .scan= rc5_dvbsky,
 + .size= ARRAY_SIZE(rc5_dvbsky),
 + .rc_type = RC_TYPE_RC5,
 + .name= RC_MAP_DVBSKY,
 + }
 +};
 +
 +static int __init init_rc_map_rc5_dvbsky(void)
 +{
 + return rc_map_register(rc5_dvbsky_map);
 +}
 +
 +static void __exit exit_rc_map_rc5_dvbsky(void)
 +{
 + rc_map_unregister(rc5_dvbsky_map);
 +}
 +
 +module_init(init_rc_map_rc5_dvbsky)
 +module_exit(exit_rc_map_rc5_dvbsky)
 +
 +MODULE_LICENSE(GPL);
 +MODULE_AUTHOR(Mauro Carvalho Chehab mche...@redhat.com);

Again, I didn't write it. You did ;)

Regards,
Mauro


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


Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header

2012-04-19 Thread Mauro Carvalho Chehab
Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu:
 The output of make versioncheck told us that:
 
 drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h
 
 If we take a look at the code, we can see that this file uses the macro
 KERNEL_VERSION. So, we need this include.

Nack. The right fix here is just the opposite: to remove the KERNEL_VERSION()
call. The V4L2 core now fills it automatically, so drivers shouldn't touch on
cap-version anymore. See the enclosed patch.

 
 Cc: Mauro Carvalho Chehab mche...@infradead.org
 Cc: Huang Shijie shij...@gmail.com
 Cc: Kang Yong kangy...@telegent.com
 Cc: Zhang Xiaobing xbzh...@telegent.com
 Cc: linux-media@vger.kernel.org
 Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
 ---
  drivers/media/video/tlg2300/pd-video.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/media/video/tlg2300/pd-video.c 
 b/drivers/media/video/tlg2300/pd-video.c
 index a794ae6..069db9a 100644
 --- a/drivers/media/video/tlg2300/pd-video.c
 +++ b/drivers/media/video/tlg2300/pd-video.c
 @@ -5,6 +5,7 @@
  #include linux/mm.h
  #include linux/sched.h
  #include linux/slab.h
 +#include linux/version.h
  
  #include media/v4l2-ioctl.h
  #include media/v4l2-dev.h

commit f8bf305b7103857708cd22b504a70ea4a08022fc
Author: Mauro Carvalho Chehab mche...@redhat.com
Date:   Thu Apr 19 16:35:27 2012 -0300

tlg2300: Remove usage of KERNEL_VERSION()

As reported by Marcos:

On 04-18-2012 01:30, Marcos Paulo de Souza wrote:
 The output of make versioncheck told us that:

 drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h

 If we take a look at the code, we can see that this file uses the macro
 KERNEL_VERSION.

The V4L2 core now fills it automatically, so drivers shouldn't touch on
cap-version anymore.

Reported by: Marcos Paulo de Souza marcos.souza@gmail.com
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

diff --git a/drivers/media/video/tlg2300/pd-video.c 
b/drivers/media/video/tlg2300/pd-video.c
index a794ae6..bfbf9e5 100644
--- a/drivers/media/video/tlg2300/pd-video.c
+++ b/drivers/media/video/tlg2300/pd-video.c
@@ -150,7 +150,6 @@ static int vidioc_querycap(struct file *file, void *fh,
strcpy(cap-driver, tele-video);
strcpy(cap-card, Telegent Poseidon);
usb_make_path(p-udev, cap-bus_info, sizeof(cap-bus_info));
-   cap-version = KERNEL_VERSION(0, 0, 1);
cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
--
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: [PATCHv24 00/16] Contiguous Memory Allocator

2012-04-19 Thread Andrew Morton
On Tue, 03 Apr 2012 16:10:05 +0200
Marek Szyprowski m.szyprow...@samsung.com wrote:

 This is (yet another) update of CMA patches.

Looks OK to me.  It's a lot of code.

Please move it into linux-next, and if all is well, ask Linus to pull
the tree into 3.5-rc1.  Please be sure to cc me on that email.

I suggest that you include additional patches which enable CMA as much
as possible on as many architectures as possible so that it gets
maximum coverage testing in linux-next.  Remove those Kconfig patches
when merging upstream.

All this code will probably mess up my tree, but I'll work that out. 
It would be more awkward if the CMA code were to later disappear from
linux-next or were not merged into 3.5-rc1.  Let's avoid that.
--
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 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header

2012-04-19 Thread Marcos Souza
Em 19 de abril de 2012 16:39, Mauro Carvalho Chehab
mche...@redhat.com escreveu:
 Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu:
 The output of make versioncheck told us that:

 drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h

 If we take a look at the code, we can see that this file uses the macro
 KERNEL_VERSION. So, we need this include.

 Nack. The right fix here is just the opposite: to remove the KERNEL_VERSION()
 call. The V4L2 core now fills it automatically, so drivers shouldn't touch on
 cap-version anymore. See the enclosed patch.


 Cc: Mauro Carvalho Chehab mche...@infradead.org
 Cc: Huang Shijie shij...@gmail.com
 Cc: Kang Yong kangy...@telegent.com
 Cc: Zhang Xiaobing xbzh...@telegent.com
 Cc: linux-media@vger.kernel.org
 Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
 ---
  drivers/media/video/tlg2300/pd-video.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

 diff --git a/drivers/media/video/tlg2300/pd-video.c 
 b/drivers/media/video/tlg2300/pd-video.c
 index a794ae6..069db9a 100644
 --- a/drivers/media/video/tlg2300/pd-video.c
 +++ b/drivers/media/video/tlg2300/pd-video.c
 @@ -5,6 +5,7 @@
  #include linux/mm.h
  #include linux/sched.h
  #include linux/slab.h
 +#include linux/version.h

  #include media/v4l2-ioctl.h
  #include media/v4l2-dev.h

 commit f8bf305b7103857708cd22b504a70ea4a08022fc
 Author: Mauro Carvalho Chehab mche...@redhat.com
 Date:   Thu Apr 19 16:35:27 2012 -0300

    tlg2300: Remove usage of KERNEL_VERSION()

    As reported by Marcos:

    On 04-18-2012 01:30, Marcos Paulo de Souza wrote:
     The output of make versioncheck told us that:
    
     drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h
    
     If we take a look at the code, we can see that this file uses the macro
     KERNEL_VERSION.

    The V4L2 core now fills it automatically, so drivers shouldn't touch on
    cap-version anymore.

    Reported by: Marcos Paulo de Souza marcos.souza@gmail.com
    Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

 diff --git a/drivers/media/video/tlg2300/pd-video.c 
 b/drivers/media/video/tlg2300/pd-video.c
 index a794ae6..bfbf9e5 100644
 --- a/drivers/media/video/tlg2300/pd-video.c
 +++ b/drivers/media/video/tlg2300/pd-video.c
 @@ -150,7 +150,6 @@ static int vidioc_querycap(struct file *file, void *fh,
        strcpy(cap-driver, tele-video);
        strcpy(cap-card, Telegent Poseidon);
        usb_make_path(p-udev, cap-bus_info, sizeof(cap-bus_info));
 -       cap-version = KERNEL_VERSION(0, 0, 1);
        cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
                                V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
                                V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;

Better yet :)

Thanks for the feedback Mauro!

-- 
Att,

Marcos Paulo de Souza
Acadêmico de Ciencia da Computação - FURB - SC
Uma vida sem desafios é uma vida sem razão
A life without challenges, is a non reason life
--
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 07/12] drivers: media: video: tm6000: tm6000.h: Include version.h header

2012-04-19 Thread Mauro Carvalho Chehab
Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu:
 The output of make versioncheck told us that:
 
 drivers/media/video/tm6000/tm6000.h: 401: need linux/version.h
 
 If we take a look at the code, we can see the use of the macro
 KERNEL_VERSION. So, we need this include.
 
 In this patch too, the headers of the file were reordered in alphabetic
 order. No functional changes here.
 
 Cc: Mauro Carvalho Chehab mche...@infradead.org
 Cc: linux-media@vger.kernel.org 
 Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com

Nack. See enclosed.

commit d8a9c01484b258573587a52c3226bbdf6d11cda6
Author: Mauro Carvalho Chehab mche...@redhat.com
Date:   Thu Apr 19 16:35:27 2012 -0300

[media] tlg2300: Remove usage of KERNEL_VERSION()

As reported by Marcos:

On 04-18-2012 01:30, Marcos Paulo de Souza wrote:
 The output of make versioncheck told us that:

 drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h

 If we take a look at the code, we can see that this file uses the macro
 KERNEL_VERSION.

The V4L2 core now fills it automatically, so drivers shouldn't touch on
cap-version anymore.

Reported by: Marcos Paulo de Souza marcos.souza@gmail.com
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

diff --git a/drivers/media/video/tlg2300/pd-video.c 
b/drivers/media/video/tlg2300/pd-video.c
index a794ae6..bfbf9e5 100644
--- a/drivers/media/video/tlg2300/pd-video.c
+++ b/drivers/media/video/tlg2300/pd-video.c
@@ -150,7 +150,6 @@ static int vidioc_querycap(struct file *file, void *fh,
strcpy(cap-driver, tele-video);
strcpy(cap-card, Telegent Poseidon);
usb_make_path(p-udev, cap-bus_info, sizeof(cap-bus_info));
-   cap-version = KERNEL_VERSION(0, 0, 1);
cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
--
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:v4l-dvb/for_v3.5] [media] drivers: media: radio: radio-keene.c: Remove unneeded include of version.h

2012-04-19 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] drivers: media: radio: radio-keene.c: Remove unneeded include 
of version.h
Author:  Marcos Paulo de Souza marcos.souza@gmail.com
Date:Wed Apr 18 00:30:04 2012 -0300

The output of make versioncheck told us that:

drivers/media/radio/radio-keene.c: 31 linux/version.h not needed.

After take a look in the code, we can agree to remove it.

Cc: Mauro Carvalho Chehab mche...@infradead.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

 drivers/media/radio/radio-keene.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=af22b83ab895e71400d59f07b6ee89297c3560b1

diff --git a/drivers/media/radio/radio-keene.c 
b/drivers/media/radio/radio-keene.c
index 55bd1d2..26a2b7a 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -28,7 +28,6 @@
 #include media/v4l2-ctrls.h
 #include media/v4l2-event.h
 #include linux/usb.h
-#include linux/version.h
 #include linux/mutex.h
 
 /* driver and module definitions */
--
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:v4l-dvb/for_v3.5] [media] drivers: media: dvb: ddbridge: ddbridge-code: Remove unneeded include of version.h

2012-04-19 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] drivers: media: dvb: ddbridge: ddbridge-code: Remove unneeded 
include of version.h
Author:  Marcos Paulo de Souza marcos.souza@gmail.com
Date:Wed Apr 18 00:30:03 2012 -0300

The output of make versioncheck told us that the file
drivers/media/dvb/ddbridge/ddbridge-code.c has a incorrect include of
version.h:

linux/drivers/media/dvb/ddbridge/ddbridge-core.c: 34 linux/version.h not
needed.

After take a look in the code, we can agree to remove it.

Cc: Mauro Carvalho Chehab mche...@infradead.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

 drivers/media/dvb/ddbridge/ddbridge-core.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=c1341a16f6c1d25d3d8bd1ad64556b8029cbb4b8

diff --git a/drivers/media/dvb/ddbridge/ddbridge-core.c 
b/drivers/media/dvb/ddbridge/ddbridge-core.c
index d88c4aa..115777e 100644
--- a/drivers/media/dvb/ddbridge/ddbridge-core.c
+++ b/drivers/media/dvb/ddbridge/ddbridge-core.c
@@ -31,7 +31,6 @@
 #include linux/pci.h
 #include linux/pci_ids.h
 #include linux/timer.h
-#include linux/version.h
 #include linux/i2c.h
 #include linux/swab.h
 #include linux/vmalloc.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


[git:v4l-dvb/for_v3.5] [media] drivers: media: video: adp1653.c: Remove unneeded include of version.h

2012-04-19 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] drivers: media: video: adp1653.c: Remove unneeded include of 
version.h
Author:  Marcos Paulo de Souza marcos.souza@gmail.com
Date:Wed Apr 18 00:30:05 2012 -0300

The output of make versioncheck told us that:

drivers/media/video/adp1653.c: 37 linux/version.h not needed.

After we take a look at the code, we can afree to remove it.

Cc: Mauro Carvalho Chehab mche...@infradead.org
Cc: linux-media@vger.kernel.org
Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

 drivers/media/video/adp1653.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=713ca5dfd050efa61eb92be51a9ccbdaee2239cd

diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c
index 5b045b4..24afc99 100644
--- a/drivers/media/video/adp1653.c
+++ b/drivers/media/video/adp1653.c
@@ -34,7 +34,6 @@
 #include linux/module.h
 #include linux/i2c.h
 #include linux/slab.h
-#include linux/version.h
 #include media/adp1653.h
 #include media/v4l2-device.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 V2 4/5] [Documentation] Media: Update docs for V4L2 FM new features

2012-04-19 Thread halli manjunatha
On Thu, Apr 19, 2012 at 7:38 AM, Hans Verkuil hverk...@xs4all.nl wrote:
 Hi Manjunatha,

 A quick review:

 On Wednesday, April 18, 2012 18:06:42 manjunatha_ha...@ti.com wrote:
 From: Manjunatha Halli x0130...@ti.com

 The list of new features -
       1) New control class for FM RX
       2) New FM RX CID's - De-Emphasis filter mode and RDS AF switch
       3) New FM TX CID - RDS Alternate frequency set.

 Signed-off-by: Manjunatha Halli x0130...@ti.com
 ---
  Documentation/DocBook/media/v4l/compat.xml         |    3 +
  Documentation/DocBook/media/v4l/controls.xml       |   78 
 
  Documentation/DocBook/media/v4l/dev-rds.xml        |    5 +-
  .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml       |    7 ++
  4 files changed, 91 insertions(+), 2 deletions(-)

 diff --git a/Documentation/DocBook/media/v4l/compat.xml 
 b/Documentation/DocBook/media/v4l/compat.xml
 index bce97c5..df1f345 100644
 --- a/Documentation/DocBook/media/v4l/compat.xml
 +++ b/Documentation/DocBook/media/v4l/compat.xml
 @@ -2311,6 +2311,9 @@ more information./para
         paraAdded FM Modulator (FM TX) Extended Control Class: 
 constantV4L2_CTRL_CLASS_FM_TX/constant and their Control IDs./para
       /listitem
       listitem
 +     paraAdded FM Receiver (FM RX) Extended Control Class: 
 constantV4L2_CTRL_CLASS_FM_RX/constant and their Control IDs./para
 +     /listitem
 +     listitem
         paraAdded Remote Controller chapter, describing the default Remote 
 Controller mapping for media devices./para
       /listitem
        /orderedlist
 diff --git a/Documentation/DocBook/media/v4l/controls.xml 
 b/Documentation/DocBook/media/v4l/controls.xml
 index b84f25e..f6c8034 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3018,6 +3018,12 @@ to find receivers which can scroll strings sized as 
 32 x N or 64 x N characters.
  with steps of 32 or 64 characters. The result is it must always contain a 
 string with size multiple of 32 or 64. /entry
         /row
         row
 +       entry 
 spanname=idconstantV4L2_CID_RDS_TX_AF_FREQ/constantnbsp;/entry
 +       entryinteger/entry
 +       /row
 +       rowentry spanname=descrSets the RDS Alternate Frequency value 
 which allows a receiver to re-tune to a different frequency providing the 
 same station when the first signal becomes too weak (e.g., when moving out 
 of range). /entry

 What is the unit of this frequency? I assume that is defined in the RDS 
 standard?
AFs for the tuned network are broadcast two codes at a time, in block
3 of type 0A groups, so driver has to parse the 0A group of the
received RDS message and store the found AF frequency separately.
Once the RSSI level or current channel goes below certain threshold
driver will try to switch to stored AF frequency.

 +       /row
 +       row
           entry 
 spanname=idconstantV4L2_CID_AUDIO_LIMITER_ENABLED/constantnbsp;/entry
           entryboolean/entry
         /row
 @@ -3146,6 +3152,78 @@ manually or automatically if set to zero. Unit, range 
 and step are driver-specif
  xref linkend=en50067 / document, from CENELEC./para
      /section

 +    section id=fm-rx-controls
 +      titleFM Receiver Control Reference/title
 +
 +      paraThe FM Receiver (FM_RX) class includes controls for common 
 features of
 +FM Reception capable devices. Currently this class includes parameter for 
 Alternate
 +frequency./para
 +
 +      table pgwide=1 frame=none id=fm-rx-control-id
 +      titleFM_RX Control IDs/title
 +
 +      tgroup cols=4
 +        colspec colname=c1 colwidth=1* /
 +        colspec colname=c2 colwidth=6* /
 +        colspec colname=c3 colwidth=2* /
 +        colspec colname=c4 colwidth=6* /
 +        spanspec namest=c1 nameend=c2 spanname=id /
 +        spanspec namest=c2 nameend=c4 spanname=descr /
 +        thead
 +          row
 +            entry spanname=id align=leftID/entry
 +            entry align=leftType/entry
 +          /rowrow rowsep=1entry spanname=descr 
 align=leftDescription/entry
 +          /row
 +        /thead
 +        tbody valign=top
 +          rowentry/entry/row
 +          row
 +            entry 
 spanname=idconstantV4L2_CID_FM_RX_CLASS/constantnbsp;/entry
 +            entryclass/entry
 +          /rowrowentry spanname=descrThe FM_RX class
 +descriptor. Calling VIDIOC-QUERYCTRL; for this control will return a
 +description of this control class./entry
 +          /row
 +          row
 +            entry 
 spanname=idconstantV4L2_CID_RDS_AF_SWITCH/constantnbsp;/entry
 +            entryboolean/entry
 +          /row
 +          rowentry spanname=descrEnable or Disable's FM RX RDS 
 Alternate frequency feature./entry

 How does this work? If this is enabled, will the receiver automagically 
 switch to
 the alternate frequency if the signal becomes too weak? And how does that 
 affect
 VIDIOC_G_FREQUENCY?

Yes, when signal strength of current channel goes below the threshold
then driver will switch to the 

Re: [PATCH 1/6] m88ds3103, montage dvb-s/s2 demodulator driver

2012-04-19 Thread Mauro Carvalho Chehab
Hi Max,

Em 15-04-2012 12:53, nibble.max escreveu:
 Montage m88ds3103 demodulator and ts2022 tuner driver.

It was pointed to me that this device were already discussed on:

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

If m88ds3103 demod is similar enough to ds3000, it should just add the needed
bits at the existing driver, and not creating a new driver. 

Thanks,
Mauro

 
 Signed-off-by: Max nibble nibble@gmail.com
 ---
  drivers/media/dvb/frontends/Kconfig |7 +
  drivers/media/dvb/frontends/Makefile|2 +
  drivers/media/dvb/frontends/m88ds3103.c | 1851 
 +++
  drivers/media/dvb/frontends/m88ds3103.h |   53 +
  4 files changed, 1913 insertions(+)
  create mode 100644 drivers/media/dvb/frontends/m88ds3103.c
  create mode 100644 drivers/media/dvb/frontends/m88ds3103.h
 
 diff --git a/drivers/media/dvb/frontends/Kconfig 
 b/drivers/media/dvb/frontends/Kconfig
 index e11adb6..d2bb312 100644
 --- a/drivers/media/dvb/frontends/Kconfig
 +++ b/drivers/media/dvb/frontends/Kconfig
 @@ -214,6 +214,13 @@ config DVB_CX24116
   help
 A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
  
 +config DVB_M88DS3103
 + tristate Montage DS3103 based
 + depends on DVB_CORE  I2C
 + default m if DVB_FE_CUSTOMISE
 + help
 +   A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
 +   
  config DVB_SI21XX
   tristate Silicon Labs SI21XX based
   depends on DVB_CORE  I2C
 diff --git a/drivers/media/dvb/frontends/Makefile 
 b/drivers/media/dvb/frontends/Makefile
 index 6ca7557..84ddf41 100644
 --- a/drivers/media/dvb/frontends/Makefile
 +++ b/drivers/media/dvb/frontends/Makefile
 @@ -98,5 +98,7 @@ obj-$(CONFIG_DVB_A8293) += a8293.o
  obj-$(CONFIG_DVB_TDA10071) += tda10071.o
  obj-$(CONFIG_DVB_RTL2830) += rtl2830.o
  obj-$(CONFIG_DVB_M88RS2000) += m88rs2000.o
 +obj-$(CONFIG_DVB_M88DS3103) += m88ds3103.o
  obj-$(CONFIG_DVB_AF9033) += af9033.o
  
 +
 diff --git a/drivers/media/dvb/frontends/m88ds3103.c 
 b/drivers/media/dvb/frontends/m88ds3103.c
 new file mode 100644
 index 000..a186ba0
 --- /dev/null
 +++ b/drivers/media/dvb/frontends/m88ds3103.c
 @@ -0,0 +1,1851 @@
 +/*
 +Montage Technology M88DS3103/M88TS2022 - DVBS/S2 Satellite demod/tuner 
 driver
 +
 +Copyright (C) 2011 Max nibblenibble@gmail.com
 +Copyright (C) 2010 Montage Technologywww.montage-tech.com
 +Copyright (C) 2009 Konstantin Dimitrov.
 +
 +This program is free software; you can redistribute it and/or modify
 +it under the terms of the GNU General Public License as published by
 +the Free Software Foundation; either version 2 of the License, or
 +(at your option) any later version.
 +
 +This program is distributed in the hope that it will be useful,
 +but WITHOUT ANY WARRANTY; without even the implied warranty of
 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +GNU General Public License for more details.
 +
 +You should have received a copy of the GNU General Public License
 +along with this program; if not, write to the Free Software
 +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
 +#include linux/slab.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/moduleparam.h
 +#include linux/init.h
 +#include linux/firmware.h
 +
 +#include dvb_frontend.h
 +#include m88ds3103.h
 +
 +static int debug;
 +module_param(debug, int, 0644);
 +MODULE_PARM_DESC(debug, Activates frontend debugging (default:0));
 +
 +#define dprintk(args...) \
 + do { \
 + if (debug) \
 + printk(KERN_INFO m88ds3103:  args); \
 + } while (0)
 +
 +#define FW_DOWN_SIZE 32
 +#define FW_DOWN_LOOP (8192/FW_DOWN_SIZE)
 +#define DS3103_DEFAULT_FIRMWARE dvb-fe-ds3103.fw
 +#define DS3000_DEFAULT_FIRMWARE dvb-fe-ds300x.fw
 +#define MT_FE_MCLK_KHZ 96000 /* in kHz */
 +#define MT_FE_CRYSTAL_KHZ   27000 /* in kHz */
 +#define FREQ_OFFSET_AT_SMALL_SYM_RATE_KHz 3000
 +#define DS3000_ID0x3000
 +#define DS3103_ID0x3103
 +#define TS2020_ID0x2020
 +#define TS2022_ID0x2022
 +#define UNKNOW_ID0x
 +
 +/* For M88DS3103 demod dvbs mode.*/
 +static u8 ds3103_dvbs_init_tab[] = {
 + 0x23, 0x07,
 + 0x08, 0x03,
 + 0x0c, 0x02,
 + 0x21, 0x54,
 + 0x25, 0x82,
 + 0x27, 0x31,
 + 0x30, 0x08,
 + 0x31, 0x40,
 + 0x32, 0x32,
 + 0x33, 0x35,
 + 0x35, 0xff,
 + 0x3a, 0x00,
 + 0x37, 0x10,
 + 0x38, 0x10,
 + 0x39, 0x02,
 + 0x42, 0x60,
 + 0x4a, 0x80,
 + 0x4b, 0x04,
 + 0x4d, 0x91,
 + 0x5d, 0xc8,
 + 0x50, 0x36,
 + 0x51, 0x36,
 + 0x52, 0x36,
 + 0x53, 0x36,
 + 0x63, 0x0f,
 + 0x64, 0x30,
 + 0x65, 0x40,
 + 0x68, 0x26,
 + 0x69, 0x4c,
 + 0x70, 0x20,
 + 0x71, 0x70,
 + 0x72, 0x04,
 + 0x73, 0x00,
 + 0x70, 0x40,
 + 0x71, 0x70,
 + 0x72, 0x04,
 + 0x73, 0x00,
 + 0x70, 0x60,
 +  

Re: [PATCH v4 02/14] Documentation: media: description of DMABUF importing in V4L2

2012-04-19 Thread Mauro Carvalho Chehab
Em 19-04-2012 11:32, Tomasz Stanislawski escreveu:
 On 04/17/2012 01:25 AM, Laurent Pinchart wrote:
 Hi Tomasz,

 Thanks for the patch.

 On Friday 13 April 2012 17:47:44 Tomasz Stanislawski wrote:
 This patch adds description and usage examples for importing
 DMABUF file descriptor in V4L2.

 Signed-off-by: Tomasz Stanislawski t.stanisl...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com

 [snip]

 diff --git a/Documentation/DocBook/media/v4l/io.xml
 b/Documentation/DocBook/media/v4l/io.xml index b815929..dc5979d 100644
 --- a/Documentation/DocBook/media/v4l/io.xml
 +++ b/Documentation/DocBook/media/v4l/io.xml
 @@ -472,6 +472,162 @@ rest should be evident./para
/footnote/para
/section

 +  section id=dmabuf
 +titleStreaming I/O (DMA buffer importing)/title

 This section is very similar to the Streaming I/O (User Pointers) section. 
 Do 
 you think we should merge the two ? I could handle that if you want.

 
 Hi Laurent,
 
 One may find similar sentences in MMAP, USERPTR and DMABUF.
 Maybe the common parts like description of STREAMON/OFF,
 QBUF/DQBUF shuffling should be moved to separate section
 like Streaming :).
 
 Maybe it is worth to introduce a separate patch for this change.
 
 Frankly, I would prefer to keep the Doc in the current form till
 importer support gets merged. Later the Doc could be fixed.
 
 BTW. What is the sense of merging userptr and dmabuf section
 if userptr is going to dropped in long-term?

I didn't read the rest of the thread, so sorry, if I'm making wrong 
assumptions...
Am I understanding wrong or are you saying that you want to drop userptr
from V4L2 API in long-term?

 
 Regards,
 Tomasz Stanislawski

--
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 v4 02/14] Documentation: media: description of DMABUF importing in V4L2

2012-04-19 Thread Mauro Carvalho Chehab
Em 19-04-2012 11:32, Tomasz Stanislawski escreveu:
 
 Hi Laurent,
 
 One may find similar sentences in MMAP, USERPTR and DMABUF.
 Maybe the common parts like description of STREAMON/OFF,
 QBUF/DQBUF shuffling should be moved to separate section
 like Streaming :).
 
 Maybe it is worth to introduce a separate patch for this change.
 
 Frankly, I would prefer to keep the Doc in the current form till
 importer support gets merged. Later the Doc could be fixed.
 
 BTW. What is the sense of merging userptr and dmabuf section
 if userptr is going to dropped in long-term?

I didn't read yet the rest of the thread, so sorry, if I'm making wrong 
assumptions...
Am I understanding wrong or are you saying that you want to drop userptr
from V4L2 API in long-term? If so, why?

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


Re: [media] fintek-cir: add support for newer chip version

2012-04-19 Thread Jarod Wilson
On Thu, Apr 19, 2012 at 08:25:10PM +0300, Dan Carpenter wrote:
 Hi Mauro,
 
 The patch 83ec8225b6ae: [media] fintek-cir: add support for newer 
 chip version from Feb 14, 2012, leads to the following warning:
 drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
warn: known condition '1032 != 2052'
 
 drivers/media/rc/fintek-cir.c
197  /*
198   * Newer reviews of this chipset uses port 8 instead of 5
199   */
200  if ((chip != 0x0408) || (chip != 0x0804))
  ^^
 One of these conditions is always true.
 
 Probably it should it be:
   if ((chip == 0x0408) || (chip == 0x0804))
 or:
   if ((chip != 0x0408)  (chip != 0x0804))

Reasonably sure the latter case would be the proper one there.


 depending one if those are the newer or the older chipsets.  I googled
 for it a bit and then decided to just email you.  :P
 
201  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV2;
202  else
203  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV1;
204  
 
 regards,
 dan carpenter
 

-- 
Jarod Wilson
ja...@redhat.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


Re: [PATCH 1/1] [media] ite-cir: postpone ISR registration

2012-04-19 Thread Jarod Wilson
On Wed, Apr 18, 2012 at 09:54:07PM +0100, Luis Henriques wrote:
 An early registration of an ISR was causing a crash to several users (for
 example here: http://bugs.launchpad.net/bugs/972723  The reason was that
 IRQs were being triggered before the driver initialisation was completed.
 
 This patch fixes this by moving the invocation to request_irq() to a later
 stage on the driver probe function.

Ugh. Looks like we actually have a similar problem with multiple lpc super
i/o based CIR drivers. I'd probably move both the irq and io region
requests in ite-cir, fintek-cir, nuvoton-cir, ene_ir and winbond-cir. If
I'm thinking clearly, I've actually seen a very similar report for one of
the other CIR drivers recently. Good catch. But yeah, lets do the same for
all the drivers, and move request_region as well.

-- 
Jarod Wilson
ja...@redhat.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


Re: [media] fintek-cir: add support for newer chip version

2012-04-19 Thread Mauro Carvalho Chehab
Em 19-04-2012 17:41, Jarod Wilson escreveu:
 On Thu, Apr 19, 2012 at 08:25:10PM +0300, Dan Carpenter wrote:
 Hi Mauro,

 The patch 83ec8225b6ae: [media] fintek-cir: add support for newer 
 chip version from Feb 14, 2012, leads to the following warning:
 drivers/media/rc/fintek-cir.c:200 fintek_hw_detect()
   warn: known condition '1032 != 2052'

 drivers/media/rc/fintek-cir.c
197  /*
198   * Newer reviews of this chipset uses port 8 instead of 5
199   */
200  if ((chip != 0x0408) || (chip != 0x0804))
  ^^
 One of these conditions is always true.

 Probably it should it be:
  if ((chip == 0x0408) || (chip == 0x0804))
 or:
  if ((chip != 0x0408)  (chip != 0x0804))
 
 Reasonably sure the latter case would be the proper one there.

Yes. The information that I have is that Fintek product 0x0408(F71809) and 
0x0804(F71855)
use logical device 5 and other chip ids use logical device 8.
 
 
 depending one if those are the newer or the older chipsets.  I googled
 for it a bit and then decided to just email you.  :P

201  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV2;
202  else
203  fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV1;
204  

 regards,
 dan carpenter

 

Care to prepare us a patch in order to fix it?

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


Re: [PATCH 1/1] [media] ite-cir: postpone ISR registration

2012-04-19 Thread Luis Henriques
On Thu, Apr 19, 2012 at 04:44:44PM -0400, Jarod Wilson wrote:
 On Wed, Apr 18, 2012 at 09:54:07PM +0100, Luis Henriques wrote:
  An early registration of an ISR was causing a crash to several users (for
  example here: http://bugs.launchpad.net/bugs/972723  The reason was that
  IRQs were being triggered before the driver initialisation was completed.
  
  This patch fixes this by moving the invocation to request_irq() to a later
  stage on the driver probe function.
 
 Ugh. Looks like we actually have a similar problem with multiple lpc super
 i/o based CIR drivers. I'd probably move both the irq and io region
 requests in ite-cir, fintek-cir, nuvoton-cir, ene_ir and winbond-cir. If
 I'm thinking clearly, I've actually seen a very similar report for one of
 the other CIR drivers recently. Good catch. But yeah, lets do the same for
 all the drivers, and move request_region as well.

Yeah, I've realised the other drivers had the same issue.  ite-cir was
just for one that bit us first.

Anyway, I'll be sending in a minute another patch with your comments.

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


[PATCH v2] [media] rc: Postpone ISR registration

2012-04-19 Thread Luis Henriques
An early registration of an ISR was causing a crash to several users (for
example, with the ite-cir driver: http://bugs.launchpad.net/bugs/972723).
The reason was that IRQs were being triggered before a driver
initialisation was completed.

This patch fixes this by moving the invocation to request_irq() and to
request_region() to a later stage on the driver probe function.

Cc: sta...@vger.kernel.org
Signed-off-by: Luis Henriques luis.henriq...@canonical.com
---
 drivers/media/rc/ene_ir.c  |   29 ++--
 drivers/media/rc/fintek-cir.c  |   17 ++--
 drivers/media/rc/ite-cir.c |   18 ++---
 drivers/media/rc/nuvoton-cir.c |   33 ---
 drivers/media/rc/winbond-cir.c |   58 
 5 files changed, 79 insertions(+), 76 deletions(-)

diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index 860c112..b38c5c7 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -1018,21 +1018,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const 
struct pnp_device_id *id)
 
spin_lock_init(dev-hw_lock);
 
-   /* claim the resources */
error = -EBUSY;
-   dev-hw_io = pnp_port_start(pnp_dev, 0);
-   if (!request_region(dev-hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
-   dev-hw_io = -1;
-   dev-irq = -1;
-   goto error;
-   }
-
-   dev-irq = pnp_irq(pnp_dev, 0);
-   if (request_irq(dev-irq, ene_isr,
-   IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
-   dev-irq = -1;
-   goto error;
-   }
 
pnp_set_drvdata(pnp_dev, dev);
dev-pnp_dev = pnp_dev;
@@ -1086,6 +1072,21 @@ static int ene_probe(struct pnp_dev *pnp_dev, const 
struct pnp_device_id *id)
device_set_wakeup_capable(pnp_dev-dev, true);
device_set_wakeup_enable(pnp_dev-dev, true);
 
+   /* claim the resources */
+   dev-hw_io = pnp_port_start(pnp_dev, 0);
+   if (!request_region(dev-hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
+   dev-hw_io = -1;
+   dev-irq = -1;
+   goto error;
+   }
+
+   dev-irq = pnp_irq(pnp_dev, 0);
+   if (request_irq(dev-irq, ene_isr,
+   IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
+   dev-irq = -1;
+   goto error;
+   }
+
error = rc_register_device(rdev);
if (error  0)
goto error;
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 392d4be..c6273c5 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -515,14 +515,6 @@ static int fintek_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id
spin_lock_init(fintek-fintek_lock);
 
ret = -EBUSY;
-   /* now claim resources */
-   if (!request_region(fintek-cir_addr,
-   fintek-cir_port_len, FINTEK_DRIVER_NAME))
-   goto failure;
-
-   if (request_irq(fintek-cir_irq, fintek_cir_isr, IRQF_SHARED,
-   FINTEK_DRIVER_NAME, (void *)fintek))
-   goto failure;
 
pnp_set_drvdata(pdev, fintek);
fintek-pdev = pdev;
@@ -558,6 +550,15 @@ static int fintek_probe(struct pnp_dev *pdev, const struct 
pnp_device_id *dev_id
/* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */
rdev-rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD);
 
+   /* now claim resources */
+   if (!request_region(fintek-cir_addr,
+   fintek-cir_port_len, FINTEK_DRIVER_NAME))
+   goto failure;
+
+   if (request_irq(fintek-cir_irq, fintek_cir_isr, IRQF_SHARED,
+   FINTEK_DRIVER_NAME, (void *)fintek))
+   goto failure;
+
ret = rc_register_device(rdev);
if (ret)
goto failure;
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 682009d..d88b304 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1516,15 +1516,6 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
init_ir_raw_event(itdev-rawir);
 
ret = -EBUSY;
-   /* now claim resources */
-   if (!request_region(itdev-cir_addr,
-   dev_desc-io_region_size, ITE_DRIVER_NAME))
-   goto failure;
-
-   if (request_irq(itdev-cir_irq, ite_cir_isr, IRQF_SHARED,
-   ITE_DRIVER_NAME, (void *)itdev))
-   goto failure;
-
/* set driver data into the pnp device */
pnp_set_drvdata(pdev, itdev);
itdev-pdev = pdev;
@@ -1600,6 +1591,15 @@ static int ite_probe(struct pnp_dev *pdev, const struct 
pnp_device_id
rdev-driver_name = ITE_DRIVER_NAME;
rdev-map_name = RC_MAP_RC6_MCE;
 
+   /* now claim resources */
+   if (!request_region(itdev-cir_addr,
+   

Re: dvb lock patch

2012-04-19 Thread Torfinn Ingolfsen
2012/4/18 Josu Lazkano josu.lazk...@gmail.com:
 El día 18 de abril de 2012 21:19, Mauro Carvalho Chehab
 mche...@redhat.com escribió:
 Em 18-04-2012 15:58, Ezequiel García escreveu:
 Josu,

 On Tue, Apr 17, 2012 at 10:30 AM, Josu Lazkano josu.lazk...@gmail.com 
 wrote:
 2012/3/24 Mauro Carvalho Chehab mche...@redhat.com:
 [snip]

 That doesn't sound right to me, and can actually cause race issues.

 Regards,
 Mauro.

 Thanks for the patch Mauro.


 I think Mauro is *not* giving you a patch, rather the opposite:
 pointing out that the patch can
 cause problems!

 Yes. The driver will be unreliable with a patch like that, due to
 race conditions.

 Regards,
 Ezequiel.

 Regards,
 Mauro.

 Thanks anyway.

 I am looking for a solution to use virtual adapters on MythTV to use
 my satellite provider card on two machines.
 With 2.6.32 kernel is working great, but there is no way to work with
 3.x kernel.

 Is anyone using sasc-ng with latest kernel?


Would kernel 3.0.0.15 do?
If so, descriptions on how I did it here:
http://sites.google.com/site/tingox/digitaltv_sascng
http://sites.google.com/site/tingox/asrock_e350m1_xubuntu

Note: these are my work notes, not a how-to!

As you can see, I'm using this patch:
http://kipdola.be/subdomain/linux-2.6.38-dvb-mutex.patch

It seems to work for me (had it running with Kaffeine on encrypted
channesl for two weeks in a row)

HTH
-- 
Regards,
Torfinn Ingolfsen
--
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: v4l-cx23885-enc.fw

2012-04-19 Thread Andy Walls
On Tue, 2012-04-17 at 16:18 -0500, Britney Fransen wrote:
 I am not sure where to report this so if this is the wrong place and
 someone can point me in the right direction it would be appreciated.
 
 http://www.linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw 
 http://www.linuxtv.org/downloads/firmware/v4l-cx23885-avcore-01.fw
 look to be the same file with different names.

Well, that's not good.  They should be very different.

The avcore firmware is for the analog TV audio broadcast standard
auto-detection.  It is used by the Merlin audio core in the integrated
CX25843 core inside the CX2388[578] chip.

The enc firmware is for a CX2341[67] MPEG-2 encoder chip connected to
the CX2388[578] chip.

   However when I extract the firmware from
 http://steventoth.net/linux/hvr1800/ v4l-cx23885-enc.fw is
 significantly larger than v4l-cx23885-avcore-01.fw.  When using
 http://www.linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw I get
 cx23885_initialize_codec() f/w load failed.  Using the larger
 v4l-cx23885-enc.fw from http://steventoth.net/linux/hvr1800/ the
 firmware loads without error.  I believe that the
 http://www.linuxtv.org/downloads/firmware/v4l-cx23885-enc.fw is
 incorrect.
 http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=tree 
 also has the same incorrect v4l-cx23885-enc.fw file.

I believe you are correct.

Regards,
Andy


 Thanks,
 Britney--


--
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: linux-next: Tree for Apr 19 (media/video/mt9m032.c)

2012-04-19 Thread Mauro Carvalho Chehab
Em 19-04-2012 19:26, Randy Dunlap escreveu:
 On 04/18/2012 11:46 PM, Stephen Rothwell wrote:
 
 Hi all,

 Changes since 20120418:
 
 
 
 on x86_64:
 
   CC  drivers/media/video/mt9m032.o
 drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_crop':
 drivers/media/video/mt9m032.c:337:3: error: implicit declaration of function 
 'v4l2_subdev_get_try_crop'
 drivers/media/video/mt9m032.c:337:3: warning: return makes pointer from 
 integer without a cast
 drivers/media/video/mt9m032.c: In function '__mt9m032_get_pad_format':
 drivers/media/video/mt9m032.c:359:3: error: implicit declaration of function 
 'v4l2_subdev_get_try_format'
 drivers/media/video/mt9m032.c:359:3: warning: return makes pointer from 
 integer without a cast
 drivers/media/video/mt9m032.c: In function 'mt9m032_probe':
 drivers/media/video/mt9m032.c:767:41: error: 'struct v4l2_subdev' has no 
 member named 'entity'
 drivers/media/video/mt9m032.c:826:38: error: 'struct v4l2_subdev' has no 
 member named 'entity'
 drivers/media/video/mt9m032.c: In function 'mt9m032_remove':
 drivers/media/video/mt9m032.c:842:38: error: 'struct v4l2_subdev' has no 
 member named 'entity'
 make[4]: *** [drivers/media/video/mt9m032.o] Error 1
 
 Full randconfig file is attached.
 

This patch should fix it:


http://git.linuxtv.org/mchehab/media-next.git/commit/18311c5395ca4d0c3fefa406da87a9d16efaca46

It is on my linux-next tree so, if no new conflicts/problems arise, it should 
be available
on tomorrow's next ;)

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


Re: [PATCH] TDA9887 PAL-Nc fix

2012-04-19 Thread Andy Walls
On Wed, 2012-04-18 at 09:22 -0300, Gonzalo de la Vega wrote:
 The tunner IF for PAL-Nc norm, which AFAIK is used only in Argentina, was 
 being defined as equal to PAL-M but it is not. It actually uses the same 
 video IF as PAL-BG (and unlike PAL-M) but the audio is at 4.5MHz (same as 
 PAL-M). A separate structure member was added for PAL-Nc.
 
 Signed-off-by: Gonzalo A. de la Vega gadelav...@gmail.com

Hmmm.

The Video IF for N systems is 45.75 MHz according to this popular book
(see page 29 of the PDF):
http://www.deetc.isel.ipl.pt/Analisedesinai/sm/downloads/doc/ch08.pdf

The Video IF is really determined by the IF SAW filter used in your
tuner assembly, and how the tuner data sheet says to program the
mixer/oscillator chip to mix down from RF to IF.

What model analog tuner assembly are you using?  It could be that the
linux tuner-simple module is setting up the mixer/oscillator chip wrong.

Regards,
Andy

 
 diff --git a/drivers/media/common/tuners/tda9887.c 
 b/drivers/media/common/tuners/tda9887.c
 index cdb645d..b560b5d 100644
 --- a/drivers/media/common/tuners/tda9887.c
 +++ b/drivers/media/common/tuners/tda9887.c
 @@ -168,8 +168,8 @@ static struct tvnorm tvnorms[] = {
  cAudioIF_6_5   |
  cVideoIF_38_90 ),
   },{
 - .std   = V4L2_STD_PAL_M | V4L2_STD_PAL_Nc,
 - .name  = PAL-M/Nc,
 + .std   = V4L2_STD_PAL_M,
 + .name  = PAL-M,
   .b = ( cNegativeFmTV  |
  cQSS   ),
   .c = ( cDeemphasisON  |
 @@ -179,6 +179,17 @@ static struct tvnorm tvnorms[] = {
  cAudioIF_4_5   |
  cVideoIF_45_75 ),
   },{
 + .std   = V4L2_STD_PAL_Nc,
 + .name  = PAL-Nc,
 + .b = ( cNegativeFmTV  |
 +cQSS   ),
 + .c = ( cDeemphasisON  |
 +cDeemphasis75  |
 +cTopDefault),
 + .e = ( cGating_36 |
 +cAudioIF_4_5   |
 +cVideoIF_38_90 ),
 + },{
   .std   = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H,
   .name  = SECAM-BGH,
   .b = ( cNegativeFmTV  |
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


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


Re: [GIT PULL FOR v3.5] Various fixes

2012-04-19 Thread Andy Walls
On Thu, 2012-04-19 at 17:48 +0200, Hans Verkuil wrote:
 While I was cleaning up some older drivers I came across a few bugs that are
 fixed here. The fixes are all trivial one-liners.
 
 Regards,
 
   Hans

The fixes for ivtv and cx18 look good to me.  Thanks Hans.

Reviewed-by: Andy Walls awa...@md.metrocast.net

Regards,
Andy

 The following changes since commit f4d4e7656b26a6013bc5072c946920d2e2c44e8e:
 
   [media] em28xx: Make em28xx-input.c a separate module (2012-04-10 20:45:41 
 -0300)
 
 are available in the git repository at:
 
   git://linuxtv.org/hverkuil/media_tree.git fixes
 
 for you to fetch changes up to f85e735051e71410bfd695536a25c1013bceeabc:
 
   vivi: fix duplicate line. (2012-04-19 17:38:52 +0200)
 
 
 Hans Verkuil (4):
   V4L: fix incorrect refcounting.
   V4L2: drivers implementing vidioc_default should also return -ENOTTY
   v4l2-ctrls.c: zero min/max/step/def values for 64 bit integers.
   vivi: fix duplicate line.
 
  Documentation/video4linux/v4l2-framework.txt |   14 +-
  drivers/media/radio/dsbr100.c|1 -
  drivers/media/radio/radio-keene.c|1 -
  drivers/media/video/cx18/cx18-ioctl.c|2 +-
  drivers/media/video/davinci/vpfe_capture.c   |2 +-
  drivers/media/video/ivtv/ivtv-ioctl.c|2 +-
  drivers/media/video/meye.c   |2 +-
  drivers/media/video/mxb.c|2 +-
  drivers/media/video/v4l2-ctrls.c |1 +
  drivers/media/video/vivi.c   |2 +-
  10 files changed, 16 insertions(+), 13 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


Re: [PATCH 06/12] drivers: media: video: tlg2300: pd-video.c: Include version.h header

2012-04-19 Thread Huang Shijie
Hi Mauro:

On Fri, Apr 20, 2012 at 3:39 AM, Mauro Carvalho Chehab
mche...@redhat.com wrote:
 Em 18-04-2012 01:30, Marcos Paulo de Souza escreveu:
 The output of make versioncheck told us that:

 drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h

 If we take a look at the code, we can see that this file uses the macro
 KERNEL_VERSION. So, we need this include.

 Nack. The right fix here is just the opposite: to remove the KERNEL_VERSION()
 call. The V4L2 core now fills it automatically, so drivers shouldn't touch on
 cap-version anymore. See the enclosed patch.


 Cc: Mauro Carvalho Chehab mche...@infradead.org
 Cc: Huang Shijie shij...@gmail.com
 Cc: Kang Yong kangy...@telegent.com
 Cc: Zhang Xiaobing xbzh...@telegent.com
 Cc: linux-media@vger.kernel.org
 Signed-off-by: Marcos Paulo de Souza marcos.souza@gmail.com
 ---
  drivers/media/video/tlg2300/pd-video.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

 diff --git a/drivers/media/video/tlg2300/pd-video.c 
 b/drivers/media/video/tlg2300/pd-video.c
 index a794ae6..069db9a 100644
 --- a/drivers/media/video/tlg2300/pd-video.c
 +++ b/drivers/media/video/tlg2300/pd-video.c
 @@ -5,6 +5,7 @@
  #include linux/mm.h
  #include linux/sched.h
  #include linux/slab.h
 +#include linux/version.h

  #include media/v4l2-ioctl.h
  #include media/v4l2-dev.h

 commit f8bf305b7103857708cd22b504a70ea4a08022fc
 Author: Mauro Carvalho Chehab mche...@redhat.com
 Date:   Thu Apr 19 16:35:27 2012 -0300

    tlg2300: Remove usage of KERNEL_VERSION()

    As reported by Marcos:

    On 04-18-2012 01:30, Marcos Paulo de Souza wrote:
     The output of make versioncheck told us that:
    
     drivers/media/video/tlg2300/pd-video.c: 1669: need linux/version.h
    
     If we take a look at the code, we can see that this file uses the macro
     KERNEL_VERSION.

    The V4L2 core now fills it automatically, so drivers shouldn't touch on
    cap-version anymore.

    Reported by: Marcos Paulo de Souza marcos.souza@gmail.com
    Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com

 diff --git a/drivers/media/video/tlg2300/pd-video.c 
 b/drivers/media/video/tlg2300/pd-video.c
 index a794ae6..bfbf9e5 100644
 --- a/drivers/media/video/tlg2300/pd-video.c
 +++ b/drivers/media/video/tlg2300/pd-video.c
 @@ -150,7 +150,6 @@ static int vidioc_querycap(struct file *file, void *fh,
        strcpy(cap-driver, tele-video);
        strcpy(cap-card, Telegent Poseidon);
        usb_make_path(p-udev, cap-bus_info, sizeof(cap-bus_info));
 -       cap-version = KERNEL_VERSION(0, 0, 1);
        cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
                                V4L2_CAP_AUDIO | V4L2_CAP_STREAMING |
                                V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;

thanks a lot.

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