All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote)
@ 2013-11-02 19:49 Roland Scheidegger
  2013-11-05  6:14 ` Janusz S. Bien
  2013-11-27 23:08 ` Roland Scheidegger
  0 siblings, 2 replies; 4+ messages in thread
From: Roland Scheidegger @ 2013-11-02 19:49 UTC (permalink / raw)
  To: linux-media; +Cc: Roland Scheidegger

This is similar to the Terratec H7. It works with the same az6007 firmware as
the former, however the drx-k firmware of the H7 will NOT work. Hence use
a different firmware name. The firmware does not need to exist as the one in
the eeprom is just fine as long as the h7 one doesn't get loaded, but maybe
some day someone wants to load it (the one from the h5 would work too).
Also since the config entry is now different anyway disable support for rc.
AFAIK the Technisat remote (TS35) is RC5 and the code (which a code comment
claims doesn't work anyway) only would handle NEC hence it's pointless creating
a device and polling it if we already know it can't work.
CI is untested.
Originally based on idea found on
http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI claiming
only id needs to be added (but failed to mention it only worked because the
driver couldn't find the h7 drx-k firmware...).

Signed-off-by: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
---
 drivers/media/dvb-core/dvb-usb-ids.h  |  1 +
 drivers/media/usb/dvb-usb-v2/az6007.c | 59 +++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
index 419a2d6..4a53454 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -365,6 +365,7 @@
 #define USB_PID_TERRATEC_DVBS2CI_V2			0x10ac
 #define USB_PID_TECHNISAT_USB2_HDCI_V1			0x0001
 #define USB_PID_TECHNISAT_USB2_HDCI_V2			0x0002
+#define USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI		0x0003
 #define USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2		0x0004
 #define USB_PID_TECHNISAT_USB2_DVB_S2			0x0500
 #define USB_PID_CPYTO_REDI_PC50A			0xa803
diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c
index 44c64ef3..c1051c3 100644
--- a/drivers/media/usb/dvb-usb-v2/az6007.c
+++ b/drivers/media/usb/dvb-usb-v2/az6007.c
@@ -68,6 +68,19 @@ static struct drxk_config terratec_h7_drxk = {
 	.microcode_name = "dvb-usb-terratec-h7-drxk.fw",
 };
 
+static struct drxk_config cablestar_hdci_drxk = {
+	.adr = 0x29,
+	.parallel_ts = true,
+	.dynamic_clk = true,
+	.single_master = true,
+	.enable_merr_cfg = true,
+	.no_i2c_bridge = false,
+	.chunk_size = 64,
+	.mpeg_out_clk_strength = 0x02,
+	.qam_demod_parameter_count = 2,
+	.microcode_name = "dvb-usb-technisat-cablestar-hdci-drxk.fw",
+};
+
 static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
 {
 	struct az6007_device_state *st = fe_to_priv(fe);
@@ -630,6 +643,27 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
 	return 0;
 }
 
+static int az6007_cablestar_hdci_frontend_attach(struct dvb_usb_adapter *adap)
+{
+	struct az6007_device_state *st = adap_to_priv(adap);
+	struct dvb_usb_device *d = adap_to_d(adap);
+
+	pr_debug("attaching demod drxk\n");
+
+	adap->fe[0] = dvb_attach(drxk_attach, &cablestar_hdci_drxk,
+				 &d->i2c_adap);
+	if (!adap->fe[0])
+		return -EINVAL;
+
+	adap->fe[0]->sec_priv = adap;
+	st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl;
+	adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl;
+
+	az6007_ci_init(adap);
+
+	return 0;
+}
+
 static int az6007_tuner_attach(struct dvb_usb_adapter *adap)
 {
 	struct dvb_usb_device *d = adap_to_d(adap);
@@ -868,6 +902,29 @@ static struct dvb_usb_device_properties az6007_props = {
 	}
 };
 
+static struct dvb_usb_device_properties az6007_cablestar_hdci_props = {
+	.driver_name         = KBUILD_MODNAME,
+	.owner               = THIS_MODULE,
+	.firmware            = AZ6007_FIRMWARE,
+
+	.adapter_nr          = adapter_nr,
+	.size_of_priv        = sizeof(struct az6007_device_state),
+	.i2c_algo            = &az6007_i2c_algo,
+	.tuner_attach        = az6007_tuner_attach,
+	.frontend_attach     = az6007_cablestar_hdci_frontend_attach,
+	.streaming_ctrl      = az6007_streaming_ctrl,
+/* ditch get_rc_config as it can't work (TS35 remote, I believe it's rc5) */
+	.get_rc_config       = NULL,
+	.read_mac_address    = az6007_read_mac_addr,
+	.download_firmware   = az6007_download_firmware,
+	.identify_state	     = az6007_identify_state,
+	.power_ctrl          = az6007_power_ctrl,
+	.num_adapters        = 1,
+	.adapter             = {
+		{ .stream = DVB_USB_STREAM_BULK(0x02, 10, 4096), }
+	}
+};
+
 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)},
@@ -875,6 +932,8 @@ static struct usb_device_id az6007_usb_table[] = {
 		&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_TECHNISAT, USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI,
+		&az6007_cablestar_hdci_props, "Technisat CableStar Combo HD CI", RC_MAP_EMPTY)},
 	{0},
 };
 
-- 
1.8.1.4


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

* Re: [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote)
  2013-11-02 19:49 [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote) Roland Scheidegger
@ 2013-11-05  6:14 ` Janusz S. Bien
  2013-11-05 12:05   ` Janusz S. Bien
  2013-11-27 23:08 ` Roland Scheidegger
  1 sibling, 1 reply; 4+ messages in thread
From: Janusz S. Bien @ 2013-11-05  6:14 UTC (permalink / raw)
  To: Roland Scheidegger; +Cc: linux-media

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

Thank you very much for the patch.

Quote/Cytat - Roland Scheidegger <rscheidegger_lists@hispeed.ch> (Sat  
02 Nov 2013 08:49:32 PM CET):

[...]

> Originally based on idea found on
> http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI  
> claiming
> only id needs to be added (but failed to mention it only worked because the
> driver couldn't find the h7 drx-k firmware...).

Together with Tobias Wessel, another user of the device, we have  
updated and extended the wiki entry.

The problem is that although I use the same system as Tobias (Debian  
wheezy) and it seems we installed media_build in the identical way, it  
works OK for Tobias but not for me, as the required drivers are not  
loaded. The device itself is not a problem because it works perfectly  
on Windows.

Looks like udev may be the culprit, I enclose a log fragment from my  
rather chaotic experiments - I'm just a Debian user and my knowledge  
of the system internals is rudimentary.

So my questions are:

Do you have any comments or suggestions regarding the modified wiki entry?

Where to look for help with my problem?

How to uninstall media_build to start experimenting from the scratch?

Best regards

Janusz

-- 
Prof. dr hab. Janusz S. Bień -  Uniwersytet Warszawski (Katedra  
Lingwistyki Formalnej)
Prof. Janusz S. Bień - University of Warsaw (Formal Linguistics Department)
jsbien@uw.edu.pl, jsbien@mimuw.edu.pl, http://fleksem.klf.uw.edu.pl/~jsbien/

[-- Attachment #2: udevCableStar.log --]
[-- Type: text/x-log, Size: 6836 bytes --]

Nov  4 23:14:14 cauda kernel: [  343.333559] usb 7-4: New USB device found, idVendor=14f7, idProduct=0003
Nov  4 23:14:14 cauda kernel: [  343.333566] usb 7-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov  4 23:14:14 cauda kernel: [  343.333571] usb 7-4: Product: CableStar Combo HD CI
Nov  4 23:14:14 cauda kernel: [  343.333574] usb 7-4: Manufacturer: TechniSat Digital S.A.
Nov  4 23:14:14 cauda kernel: [  343.333578] usb 7-4: SerialNumber: 0008C9D91826
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4'(out) 'ID_VENDOR_FROM_DATABASE=TechniSat Digital GmbH'
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4'(out) 'ID_MODEL_FROM_DATABASE=CableStar Combo HD CI'
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4' [5215] exit with return code 0
Nov  4 23:14:14 cauda udevd[3696]: IMPORT builtin 'usb_id' /lib/udev/rules.d/60-libgphoto2-2.rules:11
Nov  4 23:14:14 cauda udevd[3696]: ID_VENDOR=TechniSat_Digital_S.A.
Nov  4 23:14:14 cauda udevd[3696]: ID_VENDOR_ENC=TechniSat\x20Digital\x20S.A.
Nov  4 23:14:14 cauda udevd[3696]: ID_VENDOR_ID=14f7
Nov  4 23:14:14 cauda udevd[3696]: ID_MODEL=CableStar_Combo_HD_CI
Nov  4 23:14:14 cauda udevd[3696]: ID_MODEL_ENC=CableStar\x20Combo\x20HD\x20CI
Nov  4 23:14:14 cauda udevd[3696]: ID_MODEL_ID=0003
Nov  4 23:14:14 cauda udevd[3696]: ID_REVISION=0003
Nov  4 23:14:14 cauda udevd[3696]: ID_SERIAL=TechniSat_Digital_S.A._CableStar_Combo_HD_CI_0008C9D91826
Nov  4 23:14:14 cauda udevd[3696]: ID_SERIAL_SHORT=0008C9D91826
Nov  4 23:14:14 cauda udevd[3696]: ID_BUS=usb
Nov  4 23:14:14 cauda udevd[3696]: ID_USB_INTERFACES=:ff0000:
Nov  4 23:14:14 cauda udevd[3696]: RUN '/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}' /etc/udev/rules.d/60-vboxdrv.rules:5
Nov  4 23:14:14 cauda udevd[3696]: PROGRAM 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.7/usb7/7-4 7 6' /lib/udev/rules.d/69-libmtp.rules:939
Nov  4 23:14:14 cauda udevd[5216]: starting 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.7/usb7/7-4 7 6'
Nov  4 23:14:14 cauda mtp-probe: checking bus 7, device 6: "/sys/devices/pci0000:00/0000:00:1d.7/usb7/7-4"
Nov  4 23:14:14 cauda mtp-probe: bus: 7, device: 6 was not an MTP device
Nov  4 23:14:14 cauda udevd[3696]: 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.7/usb7/7-4 7 6'(out) '0'
Nov  4 23:14:14 cauda udevd[3696]: 'mtp-probe /sys/devices/pci0000:00/0000:00:1d.7/usb7/7-4 7 6' [5216] exit with return code 0
Nov  4 23:14:14 cauda udevd[3696]: MODE 0664 /lib/udev/rules.d/91-permissions.rules:36
Nov  4 23:14:14 cauda udevd[3696]: no node name set, will use kernel supplied name 'bus/usb/007/006'
Nov  4 23:14:14 cauda udevd[3696]: creating device node '/dev/bus/usb/007/006', devnum=189:773, mode=01664, uid=0, gid=0
Nov  4 23:14:14 cauda udevd[3696]: preserve file '/dev/bus/usb/007/006', because it has correct dev_t
Nov  4 23:14:14 cauda udevd[3696]: set permissions /dev/bus/usb/007/006, 021664, uid=0, gid=0
Nov  4 23:14:14 cauda udevd[3696]: creating symlink '/dev/char/189:773' to '../bus/usb/007/006'
Nov  4 23:14:14 cauda udevd[3696]: created db file '/run/udev/data/c189:773' for '/devices/pci0000:00/0000:00:1d.7/usb7/7-4'
Nov  4 23:14:14 cauda udevd[5217]: starting '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 773 00'
Nov  4 23:14:14 cauda udevd[3696]: '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 773 00' [5217] exit with return code 0
Nov  4 23:14:14 cauda udevd[3696]: passed -1 bytes to netlink monitor 0x9bea488
Nov  4 23:14:14 cauda udevd[3696]: seq 1397 processed with 0
Nov  4 23:14:14 cauda udevd[371]: seq 1397 done with 0
Nov  4 23:14:14 cauda udevd[371]: passed 300 bytes to netlink monitor 0x9bc9318
Nov  4 23:14:14 cauda udevd[3696]: seq 1398 running
Nov  4 23:14:14 cauda udevd[3696]: device 0x9bca230 has devpath '/devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'
Nov  4 23:14:14 cauda udevd[3696]: no db file to read /run/udev/data/+usb:7-4:1.0: No such file or directory
Nov  4 23:14:14 cauda udevd[3696]: device 0x9bcb130 has devpath '/devices/pci0000:00/0000:00:1d.7/usb7/7-4'
Nov  4 23:14:14 cauda udevd[3696]: RUN 'usb_modeswitch --driver-bind %p %s{idVendor} %s{idProduct} %E{PRODUCT}' /lib/udev/rules.d/40-usb_modeswitch.rules:16
Nov  4 23:14:14 cauda udevd[3696]: device 0x9bca8a8 has devpath '/devices/pci0000:00/0000:00:1d.7/usb7'
Nov  4 23:14:14 cauda udevd[3696]: device 0x9bc9420 has devpath '/devices/pci0000:00/0000:00:1d.7'
Nov  4 23:14:14 cauda udevd[3696]: device 0x9bc9818 has devpath '/devices/pci0000:00'
Nov  4 23:14:14 cauda udevd[3696]: IMPORT 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0' /lib/udev/rules.d/55-Argyll.rules:62
Nov  4 23:14:14 cauda udevd[5228]: starting 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'(err) 'libudev: udev_device_new_from_syspath: device 0x8fa4318 has devpath '/devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0''
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'(err) 'libudev: udev_device_new_from_syspath: device 0x8fa45b8 has devpath '/devices/pci0000:00/0000:00:1d.7/usb7/7-4''
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'(out) 'ID_VENDOR_FROM_DATABASE=TechniSat Digital GmbH'
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'(out) 'ID_MODEL_FROM_DATABASE=CableStar Combo HD CI'
Nov  4 23:14:14 cauda udevd[3696]: 'usb-db /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0' [5228] exit with return code 0
Nov  4 23:14:14 cauda udevd[3696]: RUN '/sbin/modprobe -b $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:7
Nov  4 23:14:14 cauda udevd[3696]: created db file '/run/udev/data/+usb:7-4:1.0' for '/devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0'
Nov  4 23:14:14 cauda udevd[5229]: starting 'usb_modeswitch --driver-bind /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0   14f7/3/3'
Nov  4 23:14:15 cauda udevd[3696]: 'usb_modeswitch --driver-bind /devices/pci0000:00/0000:00:1d.7/usb7/7-4/7-4:1.0   14f7/3/3' [5229] exit with return code 0
Nov  4 23:14:15 cauda udevd[5236]: starting '/sbin/modprobe -b usb:v14F7p0003d0003dc00dsc00dp00icFFisc00ip00in00'
Nov  4 23:14:15 cauda udevd[3696]: '/sbin/modprobe -b usb:v14F7p0003d0003dc00dsc00dp00icFFisc00ip00in00'(err) 'FATAL: Module usb:v14F7p0003d0003dc00dsc00dp00icFFisc00ip00in00 not found.'
Nov  4 23:14:15 cauda udevd[3696]: '/sbin/modprobe -b usb:v14F7p0003d0003dc00dsc00dp00icFFisc00ip00in00' [5236] exit with return code 1
Nov  4 23:14:15 cauda udevd[3696]: passed -1 bytes to netlink monitor 0x9bea488
Nov  4 23:14:15 cauda udevd[3696]: seq 1398 processed with 0
Nov  4 23:14:15 cauda udevd[371]: seq 1398 done with 0

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

* Re: [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote)
  2013-11-05  6:14 ` Janusz S. Bien
@ 2013-11-05 12:05   ` Janusz S. Bien
  0 siblings, 0 replies; 4+ messages in thread
From: Janusz S. Bien @ 2013-11-05 12:05 UTC (permalink / raw)
  To: linux-media; +Cc: Roland Scheidegger, wessels.tobias

Quote/Cytat - "Janusz S. Bien" <jsbien@mimuw.edu.pl> (Tue 05 Nov 2013  
07:14:22 AM CET):

> Thank you very much for the patch.
>
> Quote/Cytat - Roland Scheidegger <rscheidegger_lists@hispeed.ch>  
> (Sat  02 Nov 2013 08:49:32 PM CET):
>
> [...]
>
>> Originally based on idea found on
>> http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI   
>> claiming
>> only id needs to be added (but failed to mention it only worked because the
>> driver couldn't find the h7 drx-k firmware...).
>
> Together with Tobias Wessel, another user of the device, we have   
> updated and extended the wiki entry.
>
> The problem is that although I use the same system as Tobias (Debian  
>  wheezy) and it seems we installed media_build in the identical way,  
> it  works OK for Tobias but not for me,

My problem was solved by Tobias - thank you very much! As could be  
expected, I've installed the software differently...

I have erroneusly assumed that a patch posted on the list is  
immediately included  http://git.linuxtv.org/media_build.git.

I see it now at

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

together with my previous misleading letter...

Regards

Janusz

-- 
Prof. dr hab. Janusz S. Bień -  Uniwersytet Warszawski (Katedra  
Lingwistyki Formalnej)
Prof. Janusz S. Bień - University of Warsaw (Formal Linguistics Department)
jsbien@uw.edu.pl, jsbien@mimuw.edu.pl, http://fleksem.klf.uw.edu.pl/~jsbien/

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

* Re: [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote)
  2013-11-02 19:49 [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote) Roland Scheidegger
  2013-11-05  6:14 ` Janusz S. Bien
@ 2013-11-27 23:08 ` Roland Scheidegger
  1 sibling, 0 replies; 4+ messages in thread
From: Roland Scheidegger @ 2013-11-27 23:08 UTC (permalink / raw)
  To: linux-media

Any chances this could get applied?

Thanks,

Roland

Am 02.11.2013 20:49, schrieb linux-media-owner@vger.kernel.org:
> This is similar to the Terratec H7. It works with the same az6007 firmware as
> the former, however the drx-k firmware of the H7 will NOT work. Hence use
> a different firmware name. The firmware does not need to exist as the one in
> the eeprom is just fine as long as the h7 one doesn't get loaded, but maybe
> some day someone wants to load it (the one from the h5 would work too).
> Also since the config entry is now different anyway disable support for rc.
> AFAIK the Technisat remote (TS35) is RC5 and the code (which a code comment
> claims doesn't work anyway) only would handle NEC hence it's pointless creating
> a device and polling it if we already know it can't work.
> CI is untested.
> Originally based on idea found on
> http://www.linuxtv.org/wiki/index.php/TechniSat_CableStar_Combo_HD_CI claiming
> only id needs to be added (but failed to mention it only worked because the
> driver couldn't find the h7 drx-k firmware...).
> 
> Signed-off-by: Roland Scheidegger <rscheidegger_lists@hispeed.ch>
> ---
>  drivers/media/dvb-core/dvb-usb-ids.h  |  1 +
>  drivers/media/usb/dvb-usb-v2/az6007.c | 59 +++++++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+)
> 
> diff --git a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
> index 419a2d6..4a53454 100644
> --- a/drivers/media/dvb-core/dvb-usb-ids.h
> +++ b/drivers/media/dvb-core/dvb-usb-ids.h
> @@ -365,6 +365,7 @@
>  #define USB_PID_TERRATEC_DVBS2CI_V2			0x10ac
>  #define USB_PID_TECHNISAT_USB2_HDCI_V1			0x0001
>  #define USB_PID_TECHNISAT_USB2_HDCI_V2			0x0002
> +#define USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI		0x0003
>  #define USB_PID_TECHNISAT_AIRSTAR_TELESTICK_2		0x0004
>  #define USB_PID_TECHNISAT_USB2_DVB_S2			0x0500
>  #define USB_PID_CPYTO_REDI_PC50A			0xa803
> diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c
> index 44c64ef3..c1051c3 100644
> --- a/drivers/media/usb/dvb-usb-v2/az6007.c
> +++ b/drivers/media/usb/dvb-usb-v2/az6007.c
> @@ -68,6 +68,19 @@ static struct drxk_config terratec_h7_drxk = {
>  	.microcode_name = "dvb-usb-terratec-h7-drxk.fw",
>  };
>  
> +static struct drxk_config cablestar_hdci_drxk = {
> +	.adr = 0x29,
> +	.parallel_ts = true,
> +	.dynamic_clk = true,
> +	.single_master = true,
> +	.enable_merr_cfg = true,
> +	.no_i2c_bridge = false,
> +	.chunk_size = 64,
> +	.mpeg_out_clk_strength = 0x02,
> +	.qam_demod_parameter_count = 2,
> +	.microcode_name = "dvb-usb-technisat-cablestar-hdci-drxk.fw",
> +};
> +
>  static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
>  {
>  	struct az6007_device_state *st = fe_to_priv(fe);
> @@ -630,6 +643,27 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
>  	return 0;
>  }
>  
> +static int az6007_cablestar_hdci_frontend_attach(struct dvb_usb_adapter *adap)
> +{
> +	struct az6007_device_state *st = adap_to_priv(adap);
> +	struct dvb_usb_device *d = adap_to_d(adap);
> +
> +	pr_debug("attaching demod drxk\n");
> +
> +	adap->fe[0] = dvb_attach(drxk_attach, &cablestar_hdci_drxk,
> +				 &d->i2c_adap);
> +	if (!adap->fe[0])
> +		return -EINVAL;
> +
> +	adap->fe[0]->sec_priv = adap;
> +	st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl;
> +	adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl;
> +
> +	az6007_ci_init(adap);
> +
> +	return 0;
> +}
> +
>  static int az6007_tuner_attach(struct dvb_usb_adapter *adap)
>  {
>  	struct dvb_usb_device *d = adap_to_d(adap);
> @@ -868,6 +902,29 @@ static struct dvb_usb_device_properties az6007_props = {
>  	}
>  };
>  
> +static struct dvb_usb_device_properties az6007_cablestar_hdci_props = {
> +	.driver_name         = KBUILD_MODNAME,
> +	.owner               = THIS_MODULE,
> +	.firmware            = AZ6007_FIRMWARE,
> +
> +	.adapter_nr          = adapter_nr,
> +	.size_of_priv        = sizeof(struct az6007_device_state),
> +	.i2c_algo            = &az6007_i2c_algo,
> +	.tuner_attach        = az6007_tuner_attach,
> +	.frontend_attach     = az6007_cablestar_hdci_frontend_attach,
> +	.streaming_ctrl      = az6007_streaming_ctrl,
> +/* ditch get_rc_config as it can't work (TS35 remote, I believe it's rc5) */
> +	.get_rc_config       = NULL,
> +	.read_mac_address    = az6007_read_mac_addr,
> +	.download_firmware   = az6007_download_firmware,
> +	.identify_state	     = az6007_identify_state,
> +	.power_ctrl          = az6007_power_ctrl,
> +	.num_adapters        = 1,
> +	.adapter             = {
> +		{ .stream = DVB_USB_STREAM_BULK(0x02, 10, 4096), }
> +	}
> +};
> +
>  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)},
> @@ -875,6 +932,8 @@ static struct usb_device_id az6007_usb_table[] = {
>  		&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_TECHNISAT, USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI,
> +		&az6007_cablestar_hdci_props, "Technisat CableStar Combo HD CI", RC_MAP_EMPTY)},
>  	{0},
>  };
>  
> 


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

end of thread, other threads:[~2013-11-27 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-02 19:49 [PATCH] [media] az6007: support Technisat Cablestar Combo HDCI (minus remote) Roland Scheidegger
2013-11-05  6:14 ` Janusz S. Bien
2013-11-05 12:05   ` Janusz S. Bien
2013-11-27 23:08 ` Roland Scheidegger

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.