Re: [PATCH 4/4] s5p-mfc: Change internal buffer allocation from vb2 ops to dma_alloc_coherent

2012-11-03 Thread Arun Kumar K
Hi Kamil,

I found an issue while testing this patch on Exynos4.


On Wed, Oct 24, 2012 at 7:45 PM, Kamil Debski k.deb...@samsung.com wrote:
 Change internal buffer allocation from vb2 memory ops call to direct
 calls of dma_alloc_coherent. This change shortens the code and makes it
 much more readable.

 Signed-off-by: Kamil Debski k.deb...@samsung.com
 Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com
 ---
  drivers/media/platform/s5p-mfc/s5p_mfc_common.h |   20 +--
  drivers/media/platform/s5p-mfc/s5p_mfc_opr.c|   30 
  drivers/media/platform/s5p-mfc/s5p_mfc_opr.h|5 +
  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c |  198 
 ---
  drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c |  121 +-
  5 files changed, 144 insertions(+), 230 deletions(-)


[snip]

  /* Allocate memory for instance data buffer */
 @@ -233,58 +204,38 @@ int s5p_mfc_alloc_instance_buffer_v5(struct s5p_mfc_ctx 
 *ctx)
  {
 struct s5p_mfc_dev *dev = ctx-dev;
 struct s5p_mfc_buf_size_v5 *buf_size = dev-variant-buf_size-priv;
 +   int ret;

 if (ctx-codec_mode == S5P_MFC_CODEC_H264_DEC ||
 ctx-codec_mode == S5P_MFC_CODEC_H264_ENC)
 ctx-ctx.size = buf_size-h264_ctx;
 else
 ctx-ctx.size = buf_size-non_h264_ctx;
 -   ctx-ctx.alloc = vb2_dma_contig_memops.alloc(
 -   dev-alloc_ctx[MFC_BANK1_ALLOC_CTX], ctx-ctx.size);
 -   if (IS_ERR(ctx-ctx.alloc)) {
 -   mfc_err(Allocating context buffer failed\n);
 -   ctx-ctx.alloc = NULL;
 -   return -ENOMEM;
 -   }
 -   ctx-ctx.dma = s5p_mfc_mem_cookie(
 -   dev-alloc_ctx[MFC_BANK1_ALLOC_CTX], ctx-ctx.alloc);
 -   BUG_ON(ctx-ctx.dma  ((1  MFC_BANK1_ALIGN_ORDER) - 1));
 -   ctx-ctx.ofs = OFFSETA(ctx-ctx.dma);
 -   ctx-ctx.virt = vb2_dma_contig_memops.vaddr(ctx-ctx.alloc);
 -   if (!ctx-ctx.virt) {
 -   mfc_err(Remapping instance buffer failed\n);
 -   vb2_dma_contig_memops.put(ctx-ctx.alloc);
 -   ctx-ctx.alloc = NULL;
 -   ctx-ctx.ofs = 0;
 -   ctx-ctx.dma = 0;
 -   return -ENOMEM;
 +
 +   ret = s5p_mfc_alloc_priv_buf(dev-mem_dev_l, ctx-ctx);
 +   if (ret) {
 +   mfc_err(Failed to allocate instance buffer\n);
 +   return ret;
 }
 +   ctx-ctx.ofs = ctx-ctx.dma - dev-bank1;
 +

Here the original code does  ctx-ctx.ofs = OFFSETA(ctx-ctx.dma);
The macro OFFSETA also does a right shift of MFC_OFFSET_SHIFT.
Without this change, the decoding is not working on Exynos4.


 /* Zero content of the allocated memory */
 memset(ctx-ctx.virt, 0, ctx-ctx.size);
 wmb();



All these patches are working well on Exynos5.

Regards
Arun
--
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] firedtv: add MAINTAINERS entry

2012-11-03 Thread Stefan Richter
There is currently discussion to add MAINTAINERS records for media
drivers that don't have one yet, possibly with 'orphan' or 'odd fixes'
status.  Here is a proper entry for the firedtv driver (for 1394
attached DVB STBs and 1394 attached DVB cards from Digital Everywhere).

The L: linux-media and T: linux-media.git lines in this entry are
redundant to what scripts/get_maintainer.pl would show automatically but
I added them for folks who read MAINTAINERS directly.  The (firedtv)
string is for those folks as well if they look for driver name rather
than file path.

The F: drivers/media/firewire/ pattern and the FireWire media drivers
title are currently synonymous with firedtv.  If more drivers get added
there, this can be revisited.

I don't have documentation or DVB-S2 devices to test, but I have DVB-C
and DVB-T devices for testing.

Signed-off-by: Stefan Richter stef...@s5r6.in-berlin.de
---
 MAINTAINERS |8 
 1 file changed, 8 insertions(+)

--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3041,6 +3041,14 @@ T:   git git://git.alsa-project.org/alsa-k
 S: Maintained
 F: sound/firewire/
 
+FIREWIRE MEDIA DRIVERS (firedtv)
+M: Stefan Richter stef...@s5r6.in-berlin.de
+L: linux-media@vger.kernel.org
+L: linux1394-de...@lists.sourceforge.net
+T: git 
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git
+S: Maintained
+F: drivers/media/firewire/
+
 FIREWIRE SBP-2 TARGET
 M: Chris Boot bo...@bootc.net
 L: linux-s...@vger.kernel.org



On Nov 02 Mauro Carvalho Chehab wrote:
 Em Thu, 1 Nov 2012 14:12:44 -0200
 Mauro Carvalho Chehab mche...@redhat.com escreveu:
 
  Em Thu, 1 Nov 2012 16:44:50 +0100
  Hans Verkuil hverk...@xs4all.nl escreveu:
  

(thread [media-workshop] Tentative Agenda for the November workshop)
   On Thu October 25 2012 19:27:01 Mauro Carvalho Chehab wrote:
I have an extra theme for discussions there: what should we do with the 
drivers
that don't have any MAINTAINERS entry.
[...]
It probably makes sense to mark them as Orphan (or, at least, have 
some
criteria to mark them as such). Perhaps before doing that, we could try
to see if are there any developer at the community with time and 
patience
to handle them.

This could of course be handled as part of the discussions about how to 
improve
the merge process, but I suspect that this could generate enough 
discussions
to be handled as a separate theme.
   
   Do we have a 'Maintainer-Light' category? I have a lot of hardware that I 
   can
   test. So while I wouldn't like to be marked as 'The Maintainer of driver 
   X'
   (since I simply don't have the time for that), I wouldn't mind being 
   marked as
   someone who can at least test patches if needed.
  
  There are several maintainance status there: 
  
  S: Status, one of the following:
 Supported:   Someone is actually paid to look after this.
 Maintained:  Someone actually looks after it.
 Odd Fixes:   It has a maintainer but they don't have time to do
  much other than throw the odd patch in. See below..
 Orphan:  No current maintainer [but maybe you could take the
  role as you write your new code].
 Obsolete:Old code. Something tagged obsolete generally means
  it has been replaced by a better system and you
  should be using that.
  
  (btw, I just realized that I should be changing the EDAC drivers I maintain
   to Supported; the media drivers I maintain should be kept as Maintained).
  
  I suspect that the maintainer-light category for those radio and similar
  old stuff is likely Odd Fixes.
  
There are some issues by not having a MAINTAINERS entry:
- patches may not flow into the driver maintainer;
- patches will likely be applied without tests/reviews or may
  stay for a long time queued;
- ./scripts/get_maintainer.pl at --no-git-fallback won't return
  any maintainer[1].

[1] Letting get_maintainer.pl is very time/CPU consuming. Letting it 
would 
delay a lot the patch review process, if applied for every patch, with
unreliable and doubtful results. I don't do it, due to the large volume
of patches, and because the 'other' results aren't typically the driver
maintainer.

An example of this is the results for a patch I just applied
(changeset 2866aed103b915ca8ba0ff76d5790caea4e62ced):

$ git show --pretty=email|./scripts/get_maintainer.pl
[...]
The driver author (Hongjun Chen hong-jun.c...@freescale.com) was not 
even
shown there, and the co-author got only 15% hit, while I got 100% and 
Hans
got 57%.

This happens not only to this driver. In a matter of fact, on most 
cases where
no MAINTAINERS entry exist, the driver's author gets a very small hit 
chance,
as, 

s5p-mfc cyclic refresh and slicing

2012-11-03 Thread Mike Dyer
I'm using the MFC on an S5PV210 to encode H264.

I'm interested in enabling cyclic intra refresh and fixed size slices.

I've set the controls 
V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB to 1
V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE to
V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES
V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES to 20 * 1024

I've checked that these are making it to the driver, but they seem to
have no effect on the encode.

Are there any limitations, or other controls that need to be set to
enable these?

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


[PATCH v1] Add MFC device tree support

2012-11-03 Thread Arun Kumar K
This patch adds device tree support for MFC driver.
The arch side patch for Exynos5250 adding MFC DT node
is applied to linux-samsung tree. [1]

[1]http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12672.html

Changelog:
v1:
- Added device_initialize to dma devices as suggested by Seung-Woo Kim.

Arun Kumar K (1):
  s5p-mfc: Add device tree support

 drivers/media/platform/s5p-mfc/s5p_mfc.c |  114 +-
 1 files changed, 97 insertions(+), 17 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 v1] s5p-mfc: Add device tree support

2012-11-03 Thread Arun Kumar K
This patch will add the device tree support for MFC driver.

Signed-off-by: Arun Kumar K arun...@samsung.com
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c |  114 +-
 1 files changed, 97 insertions(+), 17 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 130f4ac..0ca8dbb 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -21,6 +21,7 @@
 #include linux/videodev2.h
 #include media/v4l2-event.h
 #include linux/workqueue.h
+#include linux/of.h
 #include media/videobuf2-core.h
 #include s5p_mfc_common.h
 #include s5p_mfc_ctrl.h
@@ -1030,6 +1031,48 @@ static int match_child(struct device *dev, void *data)
return !strcmp(dev_name(dev), (char *)data);
 }
 
+static void *mfc_get_drv_data(struct platform_device *pdev);
+
+static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
+{
+   unsigned int mem_info[2];
+
+   dev-mem_dev_l = devm_kzalloc(dev-plat_dev-dev,
+   sizeof(struct device), GFP_KERNEL);
+   if (!dev-mem_dev_l) {
+   mfc_err(Not enough memory\n);
+   return -ENOMEM;
+   }
+   device_initialize(dev-mem_dev_l);
+   of_property_read_u32_array(dev-plat_dev-dev.of_node, samsung,mfc-l,
+   mem_info, 2);
+   if (dma_declare_coherent_memory(dev-mem_dev_l, mem_info[0],
+   mem_info[0], mem_info[1],
+   DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) {
+   mfc_err(Failed to declare coherent memory for\n
+   MFC device\n);
+   return -ENOMEM;
+   }
+
+   dev-mem_dev_r = devm_kzalloc(dev-plat_dev-dev,
+   sizeof(struct device), GFP_KERNEL);
+   if (!dev-mem_dev_r) {
+   mfc_err(Not enough memory\n);
+   return -ENOMEM;
+   }
+   device_initialize(dev-mem_dev_r);
+   of_property_read_u32_array(dev-plat_dev-dev.of_node, samsung,mfc-r,
+   mem_info, 2);
+   if (dma_declare_coherent_memory(dev-mem_dev_r, mem_info[0],
+   mem_info[0], mem_info[1],
+   DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) {
+   pr_err(Failed to declare coherent memory for\n
+   MFC device\n);
+   return -ENOMEM;
+   }
+   return 0;
+}
+
 /* MFC probe function */
 static int s5p_mfc_probe(struct platform_device *pdev)
 {
@@ -1053,8 +1096,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
return -ENODEV;
}
 
-   dev-variant = (struct s5p_mfc_variant *)
-   platform_get_device_id(pdev)-driver_data;
+   dev-variant = mfc_get_drv_data(pdev);
 
ret = s5p_mfc_init_pm(dev);
if (ret  0) {
@@ -1084,20 +1126,24 @@ static int s5p_mfc_probe(struct platform_device *pdev)
goto err_res;
}
 
-   dev-mem_dev_l = device_find_child(dev-plat_dev-dev, s5p-mfc-l,
-  match_child);
-   if (!dev-mem_dev_l) {
-   mfc_err(Mem child (L) device get failed\n);
-   ret = -ENODEV;
-   goto err_res;
-   }
-
-   dev-mem_dev_r = device_find_child(dev-plat_dev-dev, s5p-mfc-r,
-  match_child);
-   if (!dev-mem_dev_r) {
-   mfc_err(Mem child (R) device get failed\n);
-   ret = -ENODEV;
-   goto err_res;
+   if (pdev-dev.of_node) {
+   if (s5p_mfc_alloc_memdevs(dev)  0)
+   goto err_res;
+   } else {
+   dev-mem_dev_l = device_find_child(dev-plat_dev-dev,
+   s5p-mfc-l, match_child);
+   if (!dev-mem_dev_l) {
+   mfc_err(Mem child (L) device get failed\n);
+   ret = -ENODEV;
+   goto err_res;
+   }
+   dev-mem_dev_r = device_find_child(dev-plat_dev-dev,
+   s5p-mfc-r, match_child);
+   if (!dev-mem_dev_r) {
+   mfc_err(Mem child (R) device get failed\n);
+   ret = -ENODEV;
+   goto err_res;
+   }
}
 
dev-alloc_ctx[0] = vb2_dma_contig_init_ctx(dev-mem_dev_l);
@@ -1221,6 +1267,10 @@ static int __devexit s5p_mfc_remove(struct 
platform_device *pdev)
v4l2_device_unregister(dev-v4l2_dev);
vb2_dma_contig_cleanup_ctx(dev-alloc_ctx[0]);
vb2_dma_contig_cleanup_ctx(dev-alloc_ctx[1]);
+   if (pdev-dev.of_node) {
+   put_device(dev-mem_dev_l);
+   put_device(dev-mem_dev_r);
+   }
 
s5p_mfc_final_pm(dev);
return 0;
@@ -1369,6 +1419,35 @@ static struct platform_device_id mfc_driver_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mfc_driver_ids);
 

Re: [PATCH] stkwebcam: Fix sparse warning on undeclared symbol

2012-11-03 Thread Ezequiel Garcia
Hi Arvydas,

On Sat, Nov 3, 2012 at 12:48 AM, Arvydas Sidorenko asi...@gmail.com wrote:
 If you have the time to test it and stamp a Tested-by on it, I would
 appreciate it.

 Thanks,

 Ezequiel

 I applied and tested on 3.7.0-rc3 - everything is ok.

Thanks!

Ezequiel
--
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: A reliable kernel panic (3.6.2) and system crash when visiting a particular website

2012-11-03 Thread Daniel Mack
On 03.11.2012 15:10, Christof Meerwald wrote:
 On Sat, 20 Oct 2012 23:15:17 + (GMT), Artem S. Tashkinov wrote:
 It's almost definitely either a USB driver bug or video4linux driver bug:

 I'm CC'ing linux-media and linux-usb mailing lists, the problem is described 
 here:
 https://lkml.org/lkml/2012/10/20/35
 https://lkml.org/lkml/2012/10/20/148
 
 Not sure if it's related, but I am seeing a kernel freeze with a
 usb-audio headset (connected via an external USB hub) on Linux 3.5.0
 (Ubuntu 12.10) - see

Does Ubuntu 12.10 really ship with 3.5.0? Not any more recent

 http://comments.gmane.org/gmane.comp.voip.twinkle/3052 and
 http://pastebin.com/aHGe1S1X for a self-contained C test.

Some questions:

 - Are you seeing the same issue with 3.6.x?
 - If you can reproduce this issue, could you paste the messages in
dmesg when this happens? Do they resemble to the list corruption that
was reported?
 - Do you see the same problem with 3.4?
 - Are you able to apply the patch Alan Stern posted in this thread earlier?

We should really sort this out, but I unfortunately lack a system or
setup that shows the bug.


Thanks,
Daniel

--
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: A reliable kernel panic (3.6.2) and system crash when visiting a particular website

2012-11-03 Thread Christof Meerwald
On Sat, 20 Oct 2012 23:15:17 + (GMT), Artem S. Tashkinov wrote:
 It's almost definitely either a USB driver bug or video4linux driver bug:

 I'm CC'ing linux-media and linux-usb mailing lists, the problem is described 
 here:
 https://lkml.org/lkml/2012/10/20/35
 https://lkml.org/lkml/2012/10/20/148

Not sure if it's related, but I am seeing a kernel freeze with a
usb-audio headset (connected via an external USB hub) on Linux 3.5.0
(Ubuntu 12.10) - see
http://comments.gmane.org/gmane.comp.voip.twinkle/3052 and
http://pastebin.com/aHGe1S1X for a self-contained C test.


Christof

-- 

http://cmeerw.org  sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org   xmpp:cmeerw at cmeerw.org
--
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: A reliable kernel panic (3.6.2) and system crash when visiting a particular website

2012-11-03 Thread Sven-Haegar Koch
On Sat, 3 Nov 2012, Daniel Mack wrote:

 On 03.11.2012 15:10, Christof Meerwald wrote:
  On Sat, 20 Oct 2012 23:15:17 + (GMT), Artem S. Tashkinov wrote:
  It's almost definitely either a USB driver bug or video4linux driver bug:
 
  I'm CC'ing linux-media and linux-usb mailing lists, the problem is 
  described here:
  https://lkml.org/lkml/2012/10/20/35
  https://lkml.org/lkml/2012/10/20/148
  
  Not sure if it's related, but I am seeing a kernel freeze with a
  usb-audio headset (connected via an external USB hub) on Linux 3.5.0
  (Ubuntu 12.10) - see
 
 Does Ubuntu 12.10 really ship with 3.5.0? Not any more recent

They ship 3.5.7 plus some more fixes, but call it 3.5.0-18.29

c'ya
sven-haegar

-- 
Three may keep a secret, if two of them are dead.
- Ben F.
--
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] cx23885: Added support for AVerTV Hybrid Express Slim HC81R (only analog)

2012-11-03 Thread Oleg Kravchenko
Hello! Please review my patch.

Supported inputs:
Television, S-Video, Component.

Modules options:
options cx25840 firmware=v4l-cx23418-dig.fw   From 383bec3ca55a0939f86a0b1d2aa2e562f227e4d8 Mon Sep 17 00:00:00 2001
From: Oleh Kravchenko o...@kaa.org.ua
Date: Tue, 23 Oct 2012 18:47:30 +0300
Subject: [PATCH] Added support for AVerTV Hybrid Express Slim HC81R (only
 analog)

---
 drivers/media/pci/cx23885/cx23885-cards.c |   75 +
 drivers/media/pci/cx23885/cx23885-video.c |   15 +-
 drivers/media/pci/cx23885/cx23885.h   |1 +
 3 files changed, 90 insertions(+), 1 deletions(-)

diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index 6277e145..d213019 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -572,6 +572,35 @@ struct cx23885_board cx23885_boards[] = {
 	[CX23885_BOARD_PROF_8000] = {
 		.name		= Prof Revolution DVB-S2 8000,
 		.portb		= CX23885_MPEG_DVB,
+	},
+	[CX23885_BOARD_AVERMEDIA_HC81R] = {
+		.name		= AVerTV Hybrid Express Slim HC81R,
+		.tuner_type	= TUNER_XC2028,
+		.tuner_addr	= 0x61, /* 0xc2  1 */
+		.tuner_bus	= 1,
+		.porta		= CX23885_ANALOG_VIDEO,
+		.input  = {{
+			.type   = CX23885_VMUX_TELEVISION,
+			.vmux   = CX25840_VIN2_CH1 |
+  CX25840_VIN5_CH2 |
+  CX25840_NONE0_CH3 |
+  CX25840_NONE1_CH3,
+			.amux   = CX25840_AUDIO8,
+		}, {
+			.type   = CX23885_VMUX_SVIDEO,
+			.vmux   = CX25840_VIN8_CH1 |
+  CX25840_NONE_CH2 |
+  CX25840_VIN7_CH3 |
+  CX25840_SVIDEO_ON,
+			.amux   = CX25840_AUDIO6,
+		}, {
+			.type   = CX23885_VMUX_COMPONENT,
+			.vmux   = CX25840_VIN1_CH1 |
+  CX25840_NONE_CH2 |
+  CX25840_NONE0_CH3 |
+  CX25840_NONE1_CH3,
+			.amux   = CX25840_AUDIO6,
+		} },
 	}
 };
 const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards);
@@ -788,6 +817,10 @@ struct cx23885_subid cx23885_subids[] = {
 		.subvendor = 0x8000,
 		.subdevice = 0x3034,
 		.card  = CX23885_BOARD_PROF_8000,
+	}, {
+		.subvendor = 0x1461,
+		.subdevice = 0xd939,
+		.card  = CX23885_BOARD_AVERMEDIA_HC81R,
 	},
 };
 const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids);
@@ -1012,6 +1045,10 @@ int cx23885_tuner_callback(void *priv, int component, int command, int arg)
 	case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF:
 		altera_ci_tuner_reset(dev, port-nr);
 		break;
+	case CX23885_BOARD_AVERMEDIA_HC81R:
+		/* XC3028L Reset Command */
+		bitmask = 1  2;
+		break;
 	}
 
 	if (bitmask) {
@@ -1301,6 +1338,32 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
 		/* enable irq */
 		cx_write(GPIO_ISM, 0x);/* INTERRUPTS active low*/
 		break;
+	case CX23885_BOARD_AVERMEDIA_HC81R:
+		cx_clear(MC417_CTL, 1);
+		/* GPIO-0,1,2 setup direction as output */
+		cx_set(GP0_IO, 0x0007);
+		mdelay(10);
+		/* AF9013 demod reset */
+		cx_set(GP0_IO, 0x00010001);
+		mdelay(10);
+		cx_clear(GP0_IO, 0x00010001);
+		mdelay(10);
+		cx_set(GP0_IO, 0x00010001);
+		mdelay(10);
+		/* demod tune? */
+		cx_clear(GP0_IO, 0x00030003);
+		mdelay(10);
+		cx_set(GP0_IO, 0x00020002);
+		mdelay(10);
+		cx_set(GP0_IO, 0x00010001);
+		mdelay(10);
+		cx_clear(GP0_IO, 0x00020002);
+		/* XC3028L tuner reset */
+		cx_set(GP0_IO, 0x00040004);
+		cx_clear(GP0_IO, 0x00040004);
+		cx_set(GP0_IO, 0x00040004);
+		mdelay(60);
+		break;
 	}
 }
 
@@ -1515,6 +1578,17 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 	}
 
 	switch (dev-board) {
+	case CX23885_BOARD_AVERMEDIA_HC81R:
+		/* Defaults for VID B */
+		ts1-gen_ctrl_val  = 0x4; /* Parallel */
+		ts1-ts_clk_en_val = 0x1; /* Enable TS_CLK */
+		ts1-src_sel_val   = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
+		/* Defaults for VID C */
+		/* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
+		ts2-gen_ctrl_val  = 0x10e;
+		ts2-ts_clk_en_val = 0x1; /* Enable TS_CLK */
+		ts2-src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO;
+		break;
 	case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP:
 	case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
 		ts2-gen_ctrl_val  = 0xc; /* Serial bus + punctured clock */
@@ -1636,6 +1710,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 	case CX23885_BOARD_MPX885:
 	case CX23885_BOARD_MYGICA_X8507:
 	case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL:
+	case CX23885_BOARD_AVERMEDIA_HC81R:
 		dev-sd_cx25840 = v4l2_i2c_new_subdev(dev-v4l2_dev,
 dev-i2c_bus[2].i2c_adap,
 cx25840, 0x88  1, NULL);
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
index 1a21926..f131888 100644
--- a/drivers/media/pci/cx23885/cx23885-video.c
+++ b/drivers/media/pci/cx23885/cx23885-video.c
@@ -509,7 +509,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
 		(dev-board == CX23885_BOARD_HAUPPAUGE_HVR1255) ||
 		(dev-board == CX23885_BOARD_HAUPPAUGE_HVR1255_22111) ||
 		(dev-board == CX23885_BOARD_HAUPPAUGE_HVR1850) ||
-		(dev-board == CX23885_BOARD_MYGICA_X8507)) {
+		(dev-board == 

Re: [PATCH] cx23885: Added support for AVerTV Hybrid Express Slim HC81R (only analog)

2012-11-03 Thread Andy Walls
Oleg Kravchenko o...@kaa.org.ua wrote:

Hello! Please review my patch.

Supported inputs:
Television, S-Video, Component.

Modules options:
options cx25840 firmware=v4l-cx23418-dig.fw   

Hi,

Please do not use the CX23418 digitizer firmware with the CX2388[578] chips.  
Use the proper cx23885 digitizer firmware.  You need the proper firmware to get 
the best results in detecting the audio standard in broadcast analog video.

Regards,
Andy
--
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: WARNINGS

2012-11-03 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:Sat Nov  3 19:00:29 CET 2012
git hash:8f7e91a31fb95c50880c76505b416630c0326d93
gcc version:  i686-linux-gcc (GCC) 4.7.1
host hardware:x86_64
host os:  3.4.07-marune

linux-git-arm-eabi-davinci: WARNINGS
linux-git-arm-eabi-exynos: WARNINGS
linux-git-arm-eabi-omap: WARNINGS
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: WARNINGS
linux-git-x86_64: OK
linux-2.6.31.12-i686: WARNINGS
linux-2.6.32.6-i686: WARNINGS
linux-2.6.33-i686: WARNINGS
linux-2.6.34-i686: WARNINGS
linux-2.6.35.3-i686: WARNINGS
linux-2.6.36-i686: WARNINGS
linux-2.6.37-i686: WARNINGS
linux-2.6.38.2-i686: WARNINGS
linux-2.6.39.1-i686: WARNINGS
linux-3.0-i686: WARNINGS
linux-3.1-i686: WARNINGS
linux-3.2.1-i686: WARNINGS
linux-3.3-i686: WARNINGS
linux-3.4-i686: WARNINGS
linux-3.5-i686: WARNINGS
linux-3.6-i686: WARNINGS
linux-3.7-rc1-i686: WARNINGS
linux-2.6.31.12-x86_64: WARNINGS
linux-2.6.32.6-x86_64: WARNINGS
linux-2.6.33-x86_64: WARNINGS
linux-2.6.34-x86_64: WARNINGS
linux-2.6.35.3-x86_64: WARNINGS
linux-2.6.36-x86_64: WARNINGS
linux-2.6.37-x86_64: WARNINGS
linux-2.6.38.2-x86_64: WARNINGS
linux-2.6.39.1-x86_64: WARNINGS
linux-3.0-x86_64: WARNINGS
linux-3.1-x86_64: WARNINGS
linux-3.2.1-x86_64: WARNINGS
linux-3.3-x86_64: WARNINGS
linux-3.4-x86_64: WARNINGS
linux-3.5-x86_64: WARNINGS
linux-3.6-x86_64: WARNINGS
linux-3.7-rc1-x86_64: WARNINGS
apps: WARNINGS
spec-git: WARNINGS
sparse: ERRORS

Detailed results are available here:

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

Full logs are available here:

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

The 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