missing DIB9000 if MEDIA_SUBDRV_AUTOSELECT in Kconfig

2015-08-05 Thread Eddi De Pieri
Hi,

Please can you confirm that is correct the missing of

select DVB_DIB9000 if MEDIA_SUBDRV_AUTOSELECT in
drivers/media/usb/dvb-usb/Kconfig?

config DVB_USB_DIB0700
tristate DiBcom DiB0700 USB DVB devices (see help for
supported devices)
depends on DVB_USB
select DVB_DIB7000P if MEDIA_SUBDRV_AUTOSELECT
select DVB_DIB7000M if MEDIA_SUBDRV_AUTOSELECT
select DVB_DIB8000 if MEDIA_SUBDRV_AUTOSELECT
+select DVB_DIB9000 if MEDIA_SUBDRV_AUTOSELECT
select DVB_DIB3000MC if MEDIA_SUBDRV_AUTOSELECT
select DVB_S5H1411 if MEDIA_SUBDRV_AUTOSELECT
select DVB_LGDT3305 if MEDIA_SUBDRV_AUTOSELECT


Regards,

Eddi
--
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: Terratec H7 with yet another usb ID

2014-12-05 Thread Eddi De Pieri
Hi,

I got a sample usb tuner with similar issue with following
vendor/product 13d3:0ccd.

Onboard it have: CY7C68013A-56PVXC and a SI2168-40. The tuner isn't
visible since is covered by a shield.

I've tried to patch the az6007 to make it working.

si2168 4-0064: Silicon Labs Si2168 successfully attached
si2157 5-0060: unknown chip version Si2147-A30

after applying latest patch from patchwork:

si2157 5-0060: Silicon Labs Si2157/Si2158 successfully attached

Now tuner seems to be connected but a w_scan don't detect any channel...

Can you give me some some hint on troubleshooting this issue?

Actually I'm brutally changed the initialization with copy and paste
of silab attach from cxusb.c and em28xx-dvb.c by removing the drxk
init..

Since the chinese producer recicled old vid/pid.but what is the
correct way to probe for multiple frontend and choose the right one?

Eddi


On Mon, Feb 3, 2014 at 11:33 PM, Antti Palosaari cr...@iki.fi wrote:
 Hei Rik


 On 03.02.2014 22:21, Rik van Mierlo wrote:

 Hi,

 I've recently purchased a Terratec H7, based on the fact that is was
 supported for a while now. Unfortunately, it turns out that my device
 uses a different product id, and maybe is not quite the same device
 inside either.

 ProductID for the Terratec H7 revisions in the module is either 10b4 or
 10a3, the one I purchased is 10a5. Following this patch:

 https://patchwork.linuxtv.org/patch/9691

 I modified drivers/media/usb/dvb-usb-v2/az6007.c to include an
 additional device:

 static struct usb_device_id az6007_usb_table[] = {
  {DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007,
  az6007_props, Azurewave 6007, RC_MAP_EMPTY)},
  {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7,
  az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
  {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_2,
  az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
  {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_3,
  az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
  {DVB_USB_DEVICE(USB_VID_TECHNISAT,
 USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI,
  az6007_cablestar_hdci_props, Technisat CableStar
 Combo HD CI, RC_MAP_EMPTY)},
  {0},
 };

 and added the following to drivers/media/dvb-core/dvb-usb-ids.h

 #define USB_PID_TERRATEC_H7_3   0x10a5

 and recompiled/installed the kernel and modules. The module seems to
 have changed somewhat in 3.12.6 from the version that the patch was
 meant for, so I hope I this was all I had to change.

 Rebooting and plugging in the device now at least leads to a recognized
 device, but scanning for channels with w_scan does not work, and from
 the dmesg output below, it seems something is not working after loading
 the drxk firmware. Does anybody know what I could try next to get this
 device working? Could it be that the drxk firmware is not suitable for
 this revision of the device?

 [  700.112072] usb 4-2: new high-speed USB device number 2 using ehci-pci
 [  700.245092] usb 4-2: New USB device found, idVendor=0ccd,
 idProduct=10a5
 [  700.245105] usb 4-2: New USB device strings: Mfr=1, Product=2,
 SerialNumber=3
 [  700.245114] usb 4-2: Product: TERRATEC T2/T/C CI USB
 [  700.245123] usb 4-2: Manufacturer: TERRATEC
 [  700.245131] usb 4-2: SerialNumber: 20130903
 [  700.494693] usb read operation failed. (-32)
 [  700.495039] usb write operation failed. (-32)
 [  700.495413] usb write operation failed. (-32)
 [  700.495787] usb write operation failed. (-32)


 These low level errors does not promise any good. Are these coming from USB
 stack as there is no even bus ID (4-2)...

 [  700.495800] usb 4-2: dvb_usb_v2: found a 'Terratec H7' in cold state
 [  700.507381] usb 4-2: firmware: direct-loading firmware
 dvb-usb-terratec-h7-az6007.fw
 [  700.507397] usb 4-2: dvb_usb_v2: downloading firmware from file
 'dvb-usb-terratec-h7-az6007.fw'
 [  700.524301] usb 4-2: dvb_usb_v2: found a 'Terratec H7' in warm state
 [  701.760878] usb 4-2: dvb_usb_v2: will pass the complete MPEG2
 transport stream to the software demuxer
 [  701.760947] DVB: registering new adapter (Terratec H7)
 [  701.763853] usb 4-2: dvb_usb_v2: MAC address: c2:cd:0c:a5:10:00
 [  701.846469] drxk: frontend initialized.
 [  701.849123] usb 4-2: firmware: direct-loading firmware
 dvb-usb-terratec-h7-drxk.fw
 [  701.849215] usb 4-2: DVB: registering adapter 0 frontend 0 (DRXK)...
 [  701.881072] drxk: status = 0x00c04125
 [  701.881082] drxk: DeviceID 0x04 not supported
 [  701.881090] drxk: Error -22 on init_drxk


 I suspect there is no DRX-K.

 [  701.908184] mt2063_attach: Attaching MT2063
 [  701.940248] Registered IR keymap rc-nec-terratec-cinergy-xs
 [  701.940547] input: Terratec H7 as
 /devices/pci:00/:00:1d.7/usb4/4-2/rc/rc0/input16
 [  701.942559] rc0: Terratec H7 as
 

Re: Terratec H7 with yet another usb ID

2014-12-05 Thread Eddi De Pieri
Hi Rik,


I've download Terratec H7 rev 4 should be a
TechnoTrend_TT-TVStick_CT2-44xx clone so you could try to patch
dvbsky.c driver.

Strings inside the windows driver:
T E R R A T E C   S 7   D i g i t a l   T u n e r   ( D V B - S / S 2 )
T T - c o n n e c t   C T 2 _ 4 6 5 0   D V B - T / T 2   T u n e r
T E R R A T E C   H 7   D i g i t a l   T u n e r   ( D V B - T / T 2 )
T T - c o n n e c t   C T 2 _ 4 6 5 0   D V B - C   T u n e r
T E R R A T E C   H 7   D i g i t a l   T u n e r   ( D V B - C )

Regards...
Eddi

On Fri, Dec 5, 2014 at 4:11 PM, Antti Palosaari cr...@iki.fi wrote:
 Moikka
 Take USB sniffs and generate driver C-code from that sniff. Then copypaste
 that code to driver until is starts working. After that, you could remove
 all the code until you find minimum set of needed changes (error and trial).

 regards
 Antti


 On 12/05/2014 04:51 PM, Eddi De Pieri wrote:

 Hi,

 I got a sample usb tuner with similar issue with following
 vendor/product 13d3:0ccd.

 Onboard it have: CY7C68013A-56PVXC and a SI2168-40. The tuner isn't
 visible since is covered by a shield.

 I've tried to patch the az6007 to make it working.

 si2168 4-0064: Silicon Labs Si2168 successfully attached
 si2157 5-0060: unknown chip version Si2147-A30

 after applying latest patch from patchwork:

 si2157 5-0060: Silicon Labs Si2157/Si2158 successfully attached

 Now tuner seems to be connected but a w_scan don't detect any channel...

 Can you give me some some hint on troubleshooting this issue?

 Actually I'm brutally changed the initialization with copy and paste
 of silab attach from cxusb.c and em28xx-dvb.c by removing the drxk
 init..

 Since the chinese producer recicled old vid/pid.but what is the
 correct way to probe for multiple frontend and choose the right one?

 Eddi


 On Mon, Feb 3, 2014 at 11:33 PM, Antti Palosaari cr...@iki.fi wrote:

 Hei Rik


 On 03.02.2014 22:21, Rik van Mierlo wrote:


 Hi,

 I've recently purchased a Terratec H7, based on the fact that is was
 supported for a while now. Unfortunately, it turns out that my device
 uses a different product id, and maybe is not quite the same device
 inside either.

 ProductID for the Terratec H7 revisions in the module is either 10b4 or
 10a3, the one I purchased is 10a5. Following this patch:

 https://patchwork.linuxtv.org/patch/9691

 I modified drivers/media/usb/dvb-usb-v2/az6007.c to include an
 additional device:

 static struct usb_device_id az6007_usb_table[] = {
   {DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007,
   az6007_props, Azurewave 6007, RC_MAP_EMPTY)},
   {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7,
   az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
   {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_2,
   az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
   {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_3,
   az6007_props, Terratec H7,
 RC_MAP_NEC_TERRATEC_CINERGY_XS)},
   {DVB_USB_DEVICE(USB_VID_TECHNISAT,
 USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI,
   az6007_cablestar_hdci_props, Technisat CableStar
 Combo HD CI, RC_MAP_EMPTY)},
   {0},
 };

 and added the following to drivers/media/dvb-core/dvb-usb-ids.h

 #define USB_PID_TERRATEC_H7_3   0x10a5

 and recompiled/installed the kernel and modules. The module seems to
 have changed somewhat in 3.12.6 from the version that the patch was
 meant for, so I hope I this was all I had to change.

 Rebooting and plugging in the device now at least leads to a recognized
 device, but scanning for channels with w_scan does not work, and from
 the dmesg output below, it seems something is not working after loading
 the drxk firmware. Does anybody know what I could try next to get this
 device working? Could it be that the drxk firmware is not suitable for
 this revision of the device?

 [  700.112072] usb 4-2: new high-speed USB device number 2 using
 ehci-pci
 [  700.245092] usb 4-2: New USB device found, idVendor=0ccd,
 idProduct=10a5
 [  700.245105] usb 4-2: New USB device strings: Mfr=1, Product=2,
 SerialNumber=3
 [  700.245114] usb 4-2: Product: TERRATEC T2/T/C CI USB
 [  700.245123] usb 4-2: Manufacturer: TERRATEC
 [  700.245131] usb 4-2: SerialNumber: 20130903
 [  700.494693] usb read operation failed. (-32)
 [  700.495039] usb write operation failed. (-32)
 [  700.495413] usb write operation failed. (-32)
 [  700.495787] usb write operation failed. (-32)



 These low level errors does not promise any good. Are these coming from
 USB
 stack as there is no even bus ID (4-2)...

 [  700.495800] usb 4-2: dvb_usb_v2: found a 'Terratec H7' in cold state
 [  700.507381] usb 4-2: firmware: direct-loading firmware
 dvb-usb-terratec-h7-az6007.fw
 [  700.507397] usb 4-2: dvb_usb_v2: downloading firmware from file
 'dvb-usb-terratec-h7-az6007.fw'
 [  700.524301] usb 4-2: dvb_usb_v2

[PATCH] media_build update IS_ENABLED macro

2013-02-06 Thread Eddi De Pieri
Fix media_build by updating IS_ENABLED macro

Signed-off-by: Eddi De Pieri e...@depieri.net

diff --git a/v4l/compat.h b/v4l/compat.h
index 8ef90aa..fd0d139 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -1102,7 +1102,7 @@ static inline void i2c_unlock_adapter(struct
i2c_adapter *adapter)
 #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
 #define ___config_enabled(__ignored, val, ...) val
 #define IS_ENABLED(option) \
-   (config_enabled(option) || config_enabled(option##_MODULE))
+   (defined(__enabled_ ## option) || defined(__enabled_
## option ## _MODULE))
 #endif

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


Re: [PATCH] media_build update IS_ENABLED macro

2013-02-06 Thread Eddi De Pieri
Sorry ignore my patch.. it's broken

Regards Eddi

On Wed, Feb 6, 2013 at 9:48 PM, Eddi De Pieri e...@depieri.net wrote:
 Fix media_build by updating IS_ENABLED macro

 Signed-off-by: Eddi De Pieri e...@depieri.net

 diff --git a/v4l/compat.h b/v4l/compat.h
 index 8ef90aa..fd0d139 100644
 --- a/v4l/compat.h
 +++ b/v4l/compat.h
 @@ -1102,7 +1102,7 @@ static inline void i2c_unlock_adapter(struct
 i2c_adapter *adapter)
  #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
  #define ___config_enabled(__ignored, val, ...) val
  #define IS_ENABLED(option) \
 -   (config_enabled(option) || config_enabled(option##_MODULE))
 +   (defined(__enabled_ ## option) || defined(__enabled_
 ## option ## _MODULE))
  #endif

  #ifdef NEED_USB_TRANSLATE_ERRORS
--
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


IS_ENABLED media_build issue

2013-02-06 Thread Eddi De Pieri
Hi,

I'm backporting media_tree drivers to linux 3.3.6.

For a strange reason, IS_ENABLED macro fails.

I had to force definition of NEED_IS_ENABLED to make drivers to build.

Any idea?


Regards, Eddi
--
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] Support Digivox Mini HD (rtl2832)

2013-01-14 Thread Eddi De Pieri
Add support for Digivox Mini HD (rtl2832)

The tuner works, but with worst performance then realtek linux driver,
due to incomplete implementation of fc2580.c

Signed-off-by: Eddi De Pieri e...@depieri.net
Tested-by: Lorenzo Dongarrà lorenzo...@katamail.com

diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index b6f4849..c05ea16 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -1368,6 +1368,8 @@ static const struct usb_device_id rtl28xxu_id_table[] = {
rtl2832u_props, ASUS My Cinema-U3100Mini Plus V2, NULL) },
{ DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd393,
rtl2832u_props, GIGABYTE U7300, NULL) },
+   { DVB_USB_DEVICE(USB_VID_DEXATEK, 0x1104,
+   rtl2832u_props, Digivox Micro Hd, NULL) },
{ }
 };
 MODULE_DEVICE_TABLE(usb, rtl28xxu_id_table);
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Support Digivox Mini HD (rtl2832)

2013-01-14 Thread Eddi De Pieri
usb 1-2.2: DVB: registering adapter 1 frontend 0 (Realtek RTL2832 (DVB-T))...
i2c i2c-4: fc2580: FCI FC2580 successfully identified
usb 1-2.2: dvb_usb_v2: 'Digivox Micro Hd' successfully initialized and connected

On Mon, Jan 14, 2013 at 11:21 PM, Eddi De Pieri e...@depieri.net wrote:
 Add support for Digivox Mini HD (rtl2832)

 The tuner works, but with worst performance then realtek linux driver,
 due to incomplete implementation of fc2580.c

 Signed-off-by: Eddi De Pieri e...@depieri.net
 Tested-by: Lorenzo Dongarrà lorenzo...@katamail.com

 diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
 b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
 index b6f4849..c05ea16 100644
 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
 +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
 @@ -1368,6 +1368,8 @@ static const struct usb_device_id rtl28xxu_id_table[] = 
 {
 rtl2832u_props, ASUS My Cinema-U3100Mini Plus V2, NULL) },
 { DVB_USB_DEVICE(USB_VID_KWORLD_2, 0xd393,
 rtl2832u_props, GIGABYTE U7300, NULL) },
 +   { DVB_USB_DEVICE(USB_VID_DEXATEK, 0x1104,
 +   rtl2832u_props, Digivox Micro Hd, NULL) },
 { }
  };
  MODULE_DEVICE_TABLE(usb, rtl28xxu_id_table);
--
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] Support Avermedia A835B

2012-12-22 Thread Eddi De Pieri
Add support for Avermedia A835B

Signed-off-by: Eddi De Pieri e...@depieri.net

diff --git a/drivers/media/dvb-core/dvb-usb-ids.h
b/drivers/media/dvb-core/dvb-usb-ids.h
index 26c4481..84d7759 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -231,6 +231,10 @@
 #define USB_PID_AVERMEDIA_A815M0x815a
 #define USB_PID_AVERMEDIA_A835 0xa835
 #define USB_PID_AVERMEDIA_B835 0xb835
+#define USB_PID_AVERMEDIA_A835B_1835   0x1835
+#define USB_PID_AVERMEDIA_A835B_2835   0x2835
+#define USB_PID_AVERMEDIA_A835B_3835   0x3835
+#define USB_PID_AVERMEDIA_A835B_4835   0x4835
 #define USB_PID_AVERMEDIA_1867 0x1867
 #define USB_PID_AVERMEDIA_A867 0xa867
 #define USB_PID_AVERMEDIA_TWINSTAR 0x0825
diff --git a/drivers/media/usb/dvb-usb-v2/it913x.c
b/drivers/media/usb/dvb-usb-v2/it913x.c
index 1ca8fea..b2e9b87 100644
--- a/drivers/media/usb/dvb-usb-v2/it913x.c
+++ b/drivers/media/usb/dvb-usb-v2/it913x.c
@@ -773,6 +773,18 @@ static const struct usb_device_id it913x_id_table[] = {
{ DVB_USB_DEVICE(USB_VID_ITETECH, USB_PID_ITETECH_IT9135_9006,
it913x_properties, ITE 9135(9006) Generic,
RC_MAP_IT913X_V1) },
+   { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_1835,
+   it913x_properties, Avermedia A835B(1835),
+   RC_MAP_IT913X_V2) },
+   { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_2835,
+   it913x_properties, Avermedia A835B(2835),
+   RC_MAP_IT913X_V2) },
+   { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_3835,
+   it913x_properties, Avermedia A835B(3835),
+   RC_MAP_IT913X_V2) },
+   { DVB_USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835B_4835,
+   it913x_properties, Avermedia A835B(4835),
+   RC_MAP_IT913X_V2) },
{}  /* Terminating entry */
 };
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] v3 Add support to Avermedia Twinstar double tuner in af9035

2012-12-18 Thread Eddi De Pieri
Hi Antti and Jose

I'd like to advise you that I tested this path since it solve issue on
other af9035 devices like avermedia a835 and avermedia a867.

I mean:
mxl5007t_soft_reset: 522: failed!
mxl5007t_tuner_init: error -140 on line 535
mxl5007t_set_params: error -140 on line 666
mxl5007t_soft_reset: 522: failed!
mxl5007t_tuner_init: error -140 on line 535
mxl5007t_set_params: error -140 on line 666
mxl5007t_soft_reset: 522: failed!
mxl5007t_tuner_init: error -140 on line 535
mxl5007t_set_params: error -140 on line 666
mxl5007t_soft_reset: 522: failed!
mxl5007t_tuner_init: error -140 on line 535
mxl5007t_set_params: error -140 on line 666

It seems that no_reset and no_probe configuration parameter added by
jose is needed for mxl5007t initialization.

I suppose that the initialization is already done by the af9035 firmware.

Regards

Eddi De Pieri

On Sun, Sep 23, 2012 at 6:29 PM, Antti Palosaari cr...@iki.fi wrote:
 Hello Jose,
 Could you try to split and resent?

 I will get af9035 + fc0012 dual tuner next week and add support for it. I
 wish to use your patch for dual mode, but I as there is that unresolved
 MXL5007t dependency I cannot user it currently.

 regards
 Antti

 On 09/15/2012 08:45 PM, Antti Palosaari wrote:

 Hello
 Could you split that patch to 2?
 1) mxl5007t changes
 2) af9035/af9033 dual mode
 3) af9035/af9033 changes needed for mxl5007t

 I cannot say much about tuner changes, but I still wonder are those
 really needed as this device is already supported. Is it broken currently?
 What happens when no_probe = 0 ?
 What happens when no_reset = 0 ?

 Soft reset means usually resetting chip state machine. It is something
 like start operating command. First program registers then issue soft
 reset in order to restart state machine.

 regards
 Antti


 On 08/30/2012 02:02 AM, Jose Alberto Reguero wrote:

 This patch add support to the Avermedia Twinstar double tuner in the
 af9035
 driver. Version 3 of the patch.

 Signed-off-by: Jose Alberto Reguero jaregu...@telefonica.net

 Jose Alberto

 diff -upr linux/drivers/media/dvb-frontends/af9033.c
 linux.new/drivers/media/dvb-frontends/af9033.c
 --- linux/drivers/media/dvb-frontends/af9033.c2012-08-14
 05:45:22.0 +0200
 +++ linux.new/drivers/media/dvb-frontends/af9033.c2012-08-29
 16:00:52.020523899 +0200
 @@ -326,6 +326,18 @@ static int af9033_init(struct dvb_fronte
   goto err;
   }

 +if (state-cfg.ts_mode == AF9033_TS_MODE_SERIAL) {
 +ret = af9033_wr_reg_mask(state, 0x00d91c, 0x01, 0x01);
 +if (ret  0)
 +goto err;
 +ret = af9033_wr_reg_mask(state, 0x00d917, 0x00, 0x01);
 +if (ret  0)
 +goto err;
 +ret = af9033_wr_reg_mask(state, 0x00d916, 0x00, 0x01);
 +if (ret  0)
 +goto err;
 +}
 +
   state-bandwidth_hz = 0; /* force to program all parameters */

   return 0;
 diff -upr linux/drivers/media/tuners/mxl5007t.c
 linux.new/drivers/media/tuners/mxl5007t.c
 --- linux/drivers/media/tuners/mxl5007t.c2012-08-14
 05:45:22.0 +0200
 +++ linux.new/drivers/media/tuners/mxl5007t.c2012-08-29
 13:07:57.299884405 +0200
 @@ -374,7 +374,6 @@ static struct reg_pair_t *mxl5007t_calc_
   mxl5007t_set_if_freq_bits(state, cfg-if_freq_hz, cfg-invert_if);
   mxl5007t_set_xtal_freq_bits(state, cfg-xtal_freq_hz);

 -set_reg_bits(state-tab_init, 0x04, 0x01, cfg-loop_thru_enable);
   set_reg_bits(state-tab_init, 0x03, 0x08, cfg-clk_out_enable 
 3);
   set_reg_bits(state-tab_init, 0x03, 0x07, cfg-clk_out_amp);

 @@ -531,9 +530,11 @@ static int mxl5007t_tuner_init(struct mx
   struct reg_pair_t *init_regs;
   int ret;

 -ret = mxl5007t_soft_reset(state);
 -if (mxl_fail(ret))
 -goto fail;
 +if (!state-config-no_reset) {
 +ret = mxl5007t_soft_reset(state);
 +if (mxl_fail(ret))
 +goto fail;
 +}

   /* calculate initialization reg array */
   init_regs = mxl5007t_calc_init_regs(state, mode);
 @@ -887,7 +888,11 @@ struct dvb_frontend *mxl5007t_attach(str
   if (fe-ops.i2c_gate_ctrl)
   fe-ops.i2c_gate_ctrl(fe, 1);

 -ret = mxl5007t_get_chip_id(state);
 +if (!state-config-no_probe)
 +ret = mxl5007t_get_chip_id(state);
 +
 +ret = mxl5007t_write_reg(state, 0x04,
 +state-config-loop_thru_enable);

   if (fe-ops.i2c_gate_ctrl)
   fe-ops.i2c_gate_ctrl(fe, 0);
 diff -upr linux/drivers/media/tuners/mxl5007t.h
 linux.new/drivers/media/tuners/mxl5007t.h
 --- linux/drivers/media/tuners/mxl5007t.h2012-08-14
 05:45:22.0 +0200
 +++ linux.new/drivers/media/tuners/mxl5007t.h2012-08-25
 19:38:19.990920623 +0200
 @@ -73,8 +73,10 @@ struct mxl5007t_config {
   enum mxl5007t_xtal_freq xtal_freq_hz;
   enum mxl5007t_if_freq if_freq_hz;
   unsigned int invert_if:1;
 -unsigned int loop_thru_enable:1;
 +unsigned int loop_thru_enable:2

dvb_usbv2, pid filtering and adapter caps with af9035

2012-12-12 Thread Eddi De Pieri
Hi Antti,

I'm using a af9035 based usb devices on mips device but may affect other
usb tuner..

In dmesg I get a lot of
usb 1-2: dvb_usbv2: pid_filter() failed=-929852640
usb 1-2: dvb_usbv2: pid_filter() failed=-929852640
usb 1-2: dvb_usbv2: pid_filter() failed=-929852640
usb 1-2: dvb_usbv2: pid_filter() failed=-929852640
usb 1-2: dvb_usbv2: pid_filter() failed=-929852640

This should mean that the code go into the next  if..

/* activate the pid on the device pid filter */
if (adap-props-caps  DVB_USB_ADAP_HAS_PID_FILTER 
   adap-pid_filtering 
   adap-props-pid_filter)

but into af9035.c code I can't find any caps initialization, pid_filtering
or pid_filter.

It seems like that some structure isn't initalized correctly.

I can't understand if the issue is in dvb_usb_core.c that don't initialize
caps.. and pid_filter* or in each dvb_usb driver that don't null the value
of each structure..

Please, can you check?

Regards,

Eddi
--
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: possible bug in http://git.linuxtv.org/mchehab/experimental-v4l-utils.git

2012-03-01 Thread Eddi De Pieri
Hi Mauro,

 I've aplied the dvb code at the main v4l-utils tree some time ago. Since then,
 I'm applying the fixes directly there. So, please check if the issue you're 
 pointing
 weren't fix yet there. If not, please send me a patch.

The code is still unchanged.

I prefere you double check my suggested patch below since I don't
fully understand your code.

However sound strange to me that you compute bw value and then you
overwrite it.


 I suspect a bug in follow code:

                 for (bw = 0; fe_bandwidth_name[bw] != 0; bw++) {
                         if (fe_bandwidth_name[bw] == 
 v3_parms.u.ofdm.bandwidth)
                                 break;
                 }
                 dvb_fe_retrieve_parm(parms, DTV_BANDWIDTH_HZ, bw);

 I think should be something like:

                 int bw_idx;

                 dvb_fe_retrieve_parm(parms, DTV_BANDWIDTH_HZ, bw);

                 for (bw_idx = 0; fe_bandwidth_name[bw_idx] != 0; bw_idx++) {
                         if (fe_bandwidth_name[bw_idx] == bw) {
                                 v3_parms.u.ofdm.bandwidth = bw;
                                 break;
                         }
                 }

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


Re: [PATCH] smsdvb - fix UNDEFINED delivery on driver hotplug

2012-02-14 Thread Eddi De Pieri
Someone can confirm my changes?

Regards,

Eddi

On Thu, Feb 2, 2012 at 10:13 AM, Eddi De Pieri e...@depieri.net wrote:
 #dvb-fe-tool -a 1 -d DVBT

 Device Siano Mobile Digital MDTV Receiver (/dev/dvb/adapter1/frontend0)
 capabilities:

     CAN_FEC_1_2 CAN_FEC_2_3 CAN_FEC_3_4 CAN_FEC_5_6 CAN_FEC_7_8
 CAN_FEC_AUTO CAN_GUARD_INTERVAL_AUTO CAN_HIERARCHY_AUTO CAN_INVERSION_AUTO
 CAN_QAM_16 CAN_QAM_64 CAN_QAM_AUTO CAN_QPSK CAN_RECOVER
 CAN_TRANSMISSION_MODE_AUTO

 DVB API Version 5.5, Current v5 delivery system: UNDEFINED


 Signed-off-by: Eddi De Pieri e...@depieri.net
 ---
  drivers/media/dvb/siano/smsdvb.c |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)

 diff --git a/drivers/media/dvb/siano/smsdvb.c
 b/drivers/media/dvb/siano/smsdvb.c
 index 654685c..7b584cb 100644
 --- a/drivers/media/dvb/siano/smsdvb.c
 +++ b/drivers/media/dvb/siano/smsdvb.c
 @@ -866,9 +866,6 @@ static int smsdvb_hotplug(struct smscore_device_t
 *coredev,
     }

     /* init and register frontend */
 -   memcpy(client-frontend.ops, smsdvb_fe_ops,
 -  sizeof(struct dvb_frontend_ops));
 -
     switch (smscore_get_device_mode(coredev)) {
     case DEVICE_MODE_DVBT:
     case DEVICE_MODE_DVBT_BDA:
 @@ -880,6 +877,9 @@ static int smsdvb_hotplug(struct smscore_device_t
 *coredev,
     break;
     }

 +   memcpy(client-frontend.ops, smsdvb_fe_ops,
 +  sizeof(struct dvb_frontend_ops));
 +
     rc = dvb_register_frontend(client-adapter, client-frontend);
     if (rc  0) {
     sms_err(frontend registration failed %d, rc);
 --
 1.7.2.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: [PATCH 00/35] Add a driver for Terratec H7

2012-02-13 Thread Eddi De Pieri
Hi Jason,

 I didn't test dvb-t terrestrial, but under /dev/dvb i have only one adapter.
 Is there no need for two, one for cable, another for terrestrial?

Try using dvb-fe-tool from following git:

http://git.linuxtv.org/mchehab/experimental-v4l-utils.git/shortlog/refs/heads/dvbv5-0.0.1;

This tool allow switching the delivery system from DVB-C to DVB-T (and
other if supported)

Eddi
--
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: HVR-930C DVB-T mode report

2011-12-12 Thread Eddi De Pieri
Hi to all,

with latest git, w_scan partially working only if adding  -t2  or t3.

It seems that scan quality of w_scan is lower if compared to dvb_app scan

# w_scan -f t -t2 -x it-Venice-w

# w_scan -f t -t2 -I it-Venice-w stdout
wc -l stdout
73

# w_scan -f t -t3  stdout
130 it-Venice-w.stdout

# scan -f1 it-Venice-w -  it-Venice.stdout
[..]
dumping lists (62 services)
Done.


modprobe dvb-core dvb_mfe_wait_time=1

# scan -f1 it-Venice-w -  it-Venice.stdout
[..]
dumping lists (77 services)
Done.

# w_scan -F -f t -t2 -x -vvv -a /dev/dvb/adapter0/frontend1  it-Venice-w_v1
 [...]
dumping lists (115 services)
Done.

Using other device (hauppauge hvr-900h)
# w_scan -f t -x -  it-venice_hvr900h
[...]
dumping lists (461 services)
Done.

I can't figure out why these big differences...


regards,
Eddi
--
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: HVR-930C DVB-T mode report

2011-12-09 Thread Eddi De Pieri
Hi Mauro,

drxk driver seems to have 2 issue with w_scan:

- dvb-t tune error while scanning (solved by forcing w_scan to open
dvb-t fe without autoscan)
- dvb-t scan fail

so... we should have an issue that when the driver release dvb-c
adapter drxk (or xc5000?) stay in dvb-c mode

Can you check if you can replicate my error and if Terratec H5 have same issue?

follow the test:

I build w_scan 20111011 like you

-unplug tuner
-replug tuner

dmesg says:
[ 1030.370462] DVB: registering new adapter (em28xx #0)
[ 1030.370470] DVB: registering adapter 0 frontend 0 (DRXK DVB-C)...
[ 1030.370689] DVB: registering adapter 0 frontend 1 (DRXK DVB-T)...
[ 1030.371393] em28xx #0: Successfully loaded em28xx-dvb

- w_scan -a /dev/dvb/adapter0/frontend1  (the autodetect of adapter is disabled)

dmesg says:
[ 1117.000725] xc5000: waiting for firmware upload (dvb-fe-xc5000-1.6.114.fw)...
[ 1117.005404] xc5000: firmware read 12401 bytes.
[ 1117.005410] xc5000: firmware uploading...
[ 1117.416085] xc5000: firmware upload complete...

However, like Fedrik, I don't get errors on dmesg but w_scan ends with

 ERROR: Sorry - i couldn't get any working frequency/transponder
 Nothing to scan!!

- w_scan -a /dev/dvb/adapter0/frontend1  -I it-All
no error on dmesg...


- w_scan -f t -c IT
Leaving autodetect turned on I get
[  794.964818] drxk: Error -22 on QAMSetSymbolrate
[  794.964827] drxk: Error -22 on SetQAM
[  794.964832] drxk: Error -22 on Start
[  795.164518] drxk: Error -22 on QAMSetSymbolrate
[  795.164528] drxk: Error -22 on SetQAM
[  795.164534] drxk: Error -22 on Start

trying scan now...
 scan -f1 it-All
dmesg days
[ 2044.103987] drxk: Error -22 on Start
[ 2045.293728] drxk: Error -22 on SetQAM
[ 2045.293738] drxk: Error -22 on Start
[ 2045.431231] drxk: Error -22 on QAMSetSymbolrate
[ 2045.431241] drxk: Error -22 on SetQAM
[ 2045.431246] drxk: Error -22 on Start


regards,

Eddi
--
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: [PATCHv2] [media] drxk: Switch the delivery system on FE_SET_PROPERTY

2011-12-09 Thread Eddi De Pieri
Hi,

 v2: Use mfe_shared

on hvr930c this patch solve the commutation issue of frontend.

still persist same issue like Fredrik on w_scan. scan still works perfectly...


root@depieri1lnx:~# w_scan -f t -c IT
w_scan version 20110616 (compiled for DVB API 5.3)
using settings for ITALY
DVB aerial
DVB-T Europe
frontend_type DVB-T, channellist 4
output format vdr-1.6
output charset 'UTF-8', use -C charset to override
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 - DVB-C DRXK DVB-C: specified was
DVB-T - SEARCH NEXT ONE.
/dev/dvb/adapter0/frontend1 - DVB-T DRXK DVB-T: good :-)
Using DVB-T frontend (adapter /dev/dvb/adapter0/frontend1)
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.4
frontend 'DRXK DVB-T' supports
INVERSION_AUTO
QAM_AUTO
TRANSMISSION_MODE_AUTO
GUARD_INTERVAL_AUTO
HIERARCHY_AUTO
FEC_AUTO
FREQ (47.12MHz ... 865.00MHz)
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Scanning 7MHz frequencies...
[...]
858000: (time: 03:10) (time: 03:13)

ERROR: Sorry - i couldn't get any working frequency/transponder
 Nothing to scan!!


this verbose mode seems interesting but I don't figure out why i get timeout.

177500: (time: 00:04) set_frontend: using DVB API 5.4
(time: 00:06) set_frontend: using DVB API 5.4
signal ok:
QAM_AUTO f = 177500 kHz I999B7C999D999T999G999Y999
NIT (actual TS)
new transponder:
   (QAM_64   f = 160 kHz I999B8C34D0T8G16Y0)


Info: NIT(other) filter timeout
--
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: HVR-930C DVB-T mode report

2011-12-08 Thread Eddi De Pieri
Hi Mauro...

I applied your patch... the patch seems good using scan, but still
some issue with w_scan:

 tune to: 
 17750:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
0x 0x0d49: pmt_pid 0x0102 RAI -- Rai 1 (running)
0x 0x0d4a: pmt_pid 0x0101 RAI -- Rai 2 (running)
0x 0x0d4b: pmt_pid 0x0100 RAI -- Rai 3 TGR Veneto (running)
0x 0x0d53: pmt_pid 0x0118 RAI -- Rai News (running)
0x 0x0d54: pmt_pid 0x0119 Rai -- Rai 3 TGR Emilia Romagna (running)
0x 0x0d4c: pmt_pid 0x0103 Rai -- Rai Radio1 (running)
0x 0x0d4d: pmt_pid 0x0104 Rai -- Rai Radio2 (running)
0x 0x0d4e: pmt_pid 0x0105 Rai -- Rai Radio3 (running)
Network Name 'Rai'
 tune to: 
 21250:INVERSION_AUTO:BANDWIDTH_7_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE
0x 0x0001: pmt_pid 0x0023 TV7 -- TV7 MOVIE (running)
0x 0x0002: pmt_pid 0x002f TV7 -- TV7 DOC (running)
0x 0x0003: pmt_pid 0x002d TV7 -- TV7 SANITA (running)
0x 0x0004: pmt_pid 0x0026 TV7 -- TV7 ITALIA (running)
0x 0x0005: pmt_pid 0x0032 TV7 -- TV7 ATENEO (running)
0x 0x0006: pmt_pid 0x0022 TV7 -- TV7 SPORT (running)
0x 0x000b: pmt_pid 0x002b TV7 -- TV7 AZZURRA (running)
Network Name 'Triveneta TV'

using w_scan still persist issues.

Here is the results:

root@depieri1lnx:~# w_scan -f t  -c IT
w_scan version 20110616 (compiled for DVB API 5.3)
using settings for ITALY
DVB aerial
DVB-T Europe
frontend_type DVB-T, channellist 4
output format vdr-1.6
output charset 'UTF-8', use -C charset to override
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 - DVB-C DRXK DVB-C: specified was
DVB-T - SEARCH NEXT ONE.
/dev/dvb/adapter0/frontend1 - DVB-T DRXK DVB-T: good :-)
Using DVB-T frontend (adapter /dev/dvb/adapter0/frontend1)
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.4
frontend 'DRXK DVB-T' supports
INVERSION_AUTO
QAM_AUTO
TRANSMISSION_MODE_AUTO
GUARD_INTERVAL_AUTO
HIERARCHY_AUTO
FEC_AUTO
FREQ (47.12MHz ... 865.00MHz)
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Scanning 7MHz frequencies...
177500: (time: 00:00)
184500: (time: 00:03)
191500: (time: 00:06)
198500: (time: 00:09)
205500: (time: 00:12)
212500: (time: 00:15)
219500: (time: 00:17)
226500: (time: 00:20)
Scanning 8MHz frequencies...
474000: (time: 00:23)
[...]
85: (time: 02:38)
858000: (time: 02:40)


ERROR: Sorry - i couldn't get any working frequency/transponder
 Nothing to scan!!


dmesg says:
[  794.964818] drxk: Error -22 on QAMSetSymbolrate
[  794.964827] drxk: Error -22 on SetQAM
[  794.964832] drxk: Error -22 on Start
[  795.164518] drxk: Error -22 on QAMSetSymbolrate
[  795.164528] drxk: Error -22 on SetQAM
[  795.164534] drxk: Error -22 on Start
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/8] [media] em28xx: initial support for HAUPPAUGE HVR-930C again

2011-12-05 Thread Eddi De Pieri
Sorry,  I think I applied follow patch on my tree while I developed
the driver trying to fix tuner initialization.

http://patchwork.linuxtv.org/patch/6617/

I forgot to remove from my tree after I see that don't solve anything.

Regards
Eddi


On Mon, Dec 5, 2011 at 9:01 PM, Devin Heitmueller
dheitmuel...@kernellabs.com wrote:
 On Mon, Dec 5, 2011 at 1:46 PM, Devin Heitmueller
 dheitmuel...@kernellabs.com wrote:
 On Mon, Dec 5, 2011 at 1:35 PM, Mauro Carvalho Chehab
 mche...@redhat.com wrote:
 What's up with this change?  Is this a bugfix for some race condition?
  Why is it jammed into a patch for some particular product?

 It seems like a change such as this could significantly change the
 timing of tuner initialization if you have multiple xc5000 based
 products that might have a slow i2c bus.  Was that intentional?

 This patch should be NACK'd and resubmitted as it's own bugfix where
 it's implications can be fully understood in the context of all the
 other products that use xc5000.


 It is too late for nacking the patch, as there are several other patches
 were already applied on the top of it, and we don't rebase the
 linux-media.git tree.

 Assuming that this is due to some bug that Eddi picked during xc5000
 init, what it can be done now is to write a patch that would replace
 this xc5000-global mutex lock into a some other per-device locking
 schema.

 At this point we have zero idea why it's there *at all*.  Eddi, can
 you comment on what prompted this change?

 This patch should not have been accepted in the first place.  It's an
 undocumented change on a different driver than is advertised in the
 subject line.  Did you review the patch prior to merging?

 This change can result in a performance regression for all other
 devices using xc5000, and it's not yet clear why it's there in the
 first place.  If its use cannot be explained then it should be rolled
 back.  If this breaks 930c, then the whole device support series
 should be rolled back until somebody can figure out what is going on.

 It's crap like this that is the reason that every other week I get
 complaints from some user that one of the drivers I wrote support for
 worked fine for months/years until they upgraded to the latest kernel.

 Speaking of which, Mark Lord just tried out this change (he has an
 800i and 950q - both xc5000 based), and now his DVB stack fails to
 load.  And yes, he already has the fix to the mutex_unlock()
 regression which Dan Carpenter found six days ago and which this patch
 introduced.

 Devin

 --
 Devin J. Heitmueller - Kernel Labs
 http://www.kernellabs.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Hauppauge HVR-930C problems

2011-12-05 Thread Eddi De Pieri
try using scan from dvb-apps and not w_scan.

Actually It seems to me w_scan isn't compatible with this driver due
some missing lock.

On Fri, Dec 2, 2011 at 8:45 PM, Devin Heitmueller
dheitmuel...@kernellabs.com wrote:
 On Fri, Dec 2, 2011 at 2:41 PM, Fredrik Lingvall
 fredrik.lingv...@gmail.com wrote:
 The HVR 930C device has three connectors/inputs:  an antenna input, an
 S-video, and a composite video, respectively,

 The provider I have here in Norway (Get) has both analog tv and digital
 (DVB-C) so can I get analog tv using the antenna input or is analog only on
 the S-video/composite inputs? And, how do I select which analog input that
  is used?

 The analog support for that device isn't currently supported (due to a
 lack of a Linux driver for the analog demodulator).  The digital
 should work fine though (and if not, bring it to Mauro's attention
 since he has been actively working on it).

 Devin

 --
 Devin J. Heitmueller - Kernel Labs
 http://www.kernellabs.com
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] initial support for HAUPPAUGE HVR-930C again...

2011-11-21 Thread Eddi De Pieri
Attached the patch for for get_firmware

Signed-off-by: Eddi De Pieri e...@depieri.net

Regards,

Eddi
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index c466f58..503d70f 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -27,7 +27,7 @@ use IO::Handle;
 		or51211, or51132_qam, or51132_vsb, bluebird,
 		opera1, cx231xx, cx18, cx23885, pvrusb2, mpc718,
 		af9015, ngene, az6027, lme2510_lg, lme2510c_s7395,
-		lme2510c_s7395_old, drxk, drxk_terratec_h5);
+		lme2510c_s7395_old, drxk, drxk_hauppauge_hvr930c, drxk_terratec_h5);
 
 # Check args
 syntax() if (scalar(@ARGV) != 1);
@@ -652,6 +652,24 @@ sub drxk {
 $fwfile
 }
 
+sub drxk_hauppauge_hvr930c {
+my $url = http://www.wintvcd.co.uk/drivers/;;
+my $zipfile = HVR-9x0_5_10_325_28153_SIGNED.zip;
+my $hash = 83ab82e7e9480ec8bf1ae0155ca63c88;
+my $tmpdir = tempdir(DIR = /tmp, CLEANUP = 1);
+my $drvfile = HVR-900/emOEM.sys;
+my $fwfile = dvb-usb-hauppauge-hvr930c-drxk.fw;
+
+checkstandard();
+
+wgetfile($zipfile, $url . $zipfile);
+verify($zipfile, $hash);
+unzip($zipfile, $tmpdir);
+extract($tmpdir/$drvfile, 0x117b0, 42692, $fwfile);
+
+$fwfile
+}
+
 sub drxk_terratec_h5 {
 my $url = http://www.linuxtv.org/downloads/firmware/;;
 my $hash = 19000dada8e2741162ccc50cc91fa7f1;


Re: [PATCH] initial support for HAUPPAUGE HVR-930C again...

2011-11-20 Thread Eddi De Pieri
Attached the patch for for get_firmware

Regards,

Eddi

On Sun, Nov 20, 2011 at 1:57 PM, Mauro Carvalho Chehab
mche...@redhat.com wrote:
 Em 19-11-2011 13:37, Eddi De Pieri escreveu:
 With this patch I try again to add initial support for HVR930C.

 Tested only DVB-T, since in Italy Analog service is stopped.

 Actually scan -a0 -f1, find only about 50 channel while 400 should
 be available.

 Signed-off-by: Eddi De Pieri e...@depieri.net

 Tested here with DVB-C, using the Terratec firmware. It worked as expected:
 213 channels scanned, tested a few non-encrypted ones, and it seems to be
 working as expected.

 It didn't work with the firmware used by ddbrigde driver (the one that 
 get_dvb_firmware
 script is capable of retrieving).


 Regards

 Eddi


diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index c466f58..503d70f 100755
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -27,7 +27,7 @@ use IO::Handle;
 		or51211, or51132_qam, or51132_vsb, bluebird,
 		opera1, cx231xx, cx18, cx23885, pvrusb2, mpc718,
 		af9015, ngene, az6027, lme2510_lg, lme2510c_s7395,
-		lme2510c_s7395_old, drxk, drxk_terratec_h5);
+		lme2510c_s7395_old, drxk, drxk_hauppauge_hvr930c, drxk_terratec_h5);
 
 # Check args
 syntax() if (scalar(@ARGV) != 1);
@@ -652,6 +652,24 @@ sub drxk {
 $fwfile
 }
 
+sub drxk_hauppauge_hvr930c {
+my $url = http://www.wintvcd.co.uk/drivers/;;
+my $zipfile = HVR-9x0_5_10_325_28153_SIGNED.zip;
+my $hash = 83ab82e7e9480ec8bf1ae0155ca63c88;
+my $tmpdir = tempdir(DIR = /tmp, CLEANUP = 1);
+my $drvfile = HVR-900/emOEM.sys;
+my $fwfile = dvb-usb-hauppauge-hvr930c-drxk.fw;
+
+checkstandard();
+
+wgetfile($zipfile, $url . $zipfile);
+verify($zipfile, $hash);
+unzip($zipfile, $tmpdir);
+extract($tmpdir/$drvfile, 0x117b0, 42692, $fwfile);
+
+$fwfile
+}
+
 sub drxk_terratec_h5 {
 my $url = http://www.linuxtv.org/downloads/firmware/;;
 my $hash = 19000dada8e2741162ccc50cc91fa7f1;


[PATCH] initial support for HAUPPAUGE HVR-930C again...

2011-11-19 Thread Eddi De Pieri
With this patch I try again to add initial support for HVR930C.

Tested only DVB-T, since in Italy Analog service is stopped.

Actually scan -a0 -f1, find only about 50 channel while 400 should
be available.

Signed-off-by: Eddi De Pieri e...@depieri.net

Regards

Eddi
diff -u -N -r linux/drivers/media/common/tuners/xc5000.c linux.patched/drivers/media/common/tuners/xc5000.c
--- linux/drivers/media/common/tuners/xc5000.c	2011-03-31 23:56:49.0 +0200
+++ linux.patched/drivers/media/common/tuners/xc5000.c	2011-11-19 15:37:20.516138695 +0100
@@ -977,6 +977,13 @@
 	return 0;
 }
 
+static int xc5000_get_if_frequency(struct dvb_frontend *fe, u32 *frequency)
+{
+	struct xc5000_priv *priv = fe-tuner_priv;
+	*frequency = priv-if_khz * 1000;
+	return 0;
+}
+
 static int xc5000_get_status(struct dvb_frontend *fe, u32 *status)
 {
 	struct xc5000_priv *priv = fe-tuner_priv;
@@ -996,6 +1003,8 @@
 	struct xc5000_priv *priv = fe-tuner_priv;
 	int ret = 0;
 
+	mutex_lock(xc5000_list_mutex);
+
 	if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS) {
 		ret = xc5000_fwupload(fe);
 		if (ret != XC_RESULT_SUCCESS)
@@ -1015,6 +1024,8 @@
 	/* Default to CABLE mode */
 	ret |= xc_write_reg(priv, XREG_SIGNALSOURCE, XC_RF_MODE_CABLE);
 
+	mutex_unlock(xc5000_list_mutex);
+
 	return ret;
 }
 
@@ -1109,6 +1120,7 @@
 	.set_analog_params = xc5000_set_analog_params,
 	.get_frequency	   = xc5000_get_frequency,
 	.get_bandwidth	   = xc5000_get_bandwidth,
+	.get_if_frequency  = xc5000_get_if_frequency,
 	.get_status	   = xc5000_get_status
 };
 
diff -u -N -r linux/drivers/media/dvb/frontends/drxk.h linux.patched/drivers/media/dvb/frontends/drxk.h
--- linux/drivers/media/dvb/frontends/drxk.h	2011-07-11 20:09:53.0 +0200
+++ linux.patched/drivers/media/dvb/frontends/drxk.h	2011-11-19 15:20:32.119137206 +0100
@@ -25,6 +25,8 @@
 
 	bool	antenna_dvbt;
 	u16	antenna_gpio;
+	
+	intchunk_size;
 
 	const char *microcode_name;
 };
diff -u -N -r linux/drivers/media/dvb/frontends/drxk_hard.c linux.patched/drivers/media/dvb/frontends/drxk_hard.c
--- linux/drivers/media/dvb/frontends/drxk_hard.c	2011-09-04 05:45:09.0 +0200
+++ linux.patched/drivers/media/dvb/frontends/drxk_hard.c	2011-11-19 15:20:32.123137210 +0100
@@ -681,7 +681,8 @@
 	state-m_hasOOB = false;
 	state-m_hasAudio = false;
 
-	state-m_ChunkSize = 124;
+	if (!state-m_ChunkSize)
+	state-m_ChunkSize = 124;
 
 	state-m_oscClockFreq = 0;
 	state-m_smartAntInverted = false;
@@ -6423,6 +6424,7 @@
 	state-no_i2c_bridge = config-no_i2c_bridge;
 	state-antenna_gpio = config-antenna_gpio;
 	state-antenna_dvbt = config-antenna_dvbt;
+	state-m_ChunkSize = config-chunk_size;
 
 	/* NOTE: as more UIO bits will be used, add them to the mask */
 	state-UIO_mask = config-antenna_gpio;
diff -u -N -r linux/drivers/media/video/em28xx/em28xx-cards.c linux.patched/drivers/media/video/em28xx/em28xx-cards.c
--- linux/drivers/media/video/em28xx/em28xx-cards.c	2011-11-04 05:45:40.0 +0100
+++ linux.patched/drivers/media/video/em28xx/em28xx-cards.c	2011-11-19 15:21:18.247365922 +0100
@@ -336,6 +336,24 @@
 	{ -1,   -1,   -1,  -1},
 };
 
+static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
+// xc5000 reset
+	{EM2874_R80_GPIO,	0x6f,	0xff,	10},
+	{EM2874_R80_GPIO,	0x4f,	0xff,	10},
+	{EM2874_R80_GPIO,	0x6f,	0xff,	10},
+	{EM2874_R80_GPIO,	0x4f,	0xff,	10},
+	{ -1,			-1,	-1,	-1},
+};
+
+#if 0
+static struct em28xx_reg_seq hauppauge_930c_digital[] = {
+	{EM2874_R80_GPIO,	0xf6,	0xff,	10},
+	{EM2874_R80_GPIO,	0xe6,	0xff,	100},
+	{EM2874_R80_GPIO,	0xa6,	0xff,	10},
+	{ -1,			-1,	-1,	-1},
+};
+#endif
+
 /*
  *  Board definitions
  */
@@ -892,6 +910,19 @@
 EM28XX_I2C_CLK_WAIT_ENABLE |
 EM28XX_I2C_FREQ_400_KHZ,
 	},
+	[EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
+		.name = Hauppauge WinTV HVR 930C,
+		.has_dvb  = 1,
+//#if 0
+//		.tuner_type   = TUNER_XC5000,
+//		.tuner_addr   = 0x41,
+//		.dvb_gpio = hauppauge_930c_digital, /* FIXME: probably wrong */
+		.tuner_gpio   = hauppauge_930c_gpio,
+//#endif
+		.i2c_speed= EM2874_I2C_SECONDARY_BUS_SELECT |
+EM28XX_I2C_CLK_WAIT_ENABLE |
+EM28XX_I2C_FREQ_400_KHZ,
+	},
 	[EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
 		.name = Hauppauge WinTV HVR 900,
 		.tda9887_conf = TDA9887_PRESENT,
@@ -1975,6 +2006,8 @@
 			.driver_info = EM28174_BOARD_PCTV_290E },
 	{ USB_DEVICE(0x2013, 0x024c),
 			.driver_info = EM28174_BOARD_PCTV_460E },
+	{ USB_DEVICE(0x2040, 0x1605),
+			.driver_info = EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C },
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
@@ -2028,10 +2061,10 @@
 	int rc = 0;
 	struct em28xx *dev = ptr;
 
-	if (dev-tuner_type != TUNER_XC2028)
+	if (dev-tuner_type != TUNER_XC2028  dev-tuner_type != TUNER_XC5000)
 		return 0;
 
-	if (command != XC2028_TUNER_RESET)
+	if (command != XC2028_TUNER_RESET  command != XC5000_TUNER_RESET)
 		return 0;
 
 	rc = em28xx_gpio_set(dev, dev-board.tuner_gpio);
diff -u -N -r linux/drivers/media/video/em28xx/em28xx-dvb.c

Re: Trying to support for HAUPPAUGE HVR-930C

2011-07-29 Thread Eddi De Pieri
2011/7/28 Benjamin Larsson benja...@southpole.se:
 0x82 is the address of the chip handling the analog signals(?) Micronas
 AVF 4910BA1 maybe.

I don't have the schematic of hauppauge card, so I can't say you if
082 is the AVF 4910

 So change the names so it is clear that this part
 sends commands to that chip.

As I already told my patch is a derivate work of Terratec H5 Patch.
Mauro's patch should have the same issue

 I'm not sure I understand the I2C addressing but my tuner is at 0xc2 and
 the demod at 0x52.

I hate binary operation however if you shift the address you should
get same value...
0x52 = 0x29  1
0x29 = 0x52  1


Eddi
--
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


Trying to support for HAUPPAUGE HVR-930C

2011-07-28 Thread Eddi De Pieri
Hi,

I'd like to share my work to get hvr 930c.

I had to apply some change to drxk structure too!

The patch is created with git diff at with these latest 3 commit:
commit 9bc5f6fa12c9e3e1e73e66bfabe9d463ea779b08
commit a65ea1e0dba7df0f3b6d55098162cf0125164c6c
commit e5d993e5423ea4b81ccdbe2fa157ca5a75176d68

I cloned the work done for Terratec H5 devices.

- I fixed the firmware extraction I already posted
- The driver load the firmware to drxk
- The xc5000 firmware upload works and reset too.
- The if_khz should be ok (I dumped the value from usbsnoop)

- added chunk_size to drx_config since it seems hvr930c needs a custom
chunksize for firmware upload (please check since my patch may add
regression other devices)

- I temporary applied the patch
https://patchwork.kernel.org/patch/790352/mbox/ too

Actually the device don't work yet.

Please someone can review my work?


Signed-off-by: Eddi De Pieri e...@depieri.net

regards


hauppauge-hvr930c_r0.patch
Description: Binary data


PATCH add drx firmware extraction routine for hauppauge 930c

2011-07-17 Thread Eddi De Pieri
I'm trying to get this device supported starting from Mauro's work on H5

Here is the firmware extraction for hauppauge hvr930c hardware

Signed-off-by: Eddi De Pieri e...@depieri.net


get_dvb_firmware.diff
Description: Binary data