aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-dvb.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c54
1 files changed, 5 insertions, 49 deletions
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 58ae15a99e9c..291cc0556222 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -79,7 +79,7 @@ static struct videobuf_queue_ops dvb_qops = {
79 .buf_release = dvb_buf_release, 79 .buf_release = dvb_buf_release,
80}; 80};
81 81
82static struct s5h1409_config hauppauge_hvr1800lp_config = { 82static struct s5h1409_config hauppauge_generic_config = {
83 .demod_address = 0x32 >> 1, 83 .demod_address = 0x32 >> 1,
84 .output_mode = S5H1409_SERIAL_OUTPUT, 84 .output_mode = S5H1409_SERIAL_OUTPUT,
85 .gpio = S5H1409_GPIO_OFF, 85 .gpio = S5H1409_GPIO_OFF,
@@ -88,33 +88,7 @@ static struct s5h1409_config hauppauge_hvr1800lp_config = {
88 .status_mode = S5H1409_DEMODLOCKING 88 .status_mode = S5H1409_DEMODLOCKING
89}; 89};
90 90
91static struct s5h1409_config hauppauge_hvr1800_config = { 91static struct mt2131_config hauppauge_generic_tunerconfig = {
92 .demod_address = 0x32 >> 1,
93 .output_mode = S5H1409_SERIAL_OUTPUT,
94 .gpio = S5H1409_GPIO_ON,
95 .if_freq = 44000,
96 .inversion = S5H1409_INVERSION_OFF,
97 .status_mode = S5H1409_DEMODLOCKING
98};
99
100static struct s5h1409_config hauppauge_hvr1250_config = {
101 .demod_address = 0x32 >> 1,
102 .output_mode = S5H1409_SERIAL_OUTPUT,
103 .gpio = S5H1409_GPIO_ON,
104 .if_freq = 44000,
105 .inversion = S5H1409_INVERSION_OFF,
106 .status_mode = S5H1409_DEMODLOCKING
107};
108
109static struct mt2131_config hauppauge_hvr1800lp_rev2_tunerconfig = {
110 0x61
111};
112
113static struct mt2131_config hauppauge_hvr1800_tunerconfig = {
114 0x61
115};
116
117static struct mt2131_config hauppauge_hvr1250_tunerconfig = {
118 0x61 92 0x61
119}; 93};
120 94
@@ -128,33 +102,15 @@ static int dvb_register(struct cx23885_tsport *port)
128 /* init frontend */ 102 /* init frontend */
129 switch (dev->board) { 103 switch (dev->board) {
130 case CX23885_BOARD_HAUPPAUGE_HVR1250: 104 case CX23885_BOARD_HAUPPAUGE_HVR1250:
131 port->dvb.frontend = dvb_attach(s5h1409_attach,
132 &hauppauge_hvr1250_config,
133 &dev->i2c_bus[0].i2c_adap);
134 if (port->dvb.frontend != NULL) {
135 dvb_attach(mt2131_attach, port->dvb.frontend,
136 &dev->i2c_bus[0].i2c_adap,
137 &hauppauge_hvr1250_tunerconfig, 0);
138 }
139 break;
140 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
141 port->dvb.frontend = dvb_attach(s5h1409_attach,
142 &hauppauge_hvr1800lp_config,
143 &dev->i2c_bus[0].i2c_adap);
144 if (port->dvb.frontend != NULL) {
145 dvb_attach(mt2131_attach, port->dvb.frontend,
146 &dev->i2c_bus[0].i2c_adap,
147 &hauppauge_hvr1800lp_rev2_tunerconfig, 0);
148 }
149 break;
150 case CX23885_BOARD_HAUPPAUGE_HVR1800: 105 case CX23885_BOARD_HAUPPAUGE_HVR1800:
106 case CX23885_BOARD_HAUPPAUGE_HVR1800lp:
151 port->dvb.frontend = dvb_attach(s5h1409_attach, 107 port->dvb.frontend = dvb_attach(s5h1409_attach,
152 &hauppauge_hvr1800_config, 108 &hauppauge_generic_config,
153 &dev->i2c_bus[0].i2c_adap); 109 &dev->i2c_bus[0].i2c_adap);
154 if (port->dvb.frontend != NULL) { 110 if (port->dvb.frontend != NULL) {
155 dvb_attach(mt2131_attach, port->dvb.frontend, 111 dvb_attach(mt2131_attach, port->dvb.frontend,
156 &dev->i2c_bus[0].i2c_adap, 112 &dev->i2c_bus[0].i2c_adap,
157 &hauppauge_hvr1800_tunerconfig, 0); 113 &hauppauge_generic_tunerconfig, 0);
158 } 114 }
159 break; 115 break;
160 default: 116 default: