aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/az6007.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2/az6007.c')
-rw-r--r--drivers/media/usb/dvb-usb-v2/az6007.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/az6007.c b/drivers/media/usb/dvb-usb-v2/az6007.c
index 44c64ef361bf..c1051c347744 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 = {
68 .microcode_name = "dvb-usb-terratec-h7-drxk.fw", 68 .microcode_name = "dvb-usb-terratec-h7-drxk.fw",
69}; 69};
70 70
71static struct drxk_config cablestar_hdci_drxk = {
72 .adr = 0x29,
73 .parallel_ts = true,
74 .dynamic_clk = true,
75 .single_master = true,
76 .enable_merr_cfg = true,
77 .no_i2c_bridge = false,
78 .chunk_size = 64,
79 .mpeg_out_clk_strength = 0x02,
80 .qam_demod_parameter_count = 2,
81 .microcode_name = "dvb-usb-technisat-cablestar-hdci-drxk.fw",
82};
83
71static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable) 84static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
72{ 85{
73 struct az6007_device_state *st = fe_to_priv(fe); 86 struct az6007_device_state *st = fe_to_priv(fe);
@@ -630,6 +643,27 @@ static int az6007_frontend_attach(struct dvb_usb_adapter *adap)
630 return 0; 643 return 0;
631} 644}
632 645
646static int az6007_cablestar_hdci_frontend_attach(struct dvb_usb_adapter *adap)
647{
648 struct az6007_device_state *st = adap_to_priv(adap);
649 struct dvb_usb_device *d = adap_to_d(adap);
650
651 pr_debug("attaching demod drxk\n");
652
653 adap->fe[0] = dvb_attach(drxk_attach, &cablestar_hdci_drxk,
654 &d->i2c_adap);
655 if (!adap->fe[0])
656 return -EINVAL;
657
658 adap->fe[0]->sec_priv = adap;
659 st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl;
660 adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl;
661
662 az6007_ci_init(adap);
663
664 return 0;
665}
666
633static int az6007_tuner_attach(struct dvb_usb_adapter *adap) 667static int az6007_tuner_attach(struct dvb_usb_adapter *adap)
634{ 668{
635 struct dvb_usb_device *d = adap_to_d(adap); 669 struct dvb_usb_device *d = adap_to_d(adap);
@@ -868,6 +902,29 @@ static struct dvb_usb_device_properties az6007_props = {
868 } 902 }
869}; 903};
870 904
905static struct dvb_usb_device_properties az6007_cablestar_hdci_props = {
906 .driver_name = KBUILD_MODNAME,
907 .owner = THIS_MODULE,
908 .firmware = AZ6007_FIRMWARE,
909
910 .adapter_nr = adapter_nr,
911 .size_of_priv = sizeof(struct az6007_device_state),
912 .i2c_algo = &az6007_i2c_algo,
913 .tuner_attach = az6007_tuner_attach,
914 .frontend_attach = az6007_cablestar_hdci_frontend_attach,
915 .streaming_ctrl = az6007_streaming_ctrl,
916/* ditch get_rc_config as it can't work (TS35 remote, I believe it's rc5) */
917 .get_rc_config = NULL,
918 .read_mac_address = az6007_read_mac_addr,
919 .download_firmware = az6007_download_firmware,
920 .identify_state = az6007_identify_state,
921 .power_ctrl = az6007_power_ctrl,
922 .num_adapters = 1,
923 .adapter = {
924 { .stream = DVB_USB_STREAM_BULK(0x02, 10, 4096), }
925 }
926};
927
871static struct usb_device_id az6007_usb_table[] = { 928static struct usb_device_id az6007_usb_table[] = {
872 {DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007, 929 {DVB_USB_DEVICE(USB_VID_AZUREWAVE, USB_PID_AZUREWAVE_6007,
873 &az6007_props, "Azurewave 6007", RC_MAP_EMPTY)}, 930 &az6007_props, "Azurewave 6007", RC_MAP_EMPTY)},
@@ -875,6 +932,8 @@ static struct usb_device_id az6007_usb_table[] = {
875 &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)}, 932 &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)},
876 {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_2, 933 {DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_H7_2,
877 &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)}, 934 &az6007_props, "Terratec H7", RC_MAP_NEC_TERRATEC_CINERGY_XS)},
935 {DVB_USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_USB2_CABLESTAR_HDCI,
936 &az6007_cablestar_hdci_props, "Technisat CableStar Combo HD CI", RC_MAP_EMPTY)},
878 {0}, 937 {0},
879}; 938};
880 939