All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
@ 2009-11-14 11:22 Andrea.Amorosi76
  2009-11-14 13:05 ` Andrea.Amorosi76
  0 siblings, 1 reply; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-14 11:22 UTC (permalink / raw)
  To: linux-media@vger.kernel.org >> Linux Media Mailing List,
	Devin Heitmueller

This patch fix the Dikom DK300 hybrid usb card which is recognized as a
Kworld VS-DVB-T 323UR (card=54) by the main driver, but with no tv
available in Kaffeine.
The patch solves the problem for the digital part of the tuner.
Analog tv has no audio (both video e audio devices are created but
mplayer complains with the following message:
Error reading audio: Input/output error).
Moreover the /dev/video sometime is not deleted when the device is
unplugged.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Thu Nov 12
12:21:05 2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Nov 14
00:33:49 2009 +0100
@@ -1422,6 +1422,9 @@
  		.tuner_type   = TUNER_XC2028,
  		.tuner_gpio   = default_tuner_gpio,
  		.decoder      = EM28XX_TVP5150,
+                .mts_firmware = 1,
+                .has_dvb      = 1,
+                .dvb_gpio     = kworld_330u_digital,


  		.input        = { {
  			.type     = EM28XX_VMUX_TELEVISION,
  			.vmux     = TVP5150_COMPOSITE0,
@@ -2143,6 +2146,7 @@
  		ctl->demod = XC3028_FE_DEFAULT;
  		break;
  	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_KWORLD_VS_DVBT:
  		ctl->demod = XC3028_FE_CHINA;
  		ctl->fname = XC2028_DEFAULT_FIRMWARE;
  		break;
diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Thu Nov 12 12:21:05
2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Nov 14 00:33:49
2009 +0100
@@ -504,6 +504,7 @@
  		break;
  	case EM2880_BOARD_TERRATEC_HYBRID_XS:
  	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_KWORLD_VS_DVBT:
  		dvb->frontend = dvb_attach(zl10353_attach,
  					   &em28xx_zl10353_xc3028_no_i2c_gate,
  					   &dev->i2c_adap);





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
  2009-11-14 11:22 [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode) Andrea.Amorosi76
@ 2009-11-14 13:05 ` Andrea.Amorosi76
  2009-11-14 14:34   ` Devin Heitmueller
  0 siblings, 1 reply; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-14 13:05 UTC (permalink / raw)
  To: linux-media@vger.kernel.org >> Linux Media Mailing List,
	Devin Heitmueller

Continuing the testing for the analog part of the device, I've 
discovered that the main kernel driver (the one without the proposed 
patch)  works better,  even if not perfectly, as far as analog tv is 
concerned.
In detail analog sound is present but is very low and noisy  (it seems 
to be listening to a very  distant radio station).
So there is something in the patch that breaks the analog tv sound 
(which however is not very usable in the main driver being so noisy).
Which one of the modified setting can interfer with the analog tv sound?
Thank you,
Andrea

Andrea.Amorosi76@gmail.com ha scritto:
> This patch fix the Dikom DK300 hybrid usb card which is recognized as a
> Kworld VS-DVB-T 323UR (card=54) by the main driver, but with no tv
> available in Kaffeine.
> The patch solves the problem for the digital part of the tuner.
> Analog tv has no audio (both video e audio devices are created but
> mplayer complains with the following message:
> Error reading audio: Input/output error).
> Moreover the /dev/video sometime is not deleted when the device is
> unplugged.
>
> Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>
>
> diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-cards.c
> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Thu Nov 12
> 12:21:05 2009 -0200
> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Nov 14
> 00:33:49 2009 +0100
> @@ -1422,6 +1422,9 @@
>          .tuner_type   = TUNER_XC2028,
>          .tuner_gpio   = default_tuner_gpio,
>          .decoder      = EM28XX_TVP5150,
> +                .mts_firmware = 1,
> +                .has_dvb      = 1,
> +                .dvb_gpio     = kworld_330u_digital,
>
>
>          .input        = { {
>              .type     = EM28XX_VMUX_TELEVISION,
>              .vmux     = TVP5150_COMPOSITE0,
> @@ -2143,6 +2146,7 @@
>          ctl->demod = XC3028_FE_DEFAULT;
>          break;
>      case EM2883_BOARD_KWORLD_HYBRID_330U:
> +    case EM2882_BOARD_KWORLD_VS_DVBT:
>          ctl->demod = XC3028_FE_CHINA;
>          ctl->fname = XC2028_DEFAULT_FIRMWARE;
>          break;
> diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-dvb.c
> --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c    Thu Nov 12 
> 12:21:05
> 2009 -0200
> +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c    Sat Nov 14 
> 00:33:49
> 2009 +0100
> @@ -504,6 +504,7 @@
>          break;
>      case EM2880_BOARD_TERRATEC_HYBRID_XS:
>      case EM2881_BOARD_PINNACLE_HYBRID_PRO:
> +    case EM2882_BOARD_KWORLD_VS_DVBT:
>          dvb->frontend = dvb_attach(zl10353_attach,
>                         &em28xx_zl10353_xc3028_no_i2c_gate,
>                         &dev->i2c_adap);
>
>
>
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
  2009-11-14 13:05 ` Andrea.Amorosi76
@ 2009-11-14 14:34   ` Devin Heitmueller
  2009-11-14 22:21     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
                       ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Devin Heitmueller @ 2009-11-14 14:34 UTC (permalink / raw)
  To: Andrea.Amorosi76
  Cc: linux-media@vger.kernel.org >> Linux Media Mailing List

On Sat, Nov 14, 2009 at 8:05 AM, Andrea.Amorosi76@gmail.com
<Andrea.Amorosi76@gmail.com> wrote:
> Continuing the testing for the analog part of the device, I've discovered
> that the main kernel driver (the one without the proposed patch)  works
> better,  even if not perfectly, as far as analog tv is concerned.
> In detail analog sound is present but is very low and noisy  (it seems to be
> listening to a very  distant radio station).
> So there is something in the patch that breaks the analog tv sound (which
> however is not very usable in the main driver being so noisy).
> Which one of the modified setting can interfer with the analog tv sound?
> Thank you,
> Andrea

Did you define an analog_gpio?  Or did you only define the digital
gpio?  The enabling of digital mode may be turning off the audio
encoder.

Devin
-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR )
  2009-11-14 14:34   ` Devin Heitmueller
@ 2009-11-14 22:21     ` Andrea.Amorosi76
  2009-11-14 22:47       ` Andrea.Amorosi76
       [not found]     ` <4AFF1203.3080401@gmail.com>
                       ` (4 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-14 22:21 UTC (permalink / raw)
  To: Devin Heitmueller
  Cc: linux-media@vger.kernel.org >> Linux Media Mailing List

This patch fix the Dikom DK300 hybrid usb card which is recognized as a
Kworld VS-DVB-T 323UR (card=54).

The patch adds digital tv and solves analog tv audio bad quality issue.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Thu Nov 12 
12:21:05 2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Nov 14 
23:10:47 2009 +0100
@@ -1422,18 +1422,24 @@
         .tuner_type   = TUNER_XC2028,
         .tuner_gpio   = default_tuner_gpio,
         .decoder      = EM28XX_TVP5150,
+                .mts_firmware = 1,
+                .has_dvb      = 1,
+                .dvb_gpio     = 
kworld_330u_digital,                                                                                                                                                         

         .input        = { {
             .type     = EM28XX_VMUX_TELEVISION,
             .vmux     = TVP5150_COMPOSITE0,
             .amux     = EM28XX_AMUX_VIDEO,
+            .gpio     = default_analog,
         }, {
             .type     = EM28XX_VMUX_COMPOSITE1,
             .vmux     = TVP5150_COMPOSITE1,
             .amux     = EM28XX_AMUX_LINE_IN,
+            .gpio     = default_analog,
         }, {
             .type     = EM28XX_VMUX_SVIDEO,
             .vmux     = TVP5150_SVIDEO,
             .amux     = EM28XX_AMUX_LINE_IN,
+            .gpio     = default_analog,
         } },
     },
     [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
@@ -2143,6 +2149,7 @@
         ctl->demod = XC3028_FE_DEFAULT;
         break;
     case EM2883_BOARD_KWORLD_HYBRID_330U:
+    case EM2882_BOARD_KWORLD_VS_DVBT:
         ctl->demod = XC3028_FE_CHINA;
         ctl->fname = XC2028_DEFAULT_FIRMWARE;
         break;
diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c    Thu Nov 12 
12:21:05 2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c    Sat Nov 14 
23:10:47 2009 +0100
@@ -504,6 +504,7 @@
         break;
     case EM2880_BOARD_TERRATEC_HYBRID_XS:
     case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+    case EM2882_BOARD_KWORLD_VS_DVBT:
         dvb->frontend = dvb_attach(zl10353_attach,
                        &em28xx_zl10353_xc3028_no_i2c_gate,
                        &dev->i2c_adap);


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR )
  2009-11-14 22:21     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
@ 2009-11-14 22:47       ` Andrea.Amorosi76
  0 siblings, 0 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-14 22:47 UTC (permalink / raw)
  To: Devin Heitmueller
  Cc: linux-media@vger.kernel.org >> Linux Media Mailing List

Andrea.Amorosi76@gmail.com wrote:
> This patch fix the Dikom DK300 hybrid usb card which is recognized as a
> Kworld VS-DVB-T 323UR (card=54).
>
> The patch adds digital tv and solves analog tv audio bad quality issue.
>
> Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>
>
> diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-cards.c
> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Thu Nov 12 
> 12:21:05 2009 -0200
> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Nov 14 
> 23:10:47 2009 +0100
> @@ -1422,18 +1422,24 @@
>         .tuner_type   = TUNER_XC2028,
>         .tuner_gpio   = default_tuner_gpio,
>         .decoder      = EM28XX_TVP5150,
> +                .mts_firmware = 1,
> +                .has_dvb      = 1,
> +                .dvb_gpio     = 
> kworld_330u_digital,                                                                                                                                                         
>
>         .input        = { {
>             .type     = EM28XX_VMUX_TELEVISION,
>             .vmux     = TVP5150_COMPOSITE0,
>             .amux     = EM28XX_AMUX_VIDEO,
> +            .gpio     = default_analog,
>         }, {
>             .type     = EM28XX_VMUX_COMPOSITE1,
>             .vmux     = TVP5150_COMPOSITE1,
>             .amux     = EM28XX_AMUX_LINE_IN,
> +            .gpio     = default_analog,
>         }, {
>             .type     = EM28XX_VMUX_SVIDEO,
>             .vmux     = TVP5150_SVIDEO,
>             .amux     = EM28XX_AMUX_LINE_IN,
> +            .gpio     = default_analog,
>         } },
>     },
>     [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
> @@ -2143,6 +2149,7 @@
>         ctl->demod = XC3028_FE_DEFAULT;
>         break;
>     case EM2883_BOARD_KWORLD_HYBRID_330U:
> +    case EM2882_BOARD_KWORLD_VS_DVBT:
>         ctl->demod = XC3028_FE_CHINA;
>         ctl->fname = XC2028_DEFAULT_FIRMWARE;
>         break;
> diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-dvb.c
> --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c    Thu Nov 12 
> 12:21:05 2009 -0200
> +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c    Sat Nov 14 
> 23:10:47 2009 +0100
> @@ -504,6 +504,7 @@
>         break;
>     case EM2880_BOARD_TERRATEC_HYBRID_XS:
>     case EM2881_BOARD_PINNACLE_HYBRID_PRO:
> +    case EM2882_BOARD_KWORLD_VS_DVBT:
>         dvb->frontend = dvb_attach(zl10353_attach,
>                        &em28xx_zl10353_xc3028_no_i2c_gate,
>                        &dev->i2c_adap);
>
>
Should I remove the    "     .valid        = 
EM28XX_BOARD_NOT_VALIDATED," line from the device, since I have 
successfully tested it or the maintainer will remove it after having 
received positive feedbacks from other users/developers?

For the sake of completeness, the device has a strange behaviour of its 
two blue LEDs (whose light is visible because  the upper part of the 
device is semi transparent):
when the device is connected they turn on and then turn off after less 
than a second;
if I see analogue TV with Mplayer, one of them turn on and remain in 
such a state till Mplayer is closed.
if I see digital TV with Kaffeine, the other led remains off till I 
select digital TV and a channel, but then it turns on and remain active 
even if I close Kaffeine and open Mplayer to see analogue tv. In such a 
case both the LEDs are turned on and the analogue one continue to behave 
correctly because if I close mplayer it turns off. The digital led turns 
off only if I reopen Kaffeine without selecting the digital TV.
May this strange behaviour be the symptom of an incorrect switch off of 
the digital part of the tuner when it is not used any more by some programs?
Even my previous device (Empire dual pen) had such a strange behaviour 
as far as the light is concerned, so I don't think it is a real problem.
However if someone knows how to solve this, it is better.

Best regards,
Andrea


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
       [not found]             ` <4B01B168.50403@gmail.com>
@ 2009-11-16 20:28               ` Devin Heitmueller
       [not found]                 ` <4B01B841.7000506@gmail.com>
       [not found]                 ` <4B01BABE.4060609@gmail.com>
  0 siblings, 2 replies; 19+ messages in thread
From: Devin Heitmueller @ 2009-11-16 20:28 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

On Mon, Nov 16, 2009 at 3:09 PM, Andrea.Amorosi76@gmail.com
> Hi Devin,
> I think I've done a big mistake.
> I've wrongly inserted digital_default in the analog tuner section and I've
> compiled and tested the device.
> It hasn't worked and so I've realized the mistake and the fact that the
> device eprom was changed.
> So I've tried with the rewrite eprom script to correct the problem, but now
> the device doesn't work any more.
> When I plug it in this is the dmesg message:
>
> [  919.319963] usb 2-2: USB disconnect, address 10
> [  921.520069] usb 2-2: new high speed USB device using ehci_hcd and address
> 11
> [  921.656306] usb 2-2: configuration #1 chosen from 1 choice
>
> And if I try to rewrite the eprom it says a lot of messages like this:
>
> Error: Could not open file `/dev/i2c-6' or `/dev/i2c/6': No such file or
> directory
>
> I've loaded  the i2c_dev and the em28xx manually but nothing has changed.
> Please don't tell me that I've destroyed my device :-(
> Andrea

What does "lsusb" report as the USB ID of the device?  If that value
is wrong, then you indeed did trash your eeprom and would need to
manually reprogram it.

Did you put the driver back to the state where the analog_gpio no
longer points to default_digital?  Or is the driver code still in the
wrong state?

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
       [not found]                 ` <4B01B841.7000506@gmail.com>
@ 2009-11-16 20:47                   ` Devin Heitmueller
  0 siblings, 0 replies; 19+ messages in thread
From: Devin Heitmueller @ 2009-11-16 20:47 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

On Mon, Nov 16, 2009 at 3:38 PM, Andrea.Amorosi76@gmail.com
<Andrea.Amorosi76@gmail.com> wrote:
> The usb is the following:
> Bus 002 Device 010: ID eb1a:e312 eMPIA Technology, Inc.
> (I don't remember what it was previously, but it seems wrong how can I be
> sure about that?).
> I have put back the driver to the original state, but still it doesn't work.
> Did I have to reprogram the eprom? If so, it is possible via usb?
> Thank you,
> Andrea

Well, according to em28xx-cards.c, the EM2882_BOARD_KWORLD_VS_DVBT is
eb1a:e323.  You can probably just the USB_DEVICE() entry to say e312,
and that will allow the driver to load (at which point you can then
reprogram the eeprom back to its previous state).

I assume that when you used the eeprom rewrite script, that you used a
copy of *YOUR* dmesg output from before the problem?  You cannot use
someone else's dmesg output, as that may not actually match your
device.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
       [not found]                 ` <4B01BABE.4060609@gmail.com>
@ 2009-11-16 20:56                   ` Devin Heitmueller
  2009-11-18 18:59                     ` Andrea.Amorosi76
  0 siblings, 1 reply; 19+ messages in thread
From: Devin Heitmueller @ 2009-11-16 20:56 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

On Mon, Nov 16, 2009 at 3:49 PM, Andrea.Amorosi76@gmail.com
<Andrea.Amorosi76@gmail.com> wrote:
> The usb is the following:
> Bus 002 Device 010: ID eb1a:e312 eMPIA Technology, Inc.
> (I don't remember what it was previously, but it seems wrong how can I be
> sure about that?).
> I have put back the driver to the original state, but still it doesn't work.
> Did I have to reprogram the eprom? If so, it is possible via usb?
> Thank you,
> Andrea
>
> PS I've found an old dmesg.
> The USB ID is wrong! The old one was eb1a:e323

Ok, so that confirms that indeed the eeprom was corrupted.  I would
suggest you hack the USB_DEVICE() entry in em28xx-cards.c to be
eb1a:e312.  This will allow the driver to load and the i2c device to
be setup.  Then use the eeprom repair script to rewrite the eeprom.
At that point you should be able to remove the hack, because the USB
ID will be back to eb1a:e323.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode)
  2009-11-16 20:56                   ` Devin Heitmueller
@ 2009-11-18 18:59                     ` Andrea.Amorosi76
  0 siblings, 0 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-18 18:59 UTC (permalink / raw)
  To: Linux Media Mailing List

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

Devin Heitmueller ha scritto:
> On Mon, Nov 16, 2009 at 3:49 PM, Andrea.Amorosi76@gmail.com
> <Andrea.Amorosi76@gmail.com> wrote:
>   
>> The usb is the following:
>> Bus 002 Device 010: ID eb1a:e312 eMPIA Technology, Inc.
>> (I don't remember what it was previously, but it seems wrong how can I be
>> sure about that?).
>> I have put back the driver to the original state, but still it doesn't work.
>> Did I have to reprogram the eprom? If so, it is possible via usb?
>> Thank you,
>> Andrea
>>
>> PS I've found an old dmesg.
>> The USB ID is wrong! The old one was eb1a:e323
>>     
>
> Ok, so that confirms that indeed the eeprom was corrupted.  I would
> suggest you hack the USB_DEVICE() entry in em28xx-cards.c to be
> eb1a:e312.  This will allow the driver to load and the i2c device to
> be setup.  Then use the eeprom repair script to rewrite the eeprom.
> At that point you should be able to remove the hack, because the USB
> ID will be back to eb1a:e323.
>
> Devin
>
>   
Ok Devin!
It works again!!!
If you come in Trieste, let me know and I'll pay you a beer :-)
I can also confirm that the digital_defaul gpio does not work so the 
kworld_330u_digital gpio is needed.
In any case I've an usbsnoop of this device but I don't know what I've 
to search in that 125Mb log text file.
I've parsed it with the parse _snifusb2.pl tool and the result is the 
attached files.
Still I don't know what to search to extract the gpio for analog and 
digital tv.
If someone can explain me some basis, maybe I can validate the actual 
assumptions made in the driver as far as the gpio is concerned.
In particular I suspect that the digital demodulator remains active when 
switching from digital to analog tv.

Andrea








[-- Attachment #2: parsed_UsbSnoop.log.tar.gz --]
[-- Type: application/gzip, Size: 36519 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR )
  2009-11-14 14:34   ` Devin Heitmueller
  2009-11-14 22:21     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
       [not found]     ` <4AFF1203.3080401@gmail.com>
@ 2009-11-22 11:02     ` Andrea.Amorosi76
  2010-01-30 17:10     ` [PATCH] em28xx: add Dikom DK300 hybrid USB tuner Andrea.Amorosi76
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2009-11-22 11:02 UTC (permalink / raw)
  To: Linux Media Mailing List

[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]

This patch fix the Dikom DK300 hybrid usb card which is recognized as a
Kworld VS-DVB-T 323UR (card=54).

The patch adds digital tv and solves analogue tv audio bad quality issue.
Moreover it removes the composite and s-video analogue inputs which are 
not present on the board.

Not tested: remote controller
To be done: I attach the usbsnoop obtained some month ago using windows xp.
It seems that with the proposed patch the digital demodulator remains 
activated if the tuner is switched from digital to analogue mode.
Workaorund is to unplug and replug the device when switching from 
digital to analogue.
If someone can explain how to verify the gpio settings using the 
usbsnoop, the above issue perhaps can be resolved.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Thu Nov 12 
12:21:05 2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sun Nov 22 
11:50:29 2009 +0100
@@ -1422,19 +1422,25 @@
  		.tuner_type   = TUNER_XC2028,
  		.tuner_gpio   = default_tuner_gpio,
  		.decoder      = EM28XX_TVP5150,
+                .mts_firmware = 1,
+                .has_dvb      = 1,
+                .dvb_gpio     = kworld_330u_digital, 
 

  		.input        = { {
  			.type     = EM28XX_VMUX_TELEVISION,
  			.vmux     = TVP5150_COMPOSITE0,
  			.amux     = EM28XX_AMUX_VIDEO,
-		}, {
+			.gpio     = default_analog,
+		},/* {
  			.type     = EM28XX_VMUX_COMPOSITE1,
  			.vmux     = TVP5150_COMPOSITE1,
  			.amux     = EM28XX_AMUX_LINE_IN,
+			.gpio     = kworld_330u_analog,
  		}, {
  			.type     = EM28XX_VMUX_SVIDEO,
  			.vmux     = TVP5150_SVIDEO,
  			.amux     = EM28XX_AMUX_LINE_IN,
-		} },
+			.gpio     = kworld_330u_analog,
+		} */},
  	},
  	[EM2882_BOARD_TERRATEC_HYBRID_XS] = {
  		.name         = "Terratec Hybrid XS (em2882)",
@@ -2143,6 +2149,7 @@
  		ctl->demod = XC3028_FE_DEFAULT;
  		break;
  	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_KWORLD_VS_DVBT:
  		ctl->demod = XC3028_FE_CHINA;
  		ctl->fname = XC2028_DEFAULT_FIRMWARE;
  		break;
diff -r aba823ecaea6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Thu Nov 12 12:21:05 
2009 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sun Nov 22 11:50:29 
2009 +0100
@@ -504,6 +504,7 @@
  		break;
  	case EM2880_BOARD_TERRATEC_HYBRID_XS:
  	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_KWORLD_VS_DVBT:
  		dvb->frontend = dvb_attach(zl10353_attach,
  					   &em28xx_zl10353_xc3028_no_i2c_gate,
  					   &dev->i2c_adap);



[-- Attachment #2: parsed_UsbSnoop.log.tar.gz --]
[-- Type: application/gzip, Size: 36519 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2009-11-14 14:34   ` Devin Heitmueller
                       ` (2 preceding siblings ...)
  2009-11-22 11:02     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
@ 2010-01-30 17:10     ` Andrea.Amorosi76
  2010-02-03 18:45     ` Andrea.Amorosi76
  2010-02-09 18:43     ` Andrea.Amorosi76
  5 siblings, 0 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2010-01-30 17:10 UTC (permalink / raw)
  To: Linux Media Mailing List

[-- Attachment #1: Type: text/plain, Size: 4414 bytes --]

This patch add the Dikom DK300 hybrid usb card.

The patch adds digital and analogue tv support.

Not tested: remote controller

To be done: it seems that with the proposed patch the digital 
demodulator remains activated if the tuner is switched from digital to 
analogue mode.
Workaorund is to unplug and replug the device when switching from
digital to analogue.
If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.
I attach the usbsnoop obtained some month ago using windows xp.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30 
01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30 
18:04:13 2010 +0100
@@ -245,6 +245,12 @@
  	{	-1,		-1,	-1,		-1},
  };

+static struct em28xx_reg_seq dikom_dk300_digital[] = {
+	{EM28XX_R08_GPIO,	0x6e,	~EM_GPIO_4,	10},
+	{EM2880_R04_GPO,	0x08,	0xff,		10},
+	{ -1,			-1,	-1,		-1},
+};
+

  /*
   *  Board definitions
@@ -1673,6 +1679,22 @@
  		.tuner_gpio    = reddo_dvb_c_usb_box,
  		.has_dvb       = 1,
  	},
+	[EM2882_BOARD_DIKOM_DK300] = {
+		.name         = "Dikom DK300",
+		.valid        = EM28XX_BOARD_NOT_VALIDATED,
+		.tuner_type   = TUNER_XC2028,
+		.tuner_gpio   = default_tuner_gpio,
+		.decoder      = EM28XX_TVP5150,
+		.mts_firmware = 1,
+		.has_dvb      = 1,
+		.dvb_gpio     = dikom_dk300_digital,
+		.input        = { {
+			.type     = EM28XX_VMUX_TELEVISION,
+			.vmux     = TVP5150_COMPOSITE0,
+			.amux     = EM28XX_AMUX_VIDEO,
+			.gpio     = default_analog,
+		} },
+	},
  };
  const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);

@@ -1812,6 +1834,7 @@
  	{0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
  	{0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
  	{0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
+	{0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
  };

  /* I2C devicelist hash table for devices with generic USB IDs */
@@ -2168,6 +2191,7 @@
  		ctl->demod = XC3028_FE_DEFAULT;
  		break;
  	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_DIKOM_DK300:
  		ctl->demod = XC3028_FE_CHINA;
  		ctl->fname = XC2028_DEFAULT_FIRMWARE;
  		break;
@@ -2480,6 +2504,31 @@
  		em28xx_gpio_set(dev, dev->board.tuner_gpio);
  		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
  		break;
+
+/*
+		 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
+		 *
+		 * This occurs because they share identical USB vendor and
+		 * product IDs.
+		 *
+		 * What we do here is look up the EEPROM hash of the Dikom
+		 * and if it is found then we decide that we do not have
+		 * a Kworld and reset the device to the Dikom instead.
+		 *
+		 * This solution is only valid if they do not share eeprom
+		 * hash identities which has not been determined as yet.
+		 */
+	case EM2882_BOARD_KWORLD_VS_DVBT:
+		if (!em28xx_hint_board(dev))
+			em28xx_set_model(dev);
+
+		/* In cases where we had to use a board hint, the call to
+		   em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
+		   so make the call now so the analog GPIOs are set properly
+		   before probing the i2c bus. */
+		em28xx_gpio_set(dev, dev->board.tuner_gpio);
+		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
+		break;
  	}

  #if defined(CONFIG_MODULES) && defined(MODULE)
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 01:27:34 
2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 18:04:13 
2010 +0100
@@ -504,6 +504,7 @@
  		break;
  	case EM2880_BOARD_TERRATEC_HYBRID_XS:
  	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_DIKOM_DK300:
  		dvb->frontend = dvb_attach(zl10353_attach,
  					   &em28xx_zl10353_xc3028_no_i2c_gate,
  					   &dev->i2c_adap);
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 01:27:34 2010 
-0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 18:04:13 2010 
+0100
@@ -112,6 +112,7 @@
  #define EM2861_BOARD_GADMEI_UTV330PLUS           72
  #define EM2870_BOARD_REDDO_DVB_C_USB_BOX          73
  #define EM2800_BOARD_VC211A			  74
+#define EM2882_BOARD_DIKOM_DK300		75

  /* Limits minimum and default number of buffers */
  #define EM28XX_MIN_BUF 4





[-- Attachment #2: parsed_UsbSnoop.log.tar.gz --]
[-- Type: application/gzip, Size: 36519 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2009-11-14 14:34   ` Devin Heitmueller
                       ` (3 preceding siblings ...)
  2010-01-30 17:10     ` [PATCH] em28xx: add Dikom DK300 hybrid USB tuner Andrea.Amorosi76
@ 2010-02-03 18:45     ` Andrea.Amorosi76
  2010-02-09 18:43     ` Andrea.Amorosi76
  5 siblings, 0 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2010-02-03 18:45 UTC (permalink / raw)
  To: Linux Media Mailing List

This patch add the Dikom DK300 hybrid usb card.

The patch adds digital and analogue tv support.

Not tested: remote controller

To be done: it seems that with the proposed patch the digital
demodulator remains activated if the tuner is switched from digital to
analogue mode.
Workaorund is to unplug and replug the device when switching from
digital to analogue.
If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.
I attach the usbsnoop obtained some month ago using windows xp.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30
01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30
18:04:13 2010 +0100
@@ -245,6 +245,12 @@
   	{	-1,		-1,	-1,		-1},
   };

+static struct em28xx_reg_seq dikom_dk300_digital[] = {
+	{EM28XX_R08_GPIO,	0x6e,	~EM_GPIO_4,	10},
+	{EM2880_R04_GPO,	0x08,	0xff,		10},
+	{ -1,			-1,	-1,		-1},
+};
+

   /*
    *  Board definitions
@@ -1673,6 +1679,22 @@
   		.tuner_gpio    = reddo_dvb_c_usb_box,
   		.has_dvb       = 1,
   	},
+	[EM2882_BOARD_DIKOM_DK300] = {
+		.name         = "Dikom DK300",
+		.valid        = EM28XX_BOARD_NOT_VALIDATED,
+		.tuner_type   = TUNER_XC2028,
+		.tuner_gpio   = default_tuner_gpio,
+		.decoder      = EM28XX_TVP5150,
+		.mts_firmware = 1,
+		.has_dvb      = 1,
+		.dvb_gpio     = dikom_dk300_digital,
+		.input        = { {
+			.type     = EM28XX_VMUX_TELEVISION,
+			.vmux     = TVP5150_COMPOSITE0,
+			.amux     = EM28XX_AMUX_VIDEO,
+			.gpio     = default_analog,
+		} },
+	},
   };
   const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);

@@ -1812,6 +1834,7 @@
   	{0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
   	{0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
   	{0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
+	{0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
   };

   /* I2C devicelist hash table for devices with generic USB IDs */
@@ -2168,6 +2191,7 @@
   		ctl->demod = XC3028_FE_DEFAULT;
   		break;
   	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_DIKOM_DK300:
   		ctl->demod = XC3028_FE_CHINA;
   		ctl->fname = XC2028_DEFAULT_FIRMWARE;
   		break;
@@ -2480,6 +2504,31 @@
   		em28xx_gpio_set(dev, dev->board.tuner_gpio);
   		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
   		break;
+
+/*
+		 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
+		 *
+		 * This occurs because they share identical USB vendor and
+		 * product IDs.
+		 *
+		 * What we do here is look up the EEPROM hash of the Dikom
+		 * and if it is found then we decide that we do not have
+		 * a Kworld and reset the device to the Dikom instead.
+		 *
+		 * This solution is only valid if they do not share eeprom
+		 * hash identities which has not been determined as yet.
+		 */
+	case EM2882_BOARD_KWORLD_VS_DVBT:
+		if (!em28xx_hint_board(dev))
+			em28xx_set_model(dev);
+
+		/* In cases where we had to use a board hint, the call to
+		   em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
+		   so make the call now so the analog GPIOs are set properly
+		   before probing the i2c bus. */
+		em28xx_gpio_set(dev, dev->board.tuner_gpio);
+		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
+		break;
   	}

   #if defined(CONFIG_MODULES) && defined(MODULE)
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 01:27:34
2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 18:04:13
2010 +0100
@@ -504,6 +504,7 @@
   		break;
   	case EM2880_BOARD_TERRATEC_HYBRID_XS:
   	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_DIKOM_DK300:
   		dvb->frontend = dvb_attach(zl10353_attach,
   					   &em28xx_zl10353_xc3028_no_i2c_gate,
   					   &dev->i2c_adap);
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 01:27:34 2010
-0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 18:04:13 2010
+0100
@@ -112,6 +112,7 @@
   #define EM2861_BOARD_GADMEI_UTV330PLUS           72
   #define EM2870_BOARD_REDDO_DVB_C_USB_BOX          73
   #define EM2800_BOARD_VC211A			  74
+#define EM2882_BOARD_DIKOM_DK300		75

   /* Limits minimum and default number of buffers */
   #define EM28XX_MIN_BUF 4






^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2009-11-14 14:34   ` Devin Heitmueller
                       ` (4 preceding siblings ...)
  2010-02-03 18:45     ` Andrea.Amorosi76
@ 2010-02-09 18:43     ` Andrea.Amorosi76
  2010-02-09 19:21       ` Mauro Carvalho Chehab
  5 siblings, 1 reply; 19+ messages in thread
From: Andrea.Amorosi76 @ 2010-02-09 18:43 UTC (permalink / raw)
  To: Linux Media Mailing List, Mauro Carvalho Chehab

This patch add the Dikom DK300 hybrid usb card.

The patch adds digital and analogue tv support.

Not working: remote controller

To be done: it seems that with the proposed patch the digital
demodulator remains activated if the tuner is switched from digital to
analogue mode.
Workaorund is to unplug and replug the device when switching from
digital to analogue.
If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30
01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30
18:04:13 2010 +0100
@@ -245,6 +245,12 @@
   	{	-1,		-1,	-1,		-1},
   };

+static struct em28xx_reg_seq dikom_dk300_digital[] = {
+	{EM28XX_R08_GPIO,	0x6e,	~EM_GPIO_4,	10},
+	{EM2880_R04_GPO,	0x08,	0xff,		10},
+	{ -1,			-1,	-1,		-1},
+};
+

   /*
    *  Board definitions
@@ -1673,6 +1679,22 @@
   		.tuner_gpio    = reddo_dvb_c_usb_box,
   		.has_dvb       = 1,
   	},
+	[EM2882_BOARD_DIKOM_DK300] = {
+		.name         = "Dikom DK300",
+		.valid        = EM28XX_BOARD_NOT_VALIDATED,
+		.tuner_type   = TUNER_XC2028,
+		.tuner_gpio   = default_tuner_gpio,
+		.decoder      = EM28XX_TVP5150,
+		.mts_firmware = 1,
+		.has_dvb      = 1,
+		.dvb_gpio     = dikom_dk300_digital,
+		.input        = { {
+			.type     = EM28XX_VMUX_TELEVISION,
+			.vmux     = TVP5150_COMPOSITE0,
+			.amux     = EM28XX_AMUX_VIDEO,
+			.gpio     = default_analog,
+		} },
+	},
   };
   const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);

@@ -1812,6 +1834,7 @@
   	{0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
   	{0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
   	{0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
+	{0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
   };

   /* I2C devicelist hash table for devices with generic USB IDs */
@@ -2168,6 +2191,7 @@
   		ctl->demod = XC3028_FE_DEFAULT;
   		break;
   	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_DIKOM_DK300:
   		ctl->demod = XC3028_FE_CHINA;
   		ctl->fname = XC2028_DEFAULT_FIRMWARE;
   		break;
@@ -2480,6 +2504,31 @@
   		em28xx_gpio_set(dev, dev->board.tuner_gpio);
   		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
   		break;
+
+/*
+		 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
+		 *
+		 * This occurs because they share identical USB vendor and
+		 * product IDs.
+		 *
+		 * What we do here is look up the EEPROM hash of the Dikom
+		 * and if it is found then we decide that we do not have
+		 * a Kworld and reset the device to the Dikom instead.
+		 *
+		 * This solution is only valid if they do not share eeprom
+		 * hash identities which has not been determined as yet.
+		 */
+	case EM2882_BOARD_KWORLD_VS_DVBT:
+		if (!em28xx_hint_board(dev))
+			em28xx_set_model(dev);
+
+		/* In cases where we had to use a board hint, the call to
+		   em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
+		   so make the call now so the analog GPIOs are set properly
+		   before probing the i2c bus. */
+		em28xx_gpio_set(dev, dev->board.tuner_gpio);
+		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
+		break;
   	}

   #if defined(CONFIG_MODULES) && defined(MODULE)
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 01:27:34
2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 18:04:13
2010 +0100
@@ -504,6 +504,7 @@
   		break;
   	case EM2880_BOARD_TERRATEC_HYBRID_XS:
   	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_DIKOM_DK300:
   		dvb->frontend = dvb_attach(zl10353_attach,
   					   &em28xx_zl10353_xc3028_no_i2c_gate,
   					   &dev->i2c_adap);
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 01:27:34 2010
-0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 18:04:13 2010
+0100
@@ -112,6 +112,7 @@
   #define EM2861_BOARD_GADMEI_UTV330PLUS           72
   #define EM2870_BOARD_REDDO_DVB_C_USB_BOX          73
   #define EM2800_BOARD_VC211A			  74
+#define EM2882_BOARD_DIKOM_DK300		75

   /* Limits minimum and default number of buffers */
   #define EM28XX_MIN_BUF 4







^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 18:43     ` Andrea.Amorosi76
@ 2010-02-09 19:21       ` Mauro Carvalho Chehab
  2010-02-09 20:10         ` Andrea.Amorosi76
  2010-02-09 20:53         ` Andrea.Amorosi76
  0 siblings, 2 replies; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-09 19:21 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

Andrea.Amorosi76@gmail.com wrote:
> This patch add the Dikom DK300 hybrid usb card.
> 
> The patch adds digital and analogue tv support.
> 
> Not working: remote controller

> diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
> 01:27:34 2010 -0200
> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
> 18:04:13 2010 +0100

Your patch got mangled by Thunderbird. You should or use Asalted Patches
plugin:
        https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/

or use another emailer. Without the above plugin, long lines are broken,
damaging your patch.

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 19:21       ` Mauro Carvalho Chehab
@ 2010-02-09 20:10         ` Andrea.Amorosi76
  2010-02-09 21:04           ` Mauro Carvalho Chehab
  2010-02-09 20:53         ` Andrea.Amorosi76
  1 sibling, 1 reply; 19+ messages in thread
From: Andrea.Amorosi76 @ 2010-02-09 20:10 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

Mauro Carvalho Chehab ha scritto:
> Andrea.Amorosi76@gmail.com wrote:
>   
>> This patch add the Dikom DK300 hybrid usb card.
>>
>> The patch adds digital and analogue tv support.
>>
>> Not working: remote controller
>>     
>
>   
>> diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
>> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>> 01:27:34 2010 -0200
>> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>> 18:04:13 2010 +0100
>>     
>
> Your patch got mangled by Thunderbird. You should or use Asalted Patches
> plugin:
>         https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/
>
> or use another emailer. Without the above plugin, long lines are broken,
> damaging your patch.
>
> Cheers,
> Mauro
>
>   
Hi Mauro,
I've tried to install the extension, but it is not compatible with mine 
tb version (which is the one from kubuntu repositories 2.0.0.23).
Do you know if there is any tb config that can be manually changed to 
solve the problem. If not, do you know if seamonkey has the same issue 
(in case I have to chenge to another mail program this is my first choose)?
Thank you,
Xwang

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 19:21       ` Mauro Carvalho Chehab
  2010-02-09 20:10         ` Andrea.Amorosi76
@ 2010-02-09 20:53         ` Andrea.Amorosi76
  2010-02-09 21:13           ` Mauro Carvalho Chehab
  2010-02-10 23:15           ` Mauro Carvalho Chehab
  1 sibling, 2 replies; 19+ messages in thread
From: Andrea.Amorosi76 @ 2010-02-09 20:53 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Linux Media Mailing List

Mauro Carvalho Chehab ha scritto:
> Andrea.Amorosi76@gmail.com wrote:
>> This patch add the Dikom DK300 hybrid usb card.
>>
>> The patch adds digital and analogue tv support.
>>
>> Not working: remote controller
> 
>> diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
>> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>> 01:27:34 2010 -0200
>> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>> 18:04:13 2010 +0100
> 
> Your patch got mangled by Thunderbird. You should or use Asalted Patches
> plugin:
>         https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/
> 
> or use another emailer. Without the above plugin, long lines are broken,
> damaging your patch.
> 
> Cheers,
> Mauro
> 
Is it ok now?
Andrea

This patch add the Dikom DK300 hybrid usb card.

The patch adds digital and analogue tv support.

Not working: remote controller

To be done: it seems that with the proposed patch the digital
demodulator remains activated if the tuner is switched from digital to
analogue mode.
Workaorund is to unplug and replug the device when switching from
digital to analogue.
If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.

Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com>

diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30 01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c	Sat Jan 30 18:04:13 2010 +0100
@@ -245,6 +245,12 @@
  	{	-1,		-1,	-1,		-1},
  };

+static struct em28xx_reg_seq dikom_dk300_digital[] = {
+	{EM28XX_R08_GPIO,	0x6e,	~EM_GPIO_4,	10},
+	{EM2880_R04_GPO,	0x08,	0xff,		10},
+	{ -1,			-1,	-1,		-1},
+};
+

  /*
   *  Board definitions
@@ -1673,6 +1679,22 @@
  		.tuner_gpio    = reddo_dvb_c_usb_box,
  		.has_dvb       = 1,
  	},
+	[EM2882_BOARD_DIKOM_DK300] = {
+		.name         = "Dikom DK300",
+		.valid        = EM28XX_BOARD_NOT_VALIDATED,
+		.tuner_type   = TUNER_XC2028,
+		.tuner_gpio   = default_tuner_gpio,
+		.decoder      = EM28XX_TVP5150,
+		.mts_firmware = 1,
+		.has_dvb      = 1,
+		.dvb_gpio     = dikom_dk300_digital,
+		.input        = { {
+			.type     = EM28XX_VMUX_TELEVISION,
+			.vmux     = TVP5150_COMPOSITE0,
+			.amux     = EM28XX_AMUX_VIDEO,
+			.gpio     = default_analog,
+		} },
+	},
  };
  const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);

@@ -1812,6 +1834,7 @@
  	{0xcee44a99, EM2882_BOARD_EVGA_INDTUBE, TUNER_XC2028},
  	{0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO, TUNER_XC2028},
  	{0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX, TUNER_ABSENT},
+	{0x4e913442, EM2882_BOARD_DIKOM_DK300, TUNER_XC2028},
  };

  /* I2C devicelist hash table for devices with generic USB IDs */
@@ -2168,6 +2191,7 @@
  		ctl->demod = XC3028_FE_DEFAULT;
  		break;
  	case EM2883_BOARD_KWORLD_HYBRID_330U:
+	case EM2882_BOARD_DIKOM_DK300:
  		ctl->demod = XC3028_FE_CHINA;
  		ctl->fname = XC2028_DEFAULT_FIRMWARE;
  		break;
@@ -2480,6 +2504,31 @@
  		em28xx_gpio_set(dev, dev->board.tuner_gpio);
  		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
  		break;
+
+/*
+		 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
+		 *
+		 * This occurs because they share identical USB vendor and
+		 * product IDs.
+		 *
+		 * What we do here is look up the EEPROM hash of the Dikom
+		 * and if it is found then we decide that we do not have
+		 * a Kworld and reset the device to the Dikom instead.
+		 *
+		 * This solution is only valid if they do not share eeprom
+		 * hash identities which has not been determined as yet.
+		 */
+	case EM2882_BOARD_KWORLD_VS_DVBT:
+		if (!em28xx_hint_board(dev))
+			em28xx_set_model(dev);
+
+		/* In cases where we had to use a board hint, the call to
+		   em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
+		   so make the call now so the analog GPIOs are set properly
+		   before probing the i2c bus. */
+		em28xx_gpio_set(dev, dev->board.tuner_gpio);
+		em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
+		break;
  	}

  #if defined(CONFIG_MODULES) && defined(MODULE)
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-dvb.c
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c	Sat Jan 30 18:04:13 2010 +0100
@@ -504,6 +504,7 @@
  		break;
  	case EM2880_BOARD_TERRATEC_HYBRID_XS:
  	case EM2881_BOARD_PINNACLE_HYBRID_PRO:
+	case EM2882_BOARD_DIKOM_DK300:
  		dvb->frontend = dvb_attach(zl10353_attach,
  					   &em28xx_zl10353_xc3028_no_i2c_gate,
  					   &dev->i2c_adap);
diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx.h
--- a/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 01:27:34 2010 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx.h	Sat Jan 30 18:04:13 2010 +0100
@@ -112,6 +112,7 @@
  #define EM2861_BOARD_GADMEI_UTV330PLUS           72
  #define EM2870_BOARD_REDDO_DVB_C_USB_BOX          73
  #define EM2800_BOARD_VC211A			  74
+#define EM2882_BOARD_DIKOM_DK300		75

  /* Limits minimum and default number of buffers */
  #define EM28XX_MIN_BUF 4


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 20:10         ` Andrea.Amorosi76
@ 2010-02-09 21:04           ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-09 21:04 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

Andrea.Amorosi76@gmail.com wrote:
> Mauro Carvalho Chehab ha scritto:
>> Andrea.Amorosi76@gmail.com wrote:
>>  
>>> This patch add the Dikom DK300 hybrid usb card.
>>>
>>> The patch adds digital and analogue tv support.
>>>
>>> Not working: remote controller
>>>     
>>
>>  
>>> diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
>>> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>>> 01:27:34 2010 -0200
>>> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>>> 18:04:13 2010 +0100
>>>     
>>
>> Your patch got mangled by Thunderbird. You should or use Asalted Patches
>> plugin:
>>         https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/
>>
>> or use another emailer. Without the above plugin, long lines are broken,
>> damaging your patch.
>>
>> Cheers,
>> Mauro
>>
>>   
> Hi Mauro,
> I've tried to install the extension, but it is not compatible with mine
> tb version (which is the one from kubuntu repositories 2.0.0.23).

I'm using it here with Thunderbird 2.0.0.22. 

There's a patch on that tree that worked to me:

https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/rev/49d587f60371

You may try to play with that file.

> Do you know if there is any tb config that can be manually changed to
> solve the problem. If not, do you know if seamonkey has the same issue
> (in case I have to chenge to another mail program this is my first choose)?

Seamonkey likely has the same problem. Evolution and claws-mail work, but you
need to disable the line wrapping on them. I've used both in the past, but they
are very slow (Evolution eats too much memory - so you need to close it from time
to time - and claws-mail is monothread: when it fetches email,  the edit window
process seems to stop). The text mode emailers (mutt and alpine) also work, if properly
configured.

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


-- 

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 20:53         ` Andrea.Amorosi76
@ 2010-02-09 21:13           ` Mauro Carvalho Chehab
  2010-02-10 23:15           ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-09 21:13 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

Andrea.Amorosi76@gmail.com wrote:
> Mauro Carvalho Chehab ha scritto:
>> Andrea.Amorosi76@gmail.com wrote:
>>> This patch add the Dikom DK300 hybrid usb card.
>>>
>>> The patch adds digital and analogue tv support.
>>>
>>> Not working: remote controller
>>
>>> diff -r d6520e486ee6 linux/drivers/media/video/em28xx/em28xx-cards.c
>>> --- a/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>>> 01:27:34 2010 -0200
>>> +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c    Sat Jan 30
>>> 18:04:13 2010 +0100
>>
>> Your patch got mangled by Thunderbird. You should or use Asalted Patches
>> plugin:
>>         https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/
>>
>> or use another emailer. Without the above plugin, long lines are broken,
>> damaging your patch.
>>
>> Cheers,
>> Mauro
>>
> Is it ok now?

Yes. Patchwork got it properly:
	http://patchwork.kernel.org/patch/78193/

So, the patch is now on my queue ;)

-- 

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] em28xx: add Dikom DK300 hybrid USB tuner
  2010-02-09 20:53         ` Andrea.Amorosi76
  2010-02-09 21:13           ` Mauro Carvalho Chehab
@ 2010-02-10 23:15           ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 19+ messages in thread
From: Mauro Carvalho Chehab @ 2010-02-10 23:15 UTC (permalink / raw)
  To: Andrea.Amorosi76; +Cc: Linux Media Mailing List

Andrea.Amorosi76@gmail.com wrote:

I had to fix small merging conflicts.

> +        .valid        = EM28XX_BOARD_NOT_VALIDATED,

Also, you tested the board, so, I'm removing the .valid tag.

Cheers,
Mauro

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-02-10 23:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-14 11:22 [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode) Andrea.Amorosi76
2009-11-14 13:05 ` Andrea.Amorosi76
2009-11-14 14:34   ` Devin Heitmueller
2009-11-14 22:21     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
2009-11-14 22:47       ` Andrea.Amorosi76
     [not found]     ` <4AFF1203.3080401@gmail.com>
     [not found]       ` <829197380911150719w7ea0749ei2a1350f1e12b866d@mail.gmail.com>
     [not found]         ` <4B001ECD.9030609@gmail.com>
     [not found]           ` <829197380911152055w233edf18ve36b821571198d04@mail.gmail.com>
     [not found]             ` <4B01B168.50403@gmail.com>
2009-11-16 20:28               ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) (digital mode) Devin Heitmueller
     [not found]                 ` <4B01B841.7000506@gmail.com>
2009-11-16 20:47                   ` Devin Heitmueller
     [not found]                 ` <4B01BABE.4060609@gmail.com>
2009-11-16 20:56                   ` Devin Heitmueller
2009-11-18 18:59                     ` Andrea.Amorosi76
2009-11-22 11:02     ` [PATCH] em28xx: fix for Dikom DK300 hybrid USB tuner (aka Kworld VS-DVB-T 323UR ) Andrea.Amorosi76
2010-01-30 17:10     ` [PATCH] em28xx: add Dikom DK300 hybrid USB tuner Andrea.Amorosi76
2010-02-03 18:45     ` Andrea.Amorosi76
2010-02-09 18:43     ` Andrea.Amorosi76
2010-02-09 19:21       ` Mauro Carvalho Chehab
2010-02-09 20:10         ` Andrea.Amorosi76
2010-02-09 21:04           ` Mauro Carvalho Chehab
2010-02-09 20:53         ` Andrea.Amorosi76
2010-02-09 21:13           ` Mauro Carvalho Chehab
2010-02-10 23:15           ` Mauro Carvalho Chehab

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.