Xmas Loan ...Apply Now

2013-11-13 Thread ''Fredrick Loan Investment''
Do you need a loan ? if yes contact fredrick...@qq.com for more.
--
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


[PATCHv4][ 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.

2013-11-13 Thread Denis Carikli
That new macro is needed by the imx_drm staging driver
  for supporting the QVGA display of the eukrea-cpuimx51 board.

Cc: Rob Herring rob.herr...@calxeda.com
Cc: Pawel Moll pawel.m...@arm.com
Cc: Mark Rutland mark.rutl...@arm.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Ian Campbell ijc+devicet...@hellion.org.uk
Cc: devicet...@vger.kernel.org
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
Cc: driverdev-de...@linuxdriverproject.org
Cc: David Airlie airl...@linux.ie
Cc: dri-de...@lists.freedesktop.org
Cc: Mauro Carvalho Chehab m.che...@samsung.com
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: linux-media@vger.kernel.org
Cc: Sascha Hauer ker...@pengutronix.de
Cc: Shawn Guo shawn@linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: Eric Bénard e...@eukrea.com
Signed-off-by: Denis Carikli de...@eukrea.com
Acked-by: Mauro Carvalho Chehab m.che...@samsung.com
Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
ChangeLog v3-v4:
- Added Laurent Pinchart's Ack.

ChangeLog v2-v3:
- Added some interested people in the Cc list.
- Added Mauro Carvalho Chehab's Ack.
- Added documentation.
---
 .../DocBook/media/v4l/pixfmt-packed-rgb.xml|   78 
 include/uapi/linux/videodev2.h |1 +
 2 files changed, 79 insertions(+)

diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 
b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
index 166c8d6..f6a3e84 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
@@ -279,6 +279,45 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entry/entry
entry/entry
  /row
+ row id=V4L2-PIX-FMT-RGB666
+   entryconstantV4L2_PIX_FMT_RGB666/constant/entry
+   entry'RGBH'/entry
+   entry/entry
+   entryrsubscript5/subscript/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript5/subscript/entry
+   entrygsubscript4/subscript/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript5/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entry/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+ /row
  row id=V4L2-PIX-FMT-BGR24
entryconstantV4L2_PIX_FMT_BGR24/constant/entry
entry'BGR3'/entry
@@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref
entry/entry
entry/entry
  /row
+ row!-- id=V4L2-PIX-FMT-RGB666 --
+   entryconstantV4L2_PIX_FMT_RGB666/constant/entry
+   entry'RGBH'/entry
+   entry/entry
+   entryrsubscript5/subscript/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript5/subscript/entry
+   entrygsubscript4/subscript/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript5/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entry/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+   entry/entry
+ /row
  row!-- id=V4L2-PIX-FMT-BGR24 --
entryconstantV4L2_PIX_FMT_BGR24/constant/entry
entry'BGR3'/entry
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 437f1b0..e8ff410 100644
--- a/include/uapi/linux/videodev2.h
+++ 

[PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.

2013-11-13 Thread Denis Carikli
Cc: Rob Herring rob.herr...@calxeda.com
Cc: Pawel Moll pawel.m...@arm.com
Cc: Mark Rutland mark.rutl...@arm.com
Cc: Stephen Warren swar...@wwwdotorg.org
Cc: Ian Campbell ijc+devicet...@hellion.org.uk
Cc: devicet...@vger.kernel.org
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
Cc: driverdev-de...@linuxdriverproject.org
Cc: David Airlie airl...@linux.ie
Cc: dri-de...@lists.freedesktop.org
Cc: Mauro Carvalho Chehab m.che...@samsung.com
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: linux-media@vger.kernel.org
Cc: Sascha Hauer ker...@pengutronix.de
Cc: Shawn Guo shawn@linaro.org
Cc: linux-arm-ker...@lists.infradead.org
Cc: Eric Bénard e...@eukrea.com
Signed-off-by: Denis Carikli de...@eukrea.com
---
ChangeLog v2-v3:
- Added some interested people in the Cc list.
- Removed the commit message long desciption that was just a copy of the short
  description.
- Rebased the patch.
- Fixed a copy-paste error in the ipu_dc_map_clear parameter.
---
 .../bindings/staging/imx-drm/fsl-imx-drm.txt   |2 +-
 drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 +
 drivers/staging/imx-drm/parallel-display.c |2 ++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt 
b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
index b876d49..2d24425 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
@@ -29,7 +29,7 @@ Required properties:
 - crtc: the crtc this display is connected to, see below
 Optional properties:
 - interface_pix_fmt: How this display is connected to the
-  crtc. Currently supported types: rgb24, rgb565, bgr666
+  crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666
 - edid: verbatim EDID data block describing attached display.
 - ddc: phandle describing the i2c bus handling the display data
   channel
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c 
b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
index d0e3bc3..bcc7680 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
@@ -92,6 +92,7 @@ enum ipu_dc_map {
IPU_DC_MAP_GBR24, /* TVEv2 */
IPU_DC_MAP_BGR666,
IPU_DC_MAP_BGR24,
+   IPU_DC_MAP_RGB666,
 };
 
 struct ipu_dc {
@@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt)
return IPU_DC_MAP_BGR666;
case V4L2_PIX_FMT_BGR24:
return IPU_DC_MAP_BGR24;
+   case V4L2_PIX_FMT_RGB666:
+   return IPU_DC_MAP_RGB666;
default:
return -EINVAL;
}
@@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */
 
+   /* rgb666 */
+   ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
+
return 0;
 }
 
diff --git a/drivers/staging/imx-drm/parallel-display.c 
b/drivers/staging/imx-drm/parallel-display.c
index b34f3a3..46b6fce 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -248,6 +248,8 @@ static int imx_pd_probe(struct platform_device *pdev)
imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565;
else if (!strcmp(fmt, bgr666))
imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666;
+   else if (!strcmp(fmt, rgb666))
+   imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666;
}
 
imxpd-dev = pdev-dev;
-- 
1.7.9.5

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


re: [media] media: i2c: add driver for dual LED Flash, lm3560

2013-11-13 Thread Dan Carpenter
Hello Daniel Jeong,

The patch 7f6b11a18c30: [media] media: i2c: add driver for dual LED
Flash, lm3560 from Oct 16, 2013, leads to the following
static checker warning: drivers/media/i2c/lm3560.c:196
lm3560_get_ctrl()
 warn: inconsistent returns mutex:flash-lock: locked (184
[s32min-(-1)], 192 [0]) unlocked (196 [(-22)])

drivers/media/i2c/lm3560.c
   171  /* V4L2 controls  */
   172  static int lm3560_get_ctrl(struct v4l2_ctrl *ctrl, enum lm3560_led_id 
led_no)
   173  {
   174  struct lm3560_flash *flash = to_lm3560_flash(ctrl, led_no);
   175  
   176  mutex_lock(flash-lock);
   177  
   178  if (ctrl-id == V4L2_CID_FLASH_FAULT) {
   179  int rval;
   180  s32 fault = 0;
   181  unsigned int reg_val;
   182  rval = regmap_read(flash-regmap, REG_FLAG, reg_val);
   183  if (rval  0)
   184  return rval;

Some negative returns mean we are holding the lock.

   185  if (rval  FAULT_SHORT_CIRCUIT)
   186  fault |= V4L2_FLASH_FAULT_SHORT_CIRCUIT;
   187  if (rval  FAULT_OVERTEMP)
   188  fault |= V4L2_FLASH_FAULT_OVER_TEMPERATURE;
   189  if (rval  FAULT_TIMEOUT)
   190  fault |= V4L2_FLASH_FAULT_TIMEOUT;
   191  ctrl-cur.val = fault;
   192  return 0;

Positive means we are holding the lock.

   193  }
   194  
   195  mutex_unlock(flash-lock);
   196  return -EINVAL;

Some mean we unlocked.

   197  }

I also worry that this might be a double lock deadlock because the
caller already holds the lock in get_ctrl(), but I don't know the code
very well.

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


[GIT PULL FOR v3.14] OMAP4 ISS driver

2013-11-13 Thread Laurent Pinchart
Hello,

Here's a pull request for v3.14 that adds a driver for the OMAP4 ISS (camera 
interface). It supersedes the v3.13 pull request for the same driver.

The driver has been posted for review on the linux-media@vger.kernel.org 
mailing list. I believe I have addressed all the review comments, and all the 
patches have been acked by Hans Verkuil.

I'll work on cleaning up the code and getting the driver out of staging in the 
next couple of kernel versions.

The following changes since commit 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52:

  Linux 3.12 (2013-11-03 15:41:51 -0800)

are available in the git repository at:

  git://linuxtv.org/pinchartl/media.git omap4iss/next

for you to fetch changes up to ccd8ce12d77444e0e2ee092dd5d5e56c2bf928a1:

  v4l: omap4iss: Implement VIDIOC_S_INPUT (2013-11-04 14:19:43 +0100)


Laurent Pinchart (17):
  v4l: omap4iss: Add support for OMAP4 camera interface - Build system
  v4l: omap4iss: Don't use v4l2_g_ext_ctrls() internally
  v4l: omap4iss: Move common code out of switch...case
  v4l: omap4iss: Report device caps in response to VIDIOC_QUERYCAP
  v4l: omap4iss: Remove iss_video streaming field
  v4l: omap4iss: Set the vb2 timestamp type
  v4l: omap4iss: Remove duplicate video_is_registered() check
  v4l: omap4iss: Remove unneeded status variable
  v4l: omap4iss: Replace udelay/msleep with usleep_range
  v4l: omap4iss: Make omap4iss_isp_subclk_(en|dis)able() functions void
  v4l: omap4iss: Make loop counters unsigned where appropriate
  v4l: omap4iss: Don't initialize fields to 0 manually
  v4l: omap4iss: Simplify error paths
  v4l: omap4iss: Don't check for missing get_fmt op on remote subdev
  v4l: omap4iss: Translate -ENOIOCTLCMD to -ENOTTY
  v4l: omap4iss: Move code out of mutex-protected section
  v4l: omap4iss: Implement VIDIOC_S_INPUT

Sergio Aguirre (5):
  v4l: omap4iss: Add support for OMAP4 camera interface - Core
  v4l: omap4iss: Add support for OMAP4 camera interface - Video devices
  v4l: omap4iss: Add support for OMAP4 camera interface - CSI receivers
  v4l: omap4iss: Add support for OMAP4 camera interface - IPIPE(IF)
  v4l: omap4iss: Add support for OMAP4 camera interface - Resizer

 Documentation/video4linux/omap4_camera.txt   |   60 ++
 drivers/staging/media/Kconfig|2 +
 drivers/staging/media/Makefile   |1 +
 drivers/staging/media/omap4iss/Kconfig   |   12 +
 drivers/staging/media/omap4iss/Makefile  |6 +
 drivers/staging/media/omap4iss/TODO  |4 +
 drivers/staging/media/omap4iss/iss.c | 1462 +
 drivers/staging/media/omap4iss/iss.h |  153 
 drivers/staging/media/omap4iss/iss_csi2.c| 1368 +
 drivers/staging/media/omap4iss/iss_csi2.h|  156 
 drivers/staging/media/omap4iss/iss_csiphy.c  |  278 +++
 drivers/staging/media/omap4iss/iss_csiphy.h  |   51 ++
 drivers/staging/media/omap4iss/iss_ipipe.c   |  581 ++
 drivers/staging/media/omap4iss/iss_ipipe.h   |   67 ++
 drivers/staging/media/omap4iss/iss_ipipeif.c |  847 
 drivers/staging/media/omap4iss/iss_ipipeif.h |   92 +++
 drivers/staging/media/omap4iss/iss_regs.h|  883 
 drivers/staging/media/omap4iss/iss_resizer.c |  905 +
 drivers/staging/media/omap4iss/iss_resizer.h |   75 ++
 drivers/staging/media/omap4iss/iss_video.c   | 1128 +
 drivers/staging/media/omap4iss/iss_video.h   |  198 +
 include/media/omap4iss.h |   65 ++
 22 files changed, 8394 insertions(+)
 create mode 100644 Documentation/video4linux/omap4_camera.txt
 create mode 100644 drivers/staging/media/omap4iss/Kconfig
 create mode 100644 drivers/staging/media/omap4iss/Makefile
 create mode 100644 drivers/staging/media/omap4iss/TODO
 create mode 100644 drivers/staging/media/omap4iss/iss.c
 create mode 100644 drivers/staging/media/omap4iss/iss.h
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.h
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.h
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipe.c
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipe.h
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipeif.c
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipeif.h
 create mode 100644 drivers/staging/media/omap4iss/iss_regs.h
 create mode 100644 drivers/staging/media/omap4iss/iss_resizer.c
 create mode 100644 drivers/staging/media/omap4iss/iss_resizer.h
 create mode 100644 drivers/staging/media/omap4iss/iss_video.c
 create mode 100644 drivers/staging/media/omap4iss/iss_video.h
 create mode 100644 include/media/omap4iss.h

-- 
Regards,

Laurent Pinchart

--

[PATCH 1/2] cx23885 Radio Support [was: cx23885: Add basic analog radio support]

2013-11-13 Thread Alfredo Jesús Delaiti
Hi Mauro and all

El 31/10/13 07:12, Mauro Carvalho Chehab escribió:

 Hi Alfredo,

 My understanding is that the patch you've enclosed is incomplete and
 depends on Miroslav's patch.

 As he have you his ack to rework on it, could you please prepare a
 patch series addressing the above comments for us to review?

 Than

This patch supports only radio is for CX23885

I've only applied to current git version of V4L, and I've also removed the 
lines that support two cards in particular.

The original patch is: https://linuxtv.org/patch/9498/

I found the following issue

Details of the issue:

Some warning when compiling

...
   CC [M] /home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-video.o
/home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-video.c:1910:8: : 
initialization from incompatible pointer type [enabled by default]
/home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-video.c:1910:8: 
warning: (near initialization for 'radio_ioctl_ops.vidioc_s_tuner') [enabled by 
default]
/home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-video.c:1911:8: 
warning: initialization from incompatible pointer type [enabled by default]
/home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-video.c:1911:8: 
warning: (near initialization for 'radio_ioctl_ops.vidioc_s_audio') [enabled by 
default]
   CC [M] /home/alfredo/ISDB/Nuevo_Driver/git/media_build/v4l/cx23885-vbi.o
...


static const struct v4l2_ioctl_ops radio_ioctl_ops = {

.vidioc_s_tuner   = radio_s_tuner, /* line 1910 */
.vidioc_s_audio   = radio_s_audio, /* line 1911 */





Signed-off-by: Miroslav Slugen thunder@gmail.com
Tested-by: Alfredo J. Delaiti alfredodela...@netscape.net

diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
index 7891f34..9eed6fe 100644
--- a/drivers/media/pci/cx23885/cx23885-video.c
+++ b/drivers/media/pci/cx23885/cx23885-video.c
@@ -889,6 +889,8 @@ static int video_open(struct file *file)
 	fh-width= 320;
 	fh-height   = 240;
 	fh-fmt  = format_by_fourcc(V4L2_PIX_FMT_YUYV);
+	
+	mutex_lock(dev-lock);
 
 	videobuf_queue_sg_init(fh-vidq, cx23885_video_qops,
 			dev-pci-dev, dev-slock,
@@ -904,6 +906,14 @@ static int video_open(struct file *file)
 		sizeof(struct cx23885_buffer),
 		fh, NULL);
 
+   if (fh-radio) {
+   dprintk(1,video_open: setting radio device\n);
+   cx_write(GPIO_0, cx23885_boards[dev-board].radio.gpio0);
+   call_all(dev, tuner, s_radio);
+   }
+
+   dev-users++;
+   mutex_unlock(dev-lock);
 
 	dprintk(1, post videobuf_queue_init()\n);
 
@@ -1001,15 +1011,26 @@ static int video_release(struct file *file)
 
 	videobuf_mmap_free(fh-vidq);
 	videobuf_mmap_free(fh-vbiq);
+	
+	mutex_lock(dev-lock);
 
 	file-private_data = NULL;
 	kfree(fh);
+	
+	dev-users--;
 
 	/* We are not putting the tuner to sleep here on exit, because
 	 * we want to use the mpeg encoder in another session to capture
 	 * tuner video. Closing this will result in no video to the encoder.
 	 */
 
+#if 0
+   if (!dev-users)
+   call_all(dev, core, s_power, 0);
+   #endif
+
+   mutex_unlock(dev-lock);
+
 	return 0;
 }
 
@@ -1635,6 +1656,106 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 
 /* --- */
 
+/*  RADIO ESPECIFIC IOCTLS */
+
+static int radio_querycap (struct file *file, void  *priv,
+   struct v4l2_capability *cap)
+{
+   struct cx23885_dev *dev  = ((struct cx23885_fh *)priv)-dev;
+
+   strcpy(cap-driver, cx23885);
+   strlcpy(cap-card, cx23885_boards[dev-board].name, sizeof(cap-card));
+   sprintf(cap-bus_info,PCIe:%s, pci_name(dev-pci));
+   cap-capabilities = V4L2_CAP_TUNER;
+   return 0;
+}
+
+static int radio_g_tuner (struct file *file, void *priv,
+   struct v4l2_tuner *t)
+{
+   struct cx23885_dev *dev  = ((struct cx23885_fh *)priv)-dev;
+
+   if (unlikely(t-index  0))
+   return -EINVAL;
+
+   strcpy(t-name, Radio);
+   t-type = V4L2_TUNER_RADIO;
+
+   call_all(dev, tuner, g_tuner, t);
+   return 0;
+}
+
+static int radio_enum_input (struct file *file, void *priv,
+   struct v4l2_input *i)
+{
+   if (i-index != 0)
+   return -EINVAL;
+   strcpy(i-name,Radio);
+   i-type = V4L2_INPUT_TYPE_TUNER;
+
+   return 0;
+}
+
+static int radio_g_audio (struct file *file, void *priv, struct v4l2_audio *a)
+{
+   if (unlikely(a-index))
+   return -EINVAL;
+
+   strcpy(a-name,Radio);
+   return 0;
+}
+
+/* FIXME: Should add a standard for radio */
+
+static int radio_s_tuner (struct file *file, void *priv,
+   

[PATCH 2/2] X8502/8507 Radio Support [was: cx23885: Add basic analog radio support]

2013-11-13 Thread Alfredo Jesús Delaiti

Hi Mauro and all

El 31/10/13 07:12, Mauro Carvalho Chehab escribió:
Hi Alfredo, My understanding is that the patch you've enclosed is 
incomplete and depends on Miroslav's patch. As he have you his ack to 
rework on it, could you please prepare a patch series addressing the 
above comments for us to review? Than 




I tested this patch with the latest versions of git.


I found some issue, although it may be through a bad implementation of 
mine. Details of them:


1) No reports signal strength or stereo signal with KRadio. XC5000 
neither reported (modprobe xc5000 debug=1). Maybe a feature XC5000.
To listen in stereo, sometimes, you have to turn on the Digital TV then 
Analog TV and then radio.


2) To listen Analog TV I need changed to NTSC standard and then PAL-Nc 
(the norm in my country is PAL-Nc). If I leave the tune in NTSC no 
problem with sound. The patch (https://linuxtv.org/patch/9505/) corrects 
the latter, but not always.


3) If I see-Digital TV (ISDB-T), then so as to listen the radio I have 
first put the TV-Analog, because I hear very low and a strong white noise.
The latter is likely to be corrected by resetting the tuner, but I have 
not been able to do.


Thank you,

Alfredo


Signed-off-by: Alfredo J. Delaitialfredodela...@netscape.net

diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index 79f20c8..f97002a 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -574,6 +574,8 @@ struct cx23885_board cx23885_boards[] = {
 		.name		= Mygica X8502/X8507 ISDB-T,
 		.tuner_type = TUNER_XC5000,
 		.tuner_addr = 0x61,
+		.radio_type	= TUNER_XC5000,
+		.radio_addr	= 0x61,
 		.tuner_bus	= 1,
 		.porta		= CX23885_ANALOG_VIDEO,
 		.portb		= CX23885_MPEG_DVB,
@@ -603,6 +605,10 @@ struct cx23885_board cx23885_boards[] = {
 .amux   = CX25840_AUDIO7,
 			},
 		},
+		.radio = {
+.type= CX23885_RADIO,
+.amux= CX25840_AUDIO8,
+			},
 	},
 	[CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL] = {
 		.name		= TerraTec Cinergy T PCIe Dual,
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 0549205..b09d97f 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -505,6 +505,7 @@ static struct mb86a20s_config mygica_x8507_mb86a20s_config = {
 static struct xc5000_config mygica_x8507_xc5000_config = {
 	.i2c_address = 0x61,
 	.if_khz = 4000,
+	.radio_input = XC5000_RADIO_FM1,
 };
 
 static struct stv090x_config prof_8000_stv090x_config = {


Re: [PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.

2013-11-13 Thread Troy Kisky

On 11/13/2013 2:23 AM, Denis Carikli wrote:
  
+	/* rgb666 */

+   ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
+   ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
+
return 0;
  }
  



Since,  rgb24 and bgr24 reverse the byte numbers
/* rgb24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_RGB24);
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 0, 7, 0xff); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 2, 23, 0xff); /* red */

/* bgr24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */


Shouldn't rgb666 and bgr666 do the same?
Currently we have,

/* bgr666 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* 
green */

ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */

Where I'd expect to see
/* bgr666 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* 
green */

ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */


So, it looks like you are adding a duplicate of bgr666 because bgr666 is 
wrong.
Also, I'd prefer to keep the entries in 0,1,2 byte number order(blue, 
green, red,

assuming byte 0 is always blue) so that duplicates are easier to spot.

Not related to this patch, but the comments on gbr24 appear wrong as well.

/* gbr24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_GBR24);
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 2, 15, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 1, 7, 0xff); /* blue */
ipu_dc_map_config(priv, IPU_DC_MAP_GBR24, 0, 23, 0xff); /* red */

Should be
/* brg24 */
ipu_dc_map_clear(priv, IPU_DC_MAP_BRG24);
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 0, 23, 0xff); /* blue*/
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 1, 7, 0xff); /* green */
ipu_dc_map_config(priv, IPU_DC_MAP_BRG24, 2, 15, 0xff); /* red */

Of course, my understanding may be totally wrong. If so, please show me 
the light!



Troy

--
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: [PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.

2013-11-13 Thread Russell King - ARM Linux
On Wed, Nov 13, 2013 at 11:43:44AM -0700, Troy Kisky wrote:
 On 11/13/2013 2:23 AM, Denis Carikli wrote:
   +  /* rgb666 */
 +ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
 +ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
 +ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
 +ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
 +
  return 0;
   }
   


 Since,  rgb24 and bgr24 reverse the byte numbers
 /* rgb24 */
 ipu_dc_map_clear(priv, IPU_DC_MAP_RGB24);
 ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 0, 7, 0xff); /* blue */
 ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 1, 15, 0xff); /* green */
 ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 2, 23, 0xff); /* red */

 /* bgr24 */
 ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */




 Shouldn't rgb666 and bgr666 do the same?
 Currently we have,

 /* bgr666 */
 ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*  
 green */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */

Yes, I concur - this doesn't make sense to me.  BGR666 would mean in
memory:

111
721650
BBGGRR

which reflects the same order for RGB24 above.

 Where I'd expect to see
 /* bgr666 */
 ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*  
 green */
 ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */

So this makes sense to me.
--
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: [PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.

2013-11-13 Thread Laurent Pinchart
Hi Russell,

On Wednesday 13 November 2013 19:12:30 Russell King - ARM Linux wrote:
 On Wed, Nov 13, 2013 at 11:43:44AM -0700, Troy Kisky wrote:
  On 11/13/2013 2:23 AM, Denis Carikli wrote:
+/* rgb666 */
  
  +  ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666);
  +  ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */
  +  ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */
  +  ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */
  +
 return 0;
}
  
  Since,  rgb24 and bgr24 reverse the byte numbers
  /* rgb24 */
  ipu_dc_map_clear(priv, IPU_DC_MAP_RGB24);
  ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 0, 7, 0xff); /* blue */
  ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 1, 15, 0xff); /* green
  */
  ipu_dc_map_config(priv, IPU_DC_MAP_RGB24, 2, 23, 0xff); /* red */
  
  /* bgr24 */
  ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24);
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 2, 7, 0xff); /* red */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green
  */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */
  
  Shouldn't rgb666 and bgr666 do the same?
  Currently we have,
  
  /* bgr666 */
  ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*
  green */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */
 
 Yes, I concur - this doesn't make sense to me.  BGR666 would mean in
 memory:
 
 111
 721650
 BBGGRR
 
 which reflects the same order for RGB24 above.

Beside component order and number of bits per component, an in-memory RGB 
format also defines the memory endianness and, for formats that don't span an 
interger number of bytes, the left or right alignment.

BGR666 is currently defined in V4L2 as

Byte 0 12
Bit  7  6  5  4  3  2  1  07  6  5  4  3  2  1  0   7  6  5  4  3  2  1  0

 b5 b4 b3 b2 b1 b0 g5 g4  g3 g2 g1 g0 r5 r4 r3 r2  r1 r0  -  -  -  -  -  -

(see the *second* table in 
http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html)

I would thus expect RGB666 to be

Byte 0 12
Bit  7  6  5  4  3  2  1  07  6  5  4  3  2  1  0   7  6  5  4  3  2  1  0

 r5 r4 r3 r2 r1 r0 g5 g4  g3 g2 g1 g0 b5 b4 b3 b2  b1 b0  -  -  -  -  -  -

We can also define right-aligned formats if needed.

  Where I'd expect to see
  /* bgr666 */
  
  ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666);
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue
  */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /*
  green */
  ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */
 
 So this makes sense to me.

-- 
Regards,

Laurent Pinchart

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


[GIT PULL] git://linuxtv.org/mkrufky/dvb cx24117

2013-11-13 Thread Michael Krufky
The following changes since commit
80f93c7b0f4599ffbdac8d964ecd1162b8b618b9:

  [media] media: st-rc: Add ST remote control driver (2013-10-31
  08:20:08 -0200)

are available in the git repository at:

  git://linuxtv.org/mkrufky/dvb cx24117

for you to fetch changes up to 1c468cec3701eb6e26c4911f8a9e8e35cbdebc01:

  cx24117: Fix LNB set_voltage function (2013-11-13 13:06:44 -0500)


Luis Alves (2):
  cx24117: Add complete demod command list
  cx24117: Fix LNB set_voltage function

 drivers/media/dvb-frontends/cx24117.c | 121
 -- 1 file changed, 71 insertions(+),
 50 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


[PATCH] dw2102: Geniatech T220 support

2013-11-13 Thread CrazyCat
Support for Geniatech T220 DVB-T/T2/C USB stick.

Signed-off-by: Evgeny Plehov evgenyple...@ukr.net
---
diff --git a/drivers/media/usb/dvb-usb/dw2102.c 
b/drivers/media/usb/dvb-usb/dw2102.c
index 6136a2c..12e00aa 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -2,7 +2,7 @@
  * DVBWorld DVB-S 2101, 2102, DVB-S2 2104, DVB-C 3101,
  * TeVii S600, S630, S650, S660, S480, S421, S632
  * Prof 1100, 7500,
- * Geniatech SU3000 Cards
+ * Geniatech SU3000, T220 Cards
  * Copyright (C) 2008-2012 Igor M. Liplianin (liplia...@me.by)
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
 #include stb6100.h
 #include stb6100_proc.h
 #include m88rs2000.h
+#include tda18271.h
+#include cxd2820r.h
 
 #ifndef USB_PID_DW2102
 #define USB_PID_DW2102 0x2102
@@ -1025,6 +1027,16 @@ static struct ds3000_config su3000_ds3000_config = {
.set_lock_led = dw210x_led_ctrl,
 };
 
+static struct cxd2820r_config cxd2820r_config = {
+   .i2c_address = 0x6c, /* (0xd8  1) */
+   .ts_mode = 0x38,
+};
+
+static struct tda18271_config tda18271_config = {
+   .output_opt = TDA18271_OUTPUT_LT_OFF,
+   .gate = TDA18271_GATE_DIGITAL,
+};
+
 static u8 m88rs2000_inittab[] = {
DEMOD_WRITE, 0x9a, 0x30,
DEMOD_WRITE, 0x00, 0x01,
@@ -1294,6 +1306,49 @@ static int su3000_frontend_attach(struct dvb_usb_adapter 
*d)
return -EIO;
 }
 
+static int t220_frontend_attach(struct dvb_usb_adapter *d)
+{
+   u8 obuf[3] = { 0xe, 0x80, 0 };
+   u8 ibuf[] = { 0 };
+
+   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] = 0;
+
+   if (dvb_usb_generic_rw(d-dev, obuf, 3, ibuf, 1, 0)  0)
+   err(command 0x0e transfer failed.);
+
+   msleep(100);
+
+   obuf[0] = 0xe;
+   obuf[1] = 0x80;
+   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(cxd2820r_attach, cxd2820r_config,
+   d-dev-i2c_adap, NULL);
+   if (d-fe_adap[0].fe != NULL) {
+   if (dvb_attach(tda18271_attach, d-fe_adap[0].fe, 0x60,
+   d-dev-i2c_adap, tda18271_config)) {
+   info(Attached TDA18271HD/CXD2820R!\n);
+   return 0;
+   }
+   }
+
+   info(Failed to attach TDA18271HD/CXD2820R!\n);
+   return -EIO;
+}
+
 static int m88rs2000_frontend_attach(struct dvb_usb_adapter *d)
 {
u8 obuf[] = { 0x51 };
@@ -1560,6 +1615,7 @@ enum dw2102_table_entry {
TEVII_S632,
TERRATEC_CINERGY_S2_R2,
GOTVIEW_SAT_HD,
+   GENIATECH_T220,
 };
 
 static struct usb_device_id dw2102_table[] = {
@@ -1582,6 +1638,7 @@ static struct usb_device_id dw2102_table[] = {
[TEVII_S632] = {USB_DEVICE(0x9022, USB_PID_TEVII_S632)},
[TERRATEC_CINERGY_S2_R2] = {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)},
[GOTVIEW_SAT_HD] = {USB_DEVICE(0x1FE1, USB_PID_GOTVIEW_SAT_HD)},
+   [GENIATECH_T220] = {USB_DEVICE(0x1f4d, 0xD220)},
{ }
 };
 
@@ -2007,6 +2064,54 @@ static struct dvb_usb_device_properties 
su3000_properties = {
}
 };
 
+static struct dvb_usb_device_properties t220_properties = {
+   .caps = DVB_USB_IS_AN_I2C_ADAPTER,
+   .usb_ctrl = DEVICE_SPECIFIC,
+   .size_of_priv = sizeof(struct su3000_state),
+   .power_ctrl = su3000_power_ctrl,
+   .num_adapters = 1,
+   .identify_state = su3000_identify_state,
+   .i2c_algo = su3000_i2c_algo,
+
+   .rc.legacy = {
+   .rc_map_table = rc_map_su3000_table,
+   .rc_map_size = ARRAY_SIZE(rc_map_su3000_table),
+   .rc_interval = 150,
+   .rc_query = dw2102_rc_query,
+   },
+
+   .read_mac_address = su3000_read_mac_address,
+
+   .generic_bulk_ctrl_endpoint = 0x01,
+
+   .adapter = {
+   {
+   .num_frontends = 1,
+   .fe = { {
+   .streaming_ctrl   = su3000_streaming_ctrl,
+   .frontend_attach  = t220_frontend_attach,
+   .stream = {
+   .type = USB_BULK,
+   .count = 8,
+   .endpoint = 0x82,
+   .u = {
+   .bulk = {
+   .buffersize = 4096,
+   }
+   }
+   }
+   } },
+   }
+   },
+   .num_device_descs = 1,
+   .devices = {
+ 

[PATCH] dw2102: Use RC Core instead of the legacy RC.

2013-11-13 Thread CrazyCat
Use RC Core instead of the legacy RC

Signed-off-by: Evgeny Plehov evgenyple...@ukr.net
---
diff --git a/drivers/media/rc/keymaps/Makefile 
b/drivers/media/rc/keymaps/Makefile
index b1cde8c..0b8c549 100644
--- a/drivers/media/rc/keymaps/Makefile
+++ b/drivers/media/rc/keymaps/Makefile
@@ -98,4 +98,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-videomate-s350.o \
rc-videomate-tv-pvr.o \
rc-winfast.o \
-   rc-winfast-usbii-deluxe.o
+   rc-winfast-usbii-deluxe.o \
+   rc-su3000.o
diff --git a/drivers/media/rc/keymaps/rc-su3000.c 
b/drivers/media/rc/keymaps/rc-su3000.c
new file mode 100644
index 000..8b14bdd
--- /dev/null
+++ b/drivers/media/rc/keymaps/rc-su3000.c
@@ -0,0 +1,77 @@
+/* tbs-nec.h - Keytable for tbs_nec Remote Controller
+ *
+ * keymap imported from ir-keymaps.c
+ *
+ * Copyright (c) 2010 by Mauro Carvalho Chehab mche...@redhat.com
+ *
+ * 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
+
+static struct rc_map_table su3000[] = {
+   { 0x25, KEY_POWER },/* right-bottom Red */
+   { 0x0a, KEY_MUTE }, /* -/-- */
+   { 0x01, KEY_1 },
+   { 0x02, KEY_2 },
+   { 0x03, KEY_3 },
+   { 0x04, KEY_4 },
+   { 0x05, KEY_5 },
+   { 0x06, KEY_6 },
+   { 0x07, KEY_7 },
+   { 0x08, KEY_8 },
+   { 0x09, KEY_9 },
+   { 0x00, KEY_0 },
+   { 0x20, KEY_UP },   /* CH+ */
+   { 0x21, KEY_DOWN }, /* CH+ */
+   { 0x12, KEY_VOLUMEUP }, /* Brightness Up */
+   { 0x13, KEY_VOLUMEDOWN },/* Brightness Down */
+   { 0x1f, KEY_RECORD },
+   { 0x17, KEY_PLAY },
+   { 0x16, KEY_PAUSE },
+   { 0x0b, KEY_STOP },
+   { 0x27, KEY_FASTFORWARD },/*  */
+   { 0x26, KEY_REWIND },   /*  */
+   { 0x0d, KEY_OK },   /* Mute */
+   { 0x11, KEY_LEFT }, /* VOL- */
+   { 0x10, KEY_RIGHT },/* VOL+ */
+   { 0x29, KEY_BACK }, /* button under 9 */
+   { 0x2c, KEY_MENU }, /* TTX */
+   { 0x2b, KEY_EPG },  /* EPG */
+   { 0x1e, KEY_RED },  /* OSD */
+   { 0x0e, KEY_GREEN },/* Window */
+   { 0x2d, KEY_YELLOW },   /* button under  */
+   { 0x0f, KEY_BLUE }, /* bottom yellow button */
+   { 0x14, KEY_AUDIO },/* Snapshot */
+   { 0x38, KEY_TV },   /* TV/Radio */
+   { 0x0c, KEY_ESC }   /* upper Red button */
+};
+
+static struct rc_map_list su3000_map = {
+   .map = {
+   .scan= su3000,
+   .size= ARRAY_SIZE(su3000),
+   .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
+   .name= RC_MAP_SU3000,
+   }
+};
+
+static int __init init_rc_map_su3000(void)
+{
+   return rc_map_register(su3000_map);
+}
+
+static void __exit exit_rc_map_su3000(void)
+{
+   rc_map_unregister(su3000_map);
+}
+
+module_init(init_rc_map_su3000)
+module_exit(exit_rc_map_su3000)
+
+MODULE_LICENSE(GPL);
+MODULE_AUTHOR(Mauro Carvalho Chehab mche...@redhat.com);
diff --git a/drivers/media/usb/dvb-usb/dw2102.c 
b/drivers/media/usb/dvb-usb/dw2102.c
index 12e00aa..8400238 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -109,11 +109,6 @@
Please see linux/Documentation/dvb/ for more details  \
on firmware-problems.
 
-struct rc_map_dvb_usb_table_table {
-   struct rc_map_table *rc_keys;
-   int rc_keys_size;
-};
-
 struct su3000_state {
u8 initialized;
 };
@@ -128,12 +123,6 @@ module_param_named(debug, dvb_usb_dw2102_debug, int, 0644);
 MODULE_PARM_DESC(debug, set debugging level (1=info 2=xfer 4=rc(or-able)).
DVB_USB_DEBUG_STATUS);
 
-/* keymaps */
-static int ir_keymap;
-module_param_named(keymap, ir_keymap, int, 0644);
-MODULE_PARM_DESC(keymap, set keymap 0=default 1=dvbworld 2=tevii 3=tbs  ...
-256=none);
-
 /* demod probe */
 static int demod_probe = 1;
 module_param_named(demod, demod_probe, int, 0644);
@@ -1389,174 +1378,8 @@ static int dw3101_tuner_attach(struct dvb_usb_adapter 
*adap)
return 0;
 }
 
-static struct rc_map_table rc_map_dw210x_table[] = {
-   { 0xf80a, KEY_POWER2 }, /*power*/
-   { 0xf80c, KEY_MUTE },   /*mute*/
-   { 0xf811, KEY_1 },
-   { 0xf812, KEY_2 },
-   { 0xf813, KEY_3 },
-   { 0xf814, KEY_4 },
-   { 0xf815, KEY_5 },
-   { 0xf816, KEY_6 },
-   { 0xf817, KEY_7 },
-   { 0xf818, KEY_8 },
-   { 0xf819, KEY_9 },
-   { 0xf810, KEY_0 },
-   { 0xf81c, KEY_CHANNELUP },  /*ch+*/
-   { 0xf80f, KEY_CHANNELDOWN },/*ch-*/
-   { 0xf81a, KEY_VOLUMEUP 

cron job: media_tree daily build: WARNINGS

2013-11-13 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 Nov 14 04:00:27 CET 2013
git branch: test
git hash:   80f93c7b0f4599ffbdac8d964ecd1162b8b618b9
gcc version:i686-linux-gcc (GCC) 4.8.1
sparse version: 0.4.5-rc1
host hardware:  x86_64
host os:3.12-0.slh.1-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.31.14-i686: OK
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12-i686: OK
linux-2.6.31.14-x86_64: OK
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12-x86_64: OK
apps: WARNINGS
spec-git: OK
sparse version: 0.4.5-rc1
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 Media Infrastructure API from this daily build is here:

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


[PATCH -next] [media] media: i2c: lm3560: fix missing unlock error in lm3560_get_ctrl().

2013-11-13 Thread Daniel Jeong
Add the missing unlock before return from function lm3560_get_ctrl()
to avoid deadlock. Thanks to Dan Carpenter.

Signed-off-by: Daniel Jeong gshark.je...@gmail.com
---
 drivers/media/i2c/lm3560.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c
index 3317a9a..5d6eef0 100644
--- a/drivers/media/i2c/lm3560.c
+++ b/drivers/media/i2c/lm3560.c
@@ -172,16 +172,16 @@ static int lm3560_flash_brt_ctrl(struct lm3560_flash 
*flash,
 static int lm3560_get_ctrl(struct v4l2_ctrl *ctrl, enum lm3560_led_id led_no)
 {
struct lm3560_flash *flash = to_lm3560_flash(ctrl, led_no);
+   int rval = -EINVAL;
 
mutex_lock(flash-lock);
 
if (ctrl-id == V4L2_CID_FLASH_FAULT) {
-   int rval;
s32 fault = 0;
unsigned int reg_val;
rval = regmap_read(flash-regmap, REG_FLAG, reg_val);
if (rval  0)
-   return rval;
+   goto out;
if (rval  FAULT_SHORT_CIRCUIT)
fault |= V4L2_FLASH_FAULT_SHORT_CIRCUIT;
if (rval  FAULT_OVERTEMP)
@@ -189,11 +189,11 @@ static int lm3560_get_ctrl(struct v4l2_ctrl *ctrl, enum 
lm3560_led_id led_no)
if (rval  FAULT_TIMEOUT)
fault |= V4L2_FLASH_FAULT_TIMEOUT;
ctrl-cur.val = fault;
-   return 0;
}
 
+out:
mutex_unlock(flash-lock);
-   return -EINVAL;
+   return rval;
 }
 
 static int lm3560_set_ctrl(struct v4l2_ctrl *ctrl, enum lm3560_led_id led_no)
-- 
1.7.9.5

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