Re: [patch] em28xx : Terratec Cinergy Hybrid T USB XS FR is now really working.

2010-03-09 Thread Mauro Carvalho Chehab
Hi Michel,

Catimimi wrote:
> Hi,
> 
> As I told you earlier, my previous patch was not working with a 64 bits
> kernel.
> So forget it.
> 
> 
> I now succed in running Cinergy Hybrid T USB XS FR with 32 and 64bits
> kernels.
> One problem remains, because of msp3400 driver, I don't have sound in
> analog mode.
> I'am still working on that problem.

First of all, as your previous patch got applied already at -git, you should
be sending us a diff patch against it (as the one enclosed), and not a complete
patch.

Also, please always send us patches with your Signed-off-by line as stated at 
kernel
Documentation/SubmittingPatches file.

With respect to msp3400, one of the things you may need to do is to change the 
i2s
speed, as msp3400 support two different speeds. If you use it with a wrong 
speed, you
won't listen the audio. 

There are two valid values: 1024000 and 2048000. The default is 1024000.

So, if your board uses 2048000 speed on i2s, you'll need to add this:

case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
dev->i2s_speed = 2048000;

to em28xx_pre_card_setup().

If the GPIO's for analog are ok, this should be enough to have audio working on 
it.

-- 

Cheers,
Mauro

---
 drivers/media/video/em28xx/em28xx-cards.c |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

--- work.orig/drivers/media/video/em28xx/em28xx-cards.c
+++ work/drivers/media/video/em28xx/em28xx-cards.c
@@ -170,6 +170,18 @@ static struct em28xx_reg_seq pinnacle_hy
{   -1, -1, -1, -1},
 };
 
+static struct em28xx_reg_seq terratec_cinergy_USB_XS_analog[] = {
+   {EM28XX_R08_GPIO,   0x6d,   ~EM_GPIO_4, 10},
+   {EM2880_R04_GPO,0x00,   0xff,   10},
+   { -1,   -1, -1, -1},
+};
+
+static struct em28xx_reg_seq terratec_cinergy_USB_XS_digital[] = {
+   {EM28XX_R08_GPIO,   0x6e,   ~EM_GPIO_4, 10},
+   {EM2880_R04_GPO,0x08,   0xff,   10},
+   { -1,   -1, -1, -1},
+};
+
 /* eb1a:2868 Reddo DVB-C USB TV Box
GPIO4 - CU1216L NIM
Other GPIOs seems to be don't care. */
@@ -750,22 +762,22 @@ struct em28xx_board em28xx_boards[] = {
.tuner_gpio   = default_tuner_gpio,
.decoder  = EM28XX_TVP5150,
.has_dvb  = 1,
-   .dvb_gpio = default_digital,
+   .dvb_gpio = terratec_cinergy_USB_XS_digital,
.input= { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = TVP5150_COMPOSITE0,
.amux = EM28XX_AMUX_VIDEO,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
}, {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = TVP5150_COMPOSITE1,
.amux = EM28XX_AMUX_LINE_IN,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
}, {
.type = EM28XX_VMUX_SVIDEO,
.vmux = TVP5150_SVIDEO,
.amux = EM28XX_AMUX_LINE_IN,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
} },
},
[EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
@@ -2118,6 +2130,7 @@ static void em28xx_setup_xc3028(struct e
ctl->demod = XC3028_FE_ZARLINK456;
break;
case EM2880_BOARD_TERRATEC_HYBRID_XS:
+   case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
case EM2881_BOARD_PINNACLE_HYBRID_PRO:
ctl->demod = XC3028_FE_ZARLINK456;
break;
--
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] em28xx : Terratec Cinergy Hybrid T USB XS FR is now really working.

2010-03-03 Thread Catimimi

Hi,

As I told you earlier, my previous patch was not working with a 64 bits kernel.
So forget it.


I now succed in running Cinergy Hybrid T USB XS FR with 32 and 64bits kernels.
One problem remains, because of msp3400 driver, I don't have sound in analog 
mode.
I'am still working on that problem.

I enclose the patch against v4l-dvb-14021dfc00f3

Regards.
Michel.


diff -ru 
v4l-dvb-14021dfc00f3-orig/linux/drivers/media/video/em28xx/em28xx-cards.c 
v4l-dvb-14021dfc00f3-new/linux/drivers/media/video/em28xx/em28xx-cards.c
--- v4l-dvb-14021dfc00f3-orig/linux/drivers/media/video/em28xx/em28xx-cards.c   
2010-02-12 02:11:30.0 +0100
+++ v4l-dvb-14021dfc00f3-new/linux/drivers/media/video/em28xx/em28xx-cards.c
2010-02-25 16:52:07.0 +0100
@@ -183,6 +183,18 @@
{   -1, -1, -1, -1},
 };
 
+static struct em28xx_reg_seq terratec_cinergy_USB_XS_analog[] = {
+   {EM28XX_R08_GPIO,   0x6d,   ~EM_GPIO_4, 10},
+   {EM2880_R04_GPO,0x00,   0xff,   10},
+   { -1,   -1, -1, -1},
+};
+
+static struct em28xx_reg_seq terratec_cinergy_USB_XS_digital[] = {
+   {EM28XX_R08_GPIO,   0x6e,   ~EM_GPIO_4, 10},
+   {EM2880_R04_GPO,0x08,   0xff,   10},
+   { -1,   -1, -1, -1},
+};
+
 /* eb1a:2868 Reddo DVB-C USB TV Box
GPIO4 - CU1216L NIM
Other GPIOs seems to be don't care. */
@@ -774,30 +786,27 @@
 
[EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
.name = "Terratec Hybrid XS Secam",
-   .valid= EM28XX_BOARD_NOT_VALIDATED,
.has_msp34xx  = 1,
.tuner_type   = TUNER_XC2028,
.tuner_gpio   = default_tuner_gpio,
.decoder  = EM28XX_TVP5150,
-#if 0 /* FIXME: add an entry at em28xx-dvb */
.has_dvb  = 1,
-   .dvb_gpio = default_digital,
-#endif
+   .dvb_gpio = terratec_cinergy_USB_XS_digital,
.input= { {
.type = EM28XX_VMUX_TELEVISION,
.vmux = TVP5150_COMPOSITE0,
.amux = EM28XX_AMUX_VIDEO,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
}, {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = TVP5150_COMPOSITE1,
.amux = EM28XX_AMUX_LINE_IN,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
}, {
.type = EM28XX_VMUX_SVIDEO,
.vmux = TVP5150_SVIDEO,
.amux = EM28XX_AMUX_LINE_IN,
-   .gpio = default_analog,
+   .gpio = terratec_cinergy_USB_XS_analog,
} },
},
[EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
@@ -2181,6 +2190,7 @@
ctl->demod = XC3028_FE_ZARLINK456;
break;
case EM2880_BOARD_TERRATEC_HYBRID_XS:
+   case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
case EM2881_BOARD_PINNACLE_HYBRID_PRO:
ctl->demod = XC3028_FE_ZARLINK456;
break;
diff -ru 
v4l-dvb-14021dfc00f3-orig/linux/drivers/media/video/em28xx/em28xx-dvb.c 
v4l-dvb-14021dfc00f3-new/linux/drivers/media/video/em28xx/em28xx-dvb.c
--- v4l-dvb-14021dfc00f3-orig/linux/drivers/media/video/em28xx/em28xx-dvb.c 
2010-02-12 02:11:30.0 +0100
+++ v4l-dvb-14021dfc00f3-new/linux/drivers/media/video/em28xx/em28xx-dvb.c  
2010-02-25 16:46:35.0 +0100
@@ -503,6 +503,7 @@
}
break;
case EM2880_BOARD_TERRATEC_HYBRID_XS:
+   case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
case EM2881_BOARD_PINNACLE_HYBRID_PRO:
case EM2882_BOARD_DIKOM_DK300:
dvb->frontend = dvb_attach(zl10353_attach,