Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Driver for the Conexant CX23885 PCIe bridge |
| 3 | * |
Steven Toth | 6d89761 | 2008-09-03 17:12:12 -0300 | [diff] [blame] | 4 | * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org> |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | */ |
| 21 | |
| 22 | #include <linux/module.h> |
| 23 | #include <linux/init.h> |
| 24 | #include <linux/device.h> |
| 25 | #include <linux/fs.h> |
| 26 | #include <linux/kthread.h> |
| 27 | #include <linux/file.h> |
| 28 | #include <linux/suspend.h> |
| 29 | |
| 30 | #include "cx23885.h" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 31 | #include <media/v4l2-common.h> |
| 32 | |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 33 | #include "dvb_ca_en50221.h" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 34 | #include "s5h1409.h" |
Michael Krufky | 52b5045 | 2008-07-09 02:18:49 -0300 | [diff] [blame] | 35 | #include "s5h1411.h" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 36 | #include "mt2131.h" |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 37 | #include "tda8290.h" |
Michael Krufky | 4041f1a | 2007-12-24 04:52:08 -0300 | [diff] [blame] | 38 | #include "tda18271.h" |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 39 | #include "lgdt330x.h" |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 40 | #include "xc5000.h" |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 41 | #include "tda10048.h" |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 42 | #include "tuner-xc2028.h" |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 43 | #include "tuner-simple.h" |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 44 | #include "dib7000p.h" |
| 45 | #include "dibx000_common.h" |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 46 | #include "zl10353.h" |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 47 | #include "stv0900.h" |
| 48 | #include "stv6110.h" |
| 49 | #include "lnbh24.h" |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 50 | #include "cx24116.h" |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 51 | #include "cimax2.h" |
| 52 | #include "netup-eeprom.h" |
| 53 | #include "netup-init.h" |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 54 | #include "lgdt3305.h" |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 55 | |
Steven Toth | 4513fc69 | 2008-01-12 11:36:36 -0300 | [diff] [blame] | 56 | static unsigned int debug; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 57 | |
Steven Toth | 4513fc69 | 2008-01-12 11:36:36 -0300 | [diff] [blame] | 58 | #define dprintk(level, fmt, arg...)\ |
| 59 | do { if (debug >= level)\ |
| 60 | printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\ |
| 61 | } while (0) |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 62 | |
| 63 | /* ------------------------------------------------------------------ */ |
| 64 | |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 65 | static unsigned int alt_tuner; |
| 66 | module_param(alt_tuner, int, 0644); |
| 67 | MODULE_PARM_DESC(alt_tuner, "Enable alternate tuner configuration"); |
| 68 | |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 69 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
| 70 | |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 71 | /* ------------------------------------------------------------------ */ |
| 72 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 73 | static int dvb_buf_setup(struct videobuf_queue *q, |
| 74 | unsigned int *count, unsigned int *size) |
| 75 | { |
| 76 | struct cx23885_tsport *port = q->priv_data; |
| 77 | |
| 78 | port->ts_packet_size = 188 * 4; |
| 79 | port->ts_packet_count = 32; |
| 80 | |
| 81 | *size = port->ts_packet_size * port->ts_packet_count; |
| 82 | *count = 32; |
| 83 | return 0; |
| 84 | } |
| 85 | |
Michael Krufky | 44a6481 | 2007-03-20 23:00:18 -0300 | [diff] [blame] | 86 | static int dvb_buf_prepare(struct videobuf_queue *q, |
| 87 | struct videobuf_buffer *vb, enum v4l2_field field) |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 88 | { |
| 89 | struct cx23885_tsport *port = q->priv_data; |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 90 | return cx23885_buf_prepare(q, port, (struct cx23885_buffer *)vb, field); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | static void dvb_buf_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) |
| 94 | { |
| 95 | struct cx23885_tsport *port = q->priv_data; |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 96 | cx23885_buf_queue(port, (struct cx23885_buffer *)vb); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 97 | } |
| 98 | |
Michael Krufky | 44a6481 | 2007-03-20 23:00:18 -0300 | [diff] [blame] | 99 | static void dvb_buf_release(struct videobuf_queue *q, |
| 100 | struct videobuf_buffer *vb) |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 101 | { |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 102 | cx23885_free_buffer(q, (struct cx23885_buffer *)vb); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | static struct videobuf_queue_ops dvb_qops = { |
| 106 | .buf_setup = dvb_buf_setup, |
| 107 | .buf_prepare = dvb_buf_prepare, |
| 108 | .buf_queue = dvb_buf_queue, |
| 109 | .buf_release = dvb_buf_release, |
| 110 | }; |
| 111 | |
Steven Toth | 86184e0 | 2007-09-04 21:40:47 -0300 | [diff] [blame] | 112 | static struct s5h1409_config hauppauge_generic_config = { |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 113 | .demod_address = 0x32 >> 1, |
| 114 | .output_mode = S5H1409_SERIAL_OUTPUT, |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 115 | .gpio = S5H1409_GPIO_ON, |
Michael Krufky | 2b03238 | 2007-12-13 10:04:10 -0300 | [diff] [blame] | 116 | .qam_if = 44000, |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 117 | .inversion = S5H1409_INVERSION_OFF, |
Steven Toth | dfc1c08 | 2008-01-15 21:35:22 -0300 | [diff] [blame] | 118 | .status_mode = S5H1409_DEMODLOCKING, |
| 119 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 120 | }; |
| 121 | |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 122 | static struct tda10048_config hauppauge_hvr1200_config = { |
| 123 | .demod_address = 0x10 >> 1, |
| 124 | .output_mode = TDA10048_SERIAL_OUTPUT, |
| 125 | .fwbulkwritelen = TDA10048_BULKWRITE_200, |
Steven Toth | 484d9e0 | 2009-05-02 11:08:23 -0300 | [diff] [blame] | 126 | .inversion = TDA10048_INVERSION_ON, |
Steven Toth | 8816bef | 2009-05-15 21:04:18 -0300 | [diff] [blame^] | 127 | .dtv6_if_freq_khz = TDA10048_IF_3300, |
| 128 | .dtv7_if_freq_khz = TDA10048_IF_3800, |
| 129 | .dtv8_if_freq_khz = TDA10048_IF_4300, |
Steven Toth | 484d9e0 | 2009-05-02 11:08:23 -0300 | [diff] [blame] | 130 | .clk_freq_khz = TDA10048_CLK_16000, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 131 | }; |
| 132 | |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 133 | static struct tda10048_config hauppauge_hvr1210_config = { |
| 134 | .demod_address = 0x10 >> 1, |
| 135 | .output_mode = TDA10048_SERIAL_OUTPUT, |
| 136 | .fwbulkwritelen = TDA10048_BULKWRITE_200, |
| 137 | .inversion = TDA10048_INVERSION_ON, |
| 138 | .if_freq_khz = TDA10048_IF_4000, |
| 139 | .clk_freq_khz = TDA10048_CLK_16000, |
| 140 | }; |
| 141 | |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 142 | static struct s5h1409_config hauppauge_ezqam_config = { |
| 143 | .demod_address = 0x32 >> 1, |
| 144 | .output_mode = S5H1409_SERIAL_OUTPUT, |
| 145 | .gpio = S5H1409_GPIO_OFF, |
| 146 | .qam_if = 4000, |
| 147 | .inversion = S5H1409_INVERSION_ON, |
Steven Toth | dfc1c08 | 2008-01-15 21:35:22 -0300 | [diff] [blame] | 148 | .status_mode = S5H1409_DEMODLOCKING, |
| 149 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 150 | }; |
| 151 | |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 152 | static struct s5h1409_config hauppauge_hvr1800lp_config = { |
| 153 | .demod_address = 0x32 >> 1, |
| 154 | .output_mode = S5H1409_SERIAL_OUTPUT, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 155 | .gpio = S5H1409_GPIO_OFF, |
Michael Krufky | 2b03238 | 2007-12-13 10:04:10 -0300 | [diff] [blame] | 156 | .qam_if = 44000, |
Steven Toth | fe475163 | 2007-03-20 15:27:53 -0300 | [diff] [blame] | 157 | .inversion = S5H1409_INVERSION_OFF, |
Steven Toth | dfc1c08 | 2008-01-15 21:35:22 -0300 | [diff] [blame] | 158 | .status_mode = S5H1409_DEMODLOCKING, |
| 159 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 160 | }; |
| 161 | |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 162 | static struct s5h1409_config hauppauge_hvr1500_config = { |
| 163 | .demod_address = 0x32 >> 1, |
| 164 | .output_mode = S5H1409_SERIAL_OUTPUT, |
| 165 | .gpio = S5H1409_GPIO_OFF, |
| 166 | .inversion = S5H1409_INVERSION_OFF, |
Steven Toth | dfc1c08 | 2008-01-15 21:35:22 -0300 | [diff] [blame] | 167 | .status_mode = S5H1409_DEMODLOCKING, |
| 168 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 169 | }; |
| 170 | |
Steven Toth | 86184e0 | 2007-09-04 21:40:47 -0300 | [diff] [blame] | 171 | static struct mt2131_config hauppauge_generic_tunerconfig = { |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 172 | 0x61 |
| 173 | }; |
| 174 | |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 175 | static struct lgdt330x_config fusionhdtv_5_express = { |
| 176 | .demod_address = 0x0e, |
| 177 | .demod_chip = LGDT3303, |
| 178 | .serial_mpeg = 0x40, |
| 179 | }; |
| 180 | |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 181 | static struct s5h1409_config hauppauge_hvr1500q_config = { |
| 182 | .demod_address = 0x32 >> 1, |
| 183 | .output_mode = S5H1409_SERIAL_OUTPUT, |
| 184 | .gpio = S5H1409_GPIO_ON, |
| 185 | .qam_if = 44000, |
| 186 | .inversion = S5H1409_INVERSION_OFF, |
Steven Toth | dfc1c08 | 2008-01-15 21:35:22 -0300 | [diff] [blame] | 187 | .status_mode = S5H1409_DEMODLOCKING, |
| 188 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 189 | }; |
| 190 | |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 191 | static struct s5h1409_config dvico_s5h1409_config = { |
| 192 | .demod_address = 0x32 >> 1, |
| 193 | .output_mode = S5H1409_SERIAL_OUTPUT, |
| 194 | .gpio = S5H1409_GPIO_ON, |
| 195 | .qam_if = 44000, |
| 196 | .inversion = S5H1409_INVERSION_OFF, |
| 197 | .status_mode = S5H1409_DEMODLOCKING, |
| 198 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
| 199 | }; |
| 200 | |
Michael Krufky | 52b5045 | 2008-07-09 02:18:49 -0300 | [diff] [blame] | 201 | static struct s5h1411_config dvico_s5h1411_config = { |
| 202 | .output_mode = S5H1411_SERIAL_OUTPUT, |
| 203 | .gpio = S5H1411_GPIO_ON, |
| 204 | .qam_if = S5H1411_IF_44000, |
| 205 | .vsb_if = S5H1411_IF_44000, |
| 206 | .inversion = S5H1411_INVERSION_OFF, |
| 207 | .status_mode = S5H1411_DEMODLOCKING, |
| 208 | .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
| 209 | }; |
| 210 | |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 211 | static struct s5h1411_config hcw_s5h1411_config = { |
| 212 | .output_mode = S5H1411_SERIAL_OUTPUT, |
| 213 | .gpio = S5H1411_GPIO_OFF, |
| 214 | .vsb_if = S5H1411_IF_44000, |
| 215 | .qam_if = S5H1411_IF_4000, |
| 216 | .inversion = S5H1411_INVERSION_ON, |
| 217 | .status_mode = S5H1411_DEMODLOCKING, |
| 218 | .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
| 219 | }; |
| 220 | |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 221 | static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { |
Steven Toth | e12671cf | 2007-12-20 01:14:43 -0300 | [diff] [blame] | 222 | .i2c_address = 0x61, |
| 223 | .if_khz = 5380, |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 224 | }; |
| 225 | |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 226 | static struct xc5000_config dvico_xc5000_tunerconfig = { |
| 227 | .i2c_address = 0x64, |
| 228 | .if_khz = 5380, |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 229 | }; |
| 230 | |
Michael Krufky | 4041f1a | 2007-12-24 04:52:08 -0300 | [diff] [blame] | 231 | static struct tda829x_config tda829x_no_probe = { |
| 232 | .probe_tuner = TDA829X_DONT_PROBE, |
| 233 | }; |
| 234 | |
Michael Krufky | f21e0d7 | 2008-01-02 03:01:54 -0300 | [diff] [blame] | 235 | static struct tda18271_std_map hauppauge_tda18271_std_map = { |
Michael Krufky | c0dc0c1 | 2008-04-22 14:46:22 -0300 | [diff] [blame] | 236 | .atsc_6 = { .if_freq = 5380, .agc_mode = 3, .std = 3, |
| 237 | .if_lvl = 6, .rfagc_top = 0x37 }, |
| 238 | .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0, |
| 239 | .if_lvl = 6, .rfagc_top = 0x37 }, |
Michael Krufky | f21e0d7 | 2008-01-02 03:01:54 -0300 | [diff] [blame] | 240 | }; |
| 241 | |
| 242 | static struct tda18271_config hauppauge_tda18271_config = { |
| 243 | .std_map = &hauppauge_tda18271_std_map, |
| 244 | .gate = TDA18271_GATE_ANALOG, |
| 245 | }; |
| 246 | |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 247 | static struct tda18271_config hauppauge_hvr1200_tuner_config = { |
| 248 | .gate = TDA18271_GATE_ANALOG, |
| 249 | }; |
| 250 | |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 251 | static struct tda18271_config hauppauge_hvr1210_tuner_config = { |
| 252 | .gate = TDA18271_GATE_DIGITAL, |
| 253 | }; |
| 254 | |
Michael Krufky | 247bc54 | 2009-05-12 18:53:47 -0300 | [diff] [blame] | 255 | static struct tda18271_std_map hauppauge_hvr127x_std_map = { |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 256 | .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4, |
| 257 | .if_lvl = 1, .rfagc_top = 0x58 }, |
| 258 | .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5, |
| 259 | .if_lvl = 1, .rfagc_top = 0x58 }, |
| 260 | }; |
| 261 | |
Michael Krufky | 247bc54 | 2009-05-12 18:53:47 -0300 | [diff] [blame] | 262 | static struct tda18271_config hauppauge_hvr127x_config = { |
| 263 | .std_map = &hauppauge_hvr127x_std_map, |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 264 | }; |
| 265 | |
Michael Krufky | 247bc54 | 2009-05-12 18:53:47 -0300 | [diff] [blame] | 266 | static struct lgdt3305_config hauppauge_lgdt3305_config = { |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 267 | .i2c_addr = 0x0e, |
| 268 | .mpeg_mode = LGDT3305_MPEG_SERIAL, |
| 269 | .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, |
| 270 | .tpvalid_polarity = LGDT3305_TP_VALID_HIGH, |
| 271 | .deny_i2c_rptr = 1, |
| 272 | .spectral_inversion = 1, |
| 273 | .qam_if_khz = 4000, |
| 274 | .vsb_if_khz = 3250, |
| 275 | }; |
| 276 | |
Harvey Harrison | b1721d0 | 2008-04-25 19:03:08 -0700 | [diff] [blame] | 277 | static struct dibx000_agc_config xc3028_agc_config = { |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 278 | BAND_VHF | BAND_UHF, /* band_caps */ |
| 279 | |
| 280 | /* P_agc_use_sd_mod1=0, P_agc_use_sd_mod2=0, P_agc_freq_pwm_div=0, |
| 281 | * P_agc_inv_pwm1=0, P_agc_inv_pwm2=0, |
| 282 | * P_agc_inh_dc_rv_est=0, P_agc_time_est=3, P_agc_freeze=0, |
| 283 | * P_agc_nb_est=2, P_agc_write=0 |
| 284 | */ |
| 285 | (0 << 15) | (0 << 14) | (0 << 11) | (0 << 10) | (0 << 9) | (0 << 8) | |
| 286 | (3 << 5) | (0 << 4) | (2 << 1) | (0 << 0), /* setup */ |
| 287 | |
| 288 | 712, /* inv_gain */ |
| 289 | 21, /* time_stabiliz */ |
| 290 | |
| 291 | 0, /* alpha_level */ |
| 292 | 118, /* thlock */ |
| 293 | |
| 294 | 0, /* wbd_inv */ |
| 295 | 2867, /* wbd_ref */ |
| 296 | 0, /* wbd_sel */ |
| 297 | 2, /* wbd_alpha */ |
| 298 | |
| 299 | 0, /* agc1_max */ |
| 300 | 0, /* agc1_min */ |
| 301 | 39718, /* agc2_max */ |
| 302 | 9930, /* agc2_min */ |
| 303 | 0, /* agc1_pt1 */ |
| 304 | 0, /* agc1_pt2 */ |
| 305 | 0, /* agc1_pt3 */ |
| 306 | 0, /* agc1_slope1 */ |
| 307 | 0, /* agc1_slope2 */ |
| 308 | 0, /* agc2_pt1 */ |
| 309 | 128, /* agc2_pt2 */ |
| 310 | 29, /* agc2_slope1 */ |
| 311 | 29, /* agc2_slope2 */ |
| 312 | |
| 313 | 17, /* alpha_mant */ |
| 314 | 27, /* alpha_exp */ |
| 315 | 23, /* beta_mant */ |
| 316 | 51, /* beta_exp */ |
| 317 | |
| 318 | 1, /* perform_agc_softsplit */ |
| 319 | }; |
| 320 | |
| 321 | /* PLL Configuration for COFDM BW_MHz = 8.000000 |
| 322 | * With external clock = 30.000000 */ |
Harvey Harrison | b1721d0 | 2008-04-25 19:03:08 -0700 | [diff] [blame] | 323 | static struct dibx000_bandwidth_config xc3028_bw_config = { |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 324 | 60000, /* internal */ |
| 325 | 30000, /* sampling */ |
| 326 | 1, /* pll_cfg: prediv */ |
| 327 | 8, /* pll_cfg: ratio */ |
| 328 | 3, /* pll_cfg: range */ |
| 329 | 1, /* pll_cfg: reset */ |
| 330 | 0, /* pll_cfg: bypass */ |
| 331 | 0, /* misc: refdiv */ |
| 332 | 0, /* misc: bypclk_div */ |
| 333 | 1, /* misc: IO_CLK_en_core */ |
| 334 | 1, /* misc: ADClkSrc */ |
| 335 | 0, /* misc: modulo */ |
| 336 | (3 << 14) | (1 << 12) | (524 << 0), /* sad_cfg: refsel, sel, freq_15k */ |
| 337 | (1 << 25) | 5816102, /* ifreq = 5.200000 MHz */ |
| 338 | 20452225, /* timf */ |
| 339 | 30000000 /* xtal_hz */ |
| 340 | }; |
| 341 | |
| 342 | static struct dib7000p_config hauppauge_hvr1400_dib7000_config = { |
| 343 | .output_mpeg2_in_188_bytes = 1, |
| 344 | .hostbus_diversity = 1, |
| 345 | .tuner_is_baseband = 0, |
| 346 | .update_lna = NULL, |
| 347 | |
| 348 | .agc_config_count = 1, |
| 349 | .agc = &xc3028_agc_config, |
| 350 | .bw = &xc3028_bw_config, |
| 351 | |
| 352 | .gpio_dir = DIB7000P_GPIO_DEFAULT_DIRECTIONS, |
| 353 | .gpio_val = DIB7000P_GPIO_DEFAULT_VALUES, |
| 354 | .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, |
| 355 | |
| 356 | .pwm_freq_div = 0, |
| 357 | .agc_control = NULL, |
| 358 | .spur_protect = 0, |
| 359 | |
| 360 | .output_mode = OUTMODE_MPEG2_SERIAL, |
| 361 | }; |
| 362 | |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 363 | static struct zl10353_config dvico_fusionhdtv_xc3028 = { |
| 364 | .demod_address = 0x0f, |
| 365 | .if2 = 45600, |
| 366 | .no_tuner = 1, |
Christopher Pascoe | d4dc673 | 2009-04-27 11:27:04 -0300 | [diff] [blame] | 367 | .disable_i2c_gate_ctrl = 1, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 368 | }; |
| 369 | |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 370 | static struct stv0900_config netup_stv0900_config = { |
| 371 | .demod_address = 0x68, |
| 372 | .xtal = 27000000, |
| 373 | .clkmode = 3,/* 0-CLKI, 2-XTALI, else AUTO */ |
| 374 | .diseqc_mode = 2,/* 2/3 PWM */ |
| 375 | .path1_mode = 2,/*Serial continues clock */ |
| 376 | .path2_mode = 2,/*Serial continues clock */ |
| 377 | .tun1_maddress = 0,/* 0x60 */ |
| 378 | .tun2_maddress = 3,/* 0x63 */ |
| 379 | .tun1_adc = 1,/* 1 Vpp */ |
| 380 | .tun2_adc = 1,/* 1 Vpp */ |
| 381 | }; |
| 382 | |
| 383 | static struct stv6110_config netup_stv6110_tunerconfig_a = { |
| 384 | .i2c_address = 0x60, |
| 385 | .mclk = 27000000, |
| 386 | .iq_wiring = 0, |
| 387 | }; |
| 388 | |
| 389 | static struct stv6110_config netup_stv6110_tunerconfig_b = { |
| 390 | .i2c_address = 0x63, |
| 391 | .mclk = 27000000, |
| 392 | .iq_wiring = 1, |
| 393 | }; |
| 394 | |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 395 | static int tbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage) |
| 396 | { |
| 397 | struct cx23885_tsport *port = fe->dvb->priv; |
| 398 | struct cx23885_dev *dev = port->dev; |
| 399 | |
| 400 | if (voltage == SEC_VOLTAGE_18) |
| 401 | cx_write(MC417_RWD, 0x00001e00);/* GPIO-13 high */ |
| 402 | else if (voltage == SEC_VOLTAGE_13) |
| 403 | cx_write(MC417_RWD, 0x00001a00);/* GPIO-13 low */ |
| 404 | else |
| 405 | cx_write(MC417_RWD, 0x00001800);/* GPIO-12 low */ |
| 406 | return 0; |
| 407 | } |
| 408 | |
| 409 | static struct cx24116_config tbs_cx24116_config = { |
| 410 | .demod_address = 0x05, |
| 411 | }; |
| 412 | |
Igor M. Liplianin | 579943f | 2009-01-17 12:18:26 -0300 | [diff] [blame] | 413 | static struct cx24116_config tevii_cx24116_config = { |
| 414 | .demod_address = 0x55, |
| 415 | }; |
| 416 | |
Igor M. Liplianin | c9b8b04 | 2009-01-17 12:23:31 -0300 | [diff] [blame] | 417 | static struct cx24116_config dvbworld_cx24116_config = { |
| 418 | .demod_address = 0x05, |
| 419 | }; |
| 420 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 421 | static int dvb_register(struct cx23885_tsport *port) |
| 422 | { |
| 423 | struct cx23885_dev *dev = port->dev; |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 424 | struct cx23885_i2c *i2c_bus = NULL; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 425 | struct videobuf_dvb_frontend *fe0; |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 426 | int ret; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 427 | |
Darron Broad | f972e0bd | 2008-10-11 11:24:30 -0300 | [diff] [blame] | 428 | /* Get the first frontend */ |
Darron Broad | 92abe9e | 2008-10-11 11:18:53 -0300 | [diff] [blame] | 429 | fe0 = videobuf_dvb_get_frontend(&port->frontends, 1); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 430 | if (!fe0) |
| 431 | return -EINVAL; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 432 | |
| 433 | /* init struct videobuf_dvb */ |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 434 | fe0->dvb.name = dev->name; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 435 | |
| 436 | /* init frontend */ |
| 437 | switch (dev->board) { |
Steven Toth | a77743b | 2007-08-22 21:01:20 -0300 | [diff] [blame] | 438 | case CX23885_BOARD_HAUPPAUGE_HVR1250: |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 439 | i2c_bus = &dev->i2c_bus[0]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 440 | fe0->dvb.frontend = dvb_attach(s5h1409_attach, |
Steven Toth | 86184e0 | 2007-09-04 21:40:47 -0300 | [diff] [blame] | 441 | &hauppauge_generic_config, |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 442 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 443 | if (fe0->dvb.frontend != NULL) { |
| 444 | dvb_attach(mt2131_attach, fe0->dvb.frontend, |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 445 | &i2c_bus->i2c_adap, |
Steven Toth | 86184e0 | 2007-09-04 21:40:47 -0300 | [diff] [blame] | 446 | &hauppauge_generic_tunerconfig, 0); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 447 | } |
| 448 | break; |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 449 | case CX23885_BOARD_HAUPPAUGE_HVR1270: |
Michael Krufky | d099bec | 2009-05-08 22:39:24 -0300 | [diff] [blame] | 450 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 451 | i2c_bus = &dev->i2c_bus[0]; |
| 452 | fe0->dvb.frontend = dvb_attach(lgdt3305_attach, |
Michael Krufky | 247bc54 | 2009-05-12 18:53:47 -0300 | [diff] [blame] | 453 | &hauppauge_lgdt3305_config, |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 454 | &i2c_bus->i2c_adap); |
| 455 | if (fe0->dvb.frontend != NULL) { |
| 456 | dvb_attach(tda18271_attach, fe0->dvb.frontend, |
| 457 | 0x60, &dev->i2c_bus[1].i2c_adap, |
Michael Krufky | 247bc54 | 2009-05-12 18:53:47 -0300 | [diff] [blame] | 458 | &hauppauge_hvr127x_config); |
Michael Krufky | a5dbf45 | 2009-05-03 23:27:02 -0300 | [diff] [blame] | 459 | } |
| 460 | break; |
Michael Krufky | 19bc579 | 2009-05-08 16:05:29 -0300 | [diff] [blame] | 461 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
| 462 | i2c_bus = &dev->i2c_bus[0]; |
| 463 | fe0->dvb.frontend = dvb_attach(s5h1411_attach, |
| 464 | &hcw_s5h1411_config, |
| 465 | &i2c_bus->i2c_adap); |
| 466 | if (fe0->dvb.frontend != NULL) { |
| 467 | dvb_attach(tda18271_attach, fe0->dvb.frontend, |
| 468 | 0x60, &dev->i2c_bus[1].i2c_adap, |
| 469 | &hauppauge_tda18271_config); |
| 470 | } |
| 471 | break; |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 472 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
| 473 | i2c_bus = &dev->i2c_bus[0]; |
Darron Broad | 92abe9e | 2008-10-11 11:18:53 -0300 | [diff] [blame] | 474 | switch (alt_tuner) { |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 475 | case 1: |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 476 | fe0->dvb.frontend = |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 477 | dvb_attach(s5h1409_attach, |
| 478 | &hauppauge_ezqam_config, |
| 479 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 480 | if (fe0->dvb.frontend != NULL) { |
| 481 | dvb_attach(tda829x_attach, fe0->dvb.frontend, |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 482 | &dev->i2c_bus[1].i2c_adap, 0x42, |
Michael Krufky | 4041f1a | 2007-12-24 04:52:08 -0300 | [diff] [blame] | 483 | &tda829x_no_probe); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 484 | dvb_attach(tda18271_attach, fe0->dvb.frontend, |
Michael Krufky | 4041f1a | 2007-12-24 04:52:08 -0300 | [diff] [blame] | 485 | 0x60, &dev->i2c_bus[1].i2c_adap, |
Michael Krufky | f21e0d7 | 2008-01-02 03:01:54 -0300 | [diff] [blame] | 486 | &hauppauge_tda18271_config); |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 487 | } |
| 488 | break; |
| 489 | case 0: |
| 490 | default: |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 491 | fe0->dvb.frontend = |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 492 | dvb_attach(s5h1409_attach, |
| 493 | &hauppauge_generic_config, |
| 494 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 495 | if (fe0->dvb.frontend != NULL) |
| 496 | dvb_attach(mt2131_attach, fe0->dvb.frontend, |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 497 | &i2c_bus->i2c_adap, |
| 498 | &hauppauge_generic_tunerconfig, 0); |
| 499 | break; |
| 500 | } |
| 501 | break; |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 502 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 503 | i2c_bus = &dev->i2c_bus[0]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 504 | fe0->dvb.frontend = dvb_attach(s5h1409_attach, |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 505 | &hauppauge_hvr1800lp_config, |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 506 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 507 | if (fe0->dvb.frontend != NULL) { |
| 508 | dvb_attach(mt2131_attach, fe0->dvb.frontend, |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 509 | &i2c_bus->i2c_adap, |
Steven Toth | fc959be | 2007-09-08 19:08:17 -0300 | [diff] [blame] | 510 | &hauppauge_generic_tunerconfig, 0); |
| 511 | } |
| 512 | break; |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 513 | case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP: |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 514 | i2c_bus = &dev->i2c_bus[0]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 515 | fe0->dvb.frontend = dvb_attach(lgdt330x_attach, |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 516 | &fusionhdtv_5_express, |
Michael Krufky | f139fa7 | 2007-09-09 03:55:34 -0300 | [diff] [blame] | 517 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 518 | if (fe0->dvb.frontend != NULL) { |
| 519 | dvb_attach(simple_tuner_attach, fe0->dvb.frontend, |
Michael Krufky | 827855d | 2008-04-22 14:46:16 -0300 | [diff] [blame] | 520 | &i2c_bus->i2c_adap, 0x61, |
| 521 | TUNER_LG_TDVS_H06XF); |
Michael Krufky | 9bc37ca | 2007-09-08 15:17:13 -0300 | [diff] [blame] | 522 | } |
| 523 | break; |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 524 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
| 525 | i2c_bus = &dev->i2c_bus[1]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 526 | fe0->dvb.frontend = dvb_attach(s5h1409_attach, |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 527 | &hauppauge_hvr1500q_config, |
| 528 | &dev->i2c_bus[0].i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 529 | if (fe0->dvb.frontend != NULL) |
| 530 | dvb_attach(xc5000_attach, fe0->dvb.frontend, |
Michael Krufky | 3065096 | 2008-09-06 14:56:58 -0300 | [diff] [blame] | 531 | &i2c_bus->i2c_adap, |
| 532 | &hauppauge_hvr1500q_tunerconfig); |
Steven Toth | d1987d5 | 2007-12-18 01:57:06 -0300 | [diff] [blame] | 533 | break; |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 534 | case CX23885_BOARD_HAUPPAUGE_HVR1500: |
| 535 | i2c_bus = &dev->i2c_bus[1]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 536 | fe0->dvb.frontend = dvb_attach(s5h1409_attach, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 537 | &hauppauge_hvr1500_config, |
| 538 | &dev->i2c_bus[0].i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 539 | if (fe0->dvb.frontend != NULL) { |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 540 | struct dvb_frontend *fe; |
| 541 | struct xc2028_config cfg = { |
| 542 | .i2c_adap = &i2c_bus->i2c_adap, |
| 543 | .i2c_addr = 0x61, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 544 | }; |
| 545 | static struct xc2028_ctrl ctl = { |
Michael Krufky | ef80bfeb | 2008-09-16 02:15:30 -0300 | [diff] [blame] | 546 | .fname = XC2028_DEFAULT_FIRMWARE, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 547 | .max_len = 64, |
Steven Toth | 52c3d29 | 2009-04-20 22:42:00 -0300 | [diff] [blame] | 548 | .demod = XC3028_FE_OREN538, |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 549 | }; |
| 550 | |
| 551 | fe = dvb_attach(xc2028_attach, |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 552 | fe0->dvb.frontend, &cfg); |
Michael Krufky | 07b4a83 | 2007-12-18 01:09:11 -0300 | [diff] [blame] | 553 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) |
| 554 | fe->ops.tuner_ops.set_config(fe, &ctl); |
| 555 | } |
| 556 | break; |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 557 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
Steven Toth | a780a31 | 2008-04-19 01:25:52 -0300 | [diff] [blame] | 558 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 559 | i2c_bus = &dev->i2c_bus[0]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 560 | fe0->dvb.frontend = dvb_attach(tda10048_attach, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 561 | &hauppauge_hvr1200_config, |
| 562 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 563 | if (fe0->dvb.frontend != NULL) { |
| 564 | dvb_attach(tda829x_attach, fe0->dvb.frontend, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 565 | &dev->i2c_bus[1].i2c_adap, 0x42, |
| 566 | &tda829x_no_probe); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 567 | dvb_attach(tda18271_attach, fe0->dvb.frontend, |
Steven Toth | b3ea016 | 2008-04-19 01:14:19 -0300 | [diff] [blame] | 568 | 0x60, &dev->i2c_bus[1].i2c_adap, |
| 569 | &hauppauge_hvr1200_tuner_config); |
| 570 | } |
| 571 | break; |
Michael Krufky | 6b926ec | 2009-05-12 17:32:17 -0300 | [diff] [blame] | 572 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
| 573 | i2c_bus = &dev->i2c_bus[0]; |
| 574 | fe0->dvb.frontend = dvb_attach(tda10048_attach, |
| 575 | &hauppauge_hvr1210_config, |
| 576 | &i2c_bus->i2c_adap); |
| 577 | if (fe0->dvb.frontend != NULL) { |
| 578 | dvb_attach(tda18271_attach, fe0->dvb.frontend, |
| 579 | 0x60, &dev->i2c_bus[1].i2c_adap, |
| 580 | &hauppauge_hvr1210_tuner_config); |
| 581 | } |
| 582 | break; |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 583 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
| 584 | i2c_bus = &dev->i2c_bus[0]; |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 585 | fe0->dvb.frontend = dvb_attach(dib7000p_attach, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 586 | &i2c_bus->i2c_adap, |
| 587 | 0x12, &hauppauge_hvr1400_dib7000_config); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 588 | if (fe0->dvb.frontend != NULL) { |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 589 | struct dvb_frontend *fe; |
| 590 | struct xc2028_config cfg = { |
| 591 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, |
| 592 | .i2c_addr = 0x64, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 593 | }; |
| 594 | static struct xc2028_ctrl ctl = { |
Michael Krufky | ef80bfeb | 2008-09-16 02:15:30 -0300 | [diff] [blame] | 595 | .fname = XC3028L_DEFAULT_FIRMWARE, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 596 | .max_len = 64, |
| 597 | .demod = 5000, |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 598 | /* This is true for all demods with |
| 599 | v36 firmware? */ |
Mauro Carvalho Chehab | 0975fc6 | 2008-09-28 02:24:44 -0300 | [diff] [blame] | 600 | .type = XC2028_D2633, |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 601 | }; |
| 602 | |
| 603 | fe = dvb_attach(xc2028_attach, |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 604 | fe0->dvb.frontend, &cfg); |
Steven Toth | 6676237 | 2008-04-22 15:38:26 -0300 | [diff] [blame] | 605 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) |
| 606 | fe->ops.tuner_ops.set_config(fe, &ctl); |
| 607 | } |
| 608 | break; |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 609 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
| 610 | i2c_bus = &dev->i2c_bus[port->nr - 1]; |
| 611 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 612 | fe0->dvb.frontend = dvb_attach(s5h1409_attach, |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 613 | &dvico_s5h1409_config, |
| 614 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 615 | if (fe0->dvb.frontend == NULL) |
| 616 | fe0->dvb.frontend = dvb_attach(s5h1411_attach, |
Michael Krufky | 52b5045 | 2008-07-09 02:18:49 -0300 | [diff] [blame] | 617 | &dvico_s5h1411_config, |
| 618 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 619 | if (fe0->dvb.frontend != NULL) |
| 620 | dvb_attach(xc5000_attach, fe0->dvb.frontend, |
Michael Krufky | 3065096 | 2008-09-06 14:56:58 -0300 | [diff] [blame] | 621 | &i2c_bus->i2c_adap, |
| 622 | &dvico_xc5000_tunerconfig); |
Michael Krufky | 335377b | 2008-05-07 01:43:10 -0300 | [diff] [blame] | 623 | break; |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 624 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: { |
| 625 | i2c_bus = &dev->i2c_bus[port->nr - 1]; |
| 626 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 627 | fe0->dvb.frontend = dvb_attach(zl10353_attach, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 628 | &dvico_fusionhdtv_xc3028, |
| 629 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 630 | if (fe0->dvb.frontend != NULL) { |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 631 | struct dvb_frontend *fe; |
| 632 | struct xc2028_config cfg = { |
| 633 | .i2c_adap = &i2c_bus->i2c_adap, |
| 634 | .i2c_addr = 0x61, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 635 | }; |
| 636 | static struct xc2028_ctrl ctl = { |
Michael Krufky | ef80bfeb | 2008-09-16 02:15:30 -0300 | [diff] [blame] | 637 | .fname = XC2028_DEFAULT_FIRMWARE, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 638 | .max_len = 64, |
| 639 | .demod = XC3028_FE_ZARLINK456, |
| 640 | }; |
| 641 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 642 | fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, |
Steven Toth | aef2d18 | 2008-08-04 21:39:53 -0300 | [diff] [blame] | 643 | &cfg); |
| 644 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) |
| 645 | fe->ops.tuner_ops.set_config(fe, &ctl); |
| 646 | } |
| 647 | break; |
| 648 | } |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 649 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
Igor M. Liplianin | 9bb1b7e | 2008-11-23 14:11:16 -0300 | [diff] [blame] | 650 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 651 | i2c_bus = &dev->i2c_bus[0]; |
| 652 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 653 | fe0->dvb.frontend = dvb_attach(zl10353_attach, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 654 | &dvico_fusionhdtv_xc3028, |
| 655 | &i2c_bus->i2c_adap); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 656 | if (fe0->dvb.frontend != NULL) { |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 657 | struct dvb_frontend *fe; |
| 658 | struct xc2028_config cfg = { |
| 659 | .i2c_adap = &dev->i2c_bus[1].i2c_adap, |
| 660 | .i2c_addr = 0x61, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 661 | }; |
| 662 | static struct xc2028_ctrl ctl = { |
Michael Krufky | ef80bfeb | 2008-09-16 02:15:30 -0300 | [diff] [blame] | 663 | .fname = XC2028_DEFAULT_FIRMWARE, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 664 | .max_len = 64, |
| 665 | .demod = XC3028_FE_ZARLINK456, |
| 666 | }; |
| 667 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 668 | fe = dvb_attach(xc2028_attach, fe0->dvb.frontend, |
Steven Toth | 4c56b04 | 2008-08-12 13:30:03 -0300 | [diff] [blame] | 669 | &cfg); |
| 670 | if (fe != NULL && fe->ops.tuner_ops.set_config != NULL) |
| 671 | fe->ops.tuner_ops.set_config(fe, &ctl); |
| 672 | } |
| 673 | break; |
Igor M. Liplianin | 96318d0 | 2009-01-17 12:11:20 -0300 | [diff] [blame] | 674 | case CX23885_BOARD_TBS_6920: |
| 675 | i2c_bus = &dev->i2c_bus[0]; |
| 676 | |
| 677 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
| 678 | &tbs_cx24116_config, |
| 679 | &i2c_bus->i2c_adap); |
| 680 | if (fe0->dvb.frontend != NULL) |
| 681 | fe0->dvb.frontend->ops.set_voltage = tbs_set_voltage; |
| 682 | |
| 683 | break; |
Igor M. Liplianin | 579943f | 2009-01-17 12:18:26 -0300 | [diff] [blame] | 684 | case CX23885_BOARD_TEVII_S470: |
| 685 | i2c_bus = &dev->i2c_bus[1]; |
| 686 | |
| 687 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
| 688 | &tevii_cx24116_config, |
| 689 | &i2c_bus->i2c_adap); |
| 690 | if (fe0->dvb.frontend != NULL) |
| 691 | fe0->dvb.frontend->ops.set_voltage = tbs_set_voltage; |
| 692 | |
| 693 | break; |
Igor M. Liplianin | c9b8b04 | 2009-01-17 12:23:31 -0300 | [diff] [blame] | 694 | case CX23885_BOARD_DVBWORLD_2005: |
| 695 | i2c_bus = &dev->i2c_bus[1]; |
| 696 | |
| 697 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
| 698 | &dvbworld_cx24116_config, |
| 699 | &i2c_bus->i2c_adap); |
| 700 | break; |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 701 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
| 702 | i2c_bus = &dev->i2c_bus[0]; |
| 703 | switch (port->nr) { |
| 704 | /* port B */ |
| 705 | case 1: |
| 706 | fe0->dvb.frontend = dvb_attach(stv0900_attach, |
| 707 | &netup_stv0900_config, |
| 708 | &i2c_bus->i2c_adap, 0); |
| 709 | if (fe0->dvb.frontend != NULL) { |
| 710 | if (dvb_attach(stv6110_attach, |
| 711 | fe0->dvb.frontend, |
| 712 | &netup_stv6110_tunerconfig_a, |
| 713 | &i2c_bus->i2c_adap)) { |
| 714 | if (!dvb_attach(lnbh24_attach, |
| 715 | fe0->dvb.frontend, |
| 716 | &i2c_bus->i2c_adap, |
| 717 | LNBH24_PCL, 0, 0x09)) |
| 718 | printk(KERN_ERR |
| 719 | "No LNBH24 found!\n"); |
| 720 | |
| 721 | } |
| 722 | } |
| 723 | break; |
| 724 | /* port C */ |
| 725 | case 2: |
| 726 | fe0->dvb.frontend = dvb_attach(stv0900_attach, |
| 727 | &netup_stv0900_config, |
| 728 | &i2c_bus->i2c_adap, 1); |
| 729 | if (fe0->dvb.frontend != NULL) { |
| 730 | if (dvb_attach(stv6110_attach, |
| 731 | fe0->dvb.frontend, |
| 732 | &netup_stv6110_tunerconfig_b, |
| 733 | &i2c_bus->i2c_adap)) { |
| 734 | if (!dvb_attach(lnbh24_attach, |
| 735 | fe0->dvb.frontend, |
| 736 | &i2c_bus->i2c_adap, |
| 737 | LNBH24_PCL, 0, 0x0a)) |
| 738 | printk(KERN_ERR |
| 739 | "No LNBH24 found!\n"); |
| 740 | |
| 741 | } |
| 742 | } |
| 743 | break; |
| 744 | } |
| 745 | break; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 746 | default: |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 747 | printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " |
| 748 | " isn't supported yet\n", |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 749 | dev->name); |
| 750 | break; |
| 751 | } |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 752 | if (NULL == fe0->dvb.frontend) { |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 753 | printk(KERN_ERR "%s: frontend initialization failed\n", |
| 754 | dev->name); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 755 | return -1; |
| 756 | } |
Michael Krufky | d7cba04 | 2008-09-12 13:31:45 -0300 | [diff] [blame] | 757 | /* define general-purpose callback pointer */ |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 758 | fe0->dvb.frontend->callback = cx23885_tuner_callback; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 759 | |
| 760 | /* Put the analog decoder in standby to keep it quiet */ |
Hans Verkuil | 7c9fc9d | 2009-04-01 03:49:59 -0300 | [diff] [blame] | 761 | call_all(dev, tuner, s_standby); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 762 | |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 763 | if (fe0->dvb.frontend->ops.analog_ops.standby) |
| 764 | fe0->dvb.frontend->ops.analog_ops.standby(fe0->dvb.frontend); |
Michael Krufky | 3ba71d2 | 2007-12-07 01:40:36 -0300 | [diff] [blame] | 765 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 766 | /* register everything */ |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 767 | ret = videobuf_dvb_register_bus(&port->frontends, THIS_MODULE, port, |
Darron Broad | 59b1842 | 2008-10-11 11:44:05 -0300 | [diff] [blame] | 768 | &dev->pci->dev, adapter_nr, 0); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 769 | |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 770 | /* init CI & MAC */ |
| 771 | switch (dev->board) { |
| 772 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: { |
| 773 | static struct netup_card_info cinfo; |
| 774 | |
| 775 | netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo); |
| 776 | memcpy(port->frontends.adapter.proposed_mac, |
| 777 | cinfo.port[port->nr - 1].mac, 6); |
| 778 | printk(KERN_INFO "NetUP Dual DVB-S2 CI card port%d MAC=" |
| 779 | "%02X:%02X:%02X:%02X:%02X:%02X\n", |
| 780 | port->nr, |
| 781 | port->frontends.adapter.proposed_mac[0], |
| 782 | port->frontends.adapter.proposed_mac[1], |
| 783 | port->frontends.adapter.proposed_mac[2], |
| 784 | port->frontends.adapter.proposed_mac[3], |
| 785 | port->frontends.adapter.proposed_mac[4], |
| 786 | port->frontends.adapter.proposed_mac[5]); |
| 787 | |
| 788 | netup_ci_init(port); |
| 789 | break; |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | return ret; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 794 | } |
| 795 | |
| 796 | int cx23885_dvb_register(struct cx23885_tsport *port) |
| 797 | { |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 798 | |
| 799 | struct videobuf_dvb_frontend *fe0; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 800 | struct cx23885_dev *dev = port->dev; |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 801 | int err, i; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 802 | |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 803 | /* Here we need to allocate the correct number of frontends, |
| 804 | * as reflected in the cards struct. The reality is that currrently |
| 805 | * no cx23885 boards support this - yet. But, if we don't modify this |
| 806 | * code then the second frontend would never be allocated (later) |
| 807 | * and fail with error before the attach in dvb_register(). |
| 808 | * Without these changes we risk an OOPS later. The changes here |
| 809 | * are for safety, and should provide a good foundation for the |
| 810 | * future addition of any multi-frontend cx23885 based boards. |
| 811 | */ |
| 812 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, |
| 813 | port->num_frontends); |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 814 | |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 815 | for (i = 1; i <= port->num_frontends; i++) { |
Darron Broad | 96b7a1a | 2008-10-15 20:26:34 -0300 | [diff] [blame] | 816 | if (videobuf_dvb_alloc_frontend( |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 817 | &port->frontends, i) == NULL) { |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 818 | printk(KERN_ERR "%s() failed to alloc\n", __func__); |
| 819 | return -ENOMEM; |
| 820 | } |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 821 | |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 822 | fe0 = videobuf_dvb_get_frontend(&port->frontends, i); |
| 823 | if (!fe0) |
| 824 | err = -EINVAL; |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 825 | |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 826 | dprintk(1, "%s\n", __func__); |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 827 | dprintk(1, " ->probed by Card=%d Name=%s, PCI %02x:%02x\n", |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 828 | dev->board, |
| 829 | dev->name, |
| 830 | dev->pci_bus, |
| 831 | dev->pci_slot); |
| 832 | |
| 833 | err = -ENODEV; |
| 834 | |
| 835 | /* dvb stuff */ |
| 836 | /* We have to init the queue for each frontend on a port. */ |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 837 | printk(KERN_INFO "%s: cx23885 based dvb card\n", dev->name); |
| 838 | videobuf_queue_sg_init(&fe0->dvb.dvbq, &dvb_qops, |
| 839 | &dev->pci->dev, &port->slock, |
Michael Krufky | 44a6481 | 2007-03-20 23:00:18 -0300 | [diff] [blame] | 840 | V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_TOP, |
| 841 | sizeof(struct cx23885_buffer), port); |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 842 | } |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 843 | err = dvb_register(port); |
| 844 | if (err != 0) |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 845 | printk(KERN_ERR "%s() dvb_register failed err = %d\n", |
| 846 | __func__, err); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 847 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 848 | return err; |
| 849 | } |
| 850 | |
| 851 | int cx23885_dvb_unregister(struct cx23885_tsport *port) |
| 852 | { |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 853 | struct videobuf_dvb_frontend *fe0; |
| 854 | |
Steven Toth | eb0c58b | 2008-10-11 12:34:39 -0300 | [diff] [blame] | 855 | /* FIXME: in an error condition where the we have |
| 856 | * an expected number of frontends (attach problem) |
| 857 | * then this might not clean up correctly, if 1 |
| 858 | * is invalid. |
| 859 | * This comment only applies to future boards IF they |
| 860 | * implement MFE support. |
| 861 | */ |
Darron Broad | 92abe9e | 2008-10-11 11:18:53 -0300 | [diff] [blame] | 862 | fe0 = videobuf_dvb_get_frontend(&port->frontends, 1); |
Steven Toth | 9c8ced5 | 2008-10-16 20:18:44 -0300 | [diff] [blame] | 863 | if (fe0->dvb.frontend) |
Steven Toth | 363c35f | 2008-10-11 11:05:50 -0300 | [diff] [blame] | 864 | videobuf_dvb_unregister_bus(&port->frontends); |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 865 | |
Hans Verkuil | afd9666 | 2009-03-13 13:24:19 -0300 | [diff] [blame] | 866 | switch (port->dev->board) { |
| 867 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
| 868 | netup_ci_exit(port); |
| 869 | break; |
| 870 | } |
Igor M. Liplianin | 5a23b07 | 2009-03-03 12:06:09 -0300 | [diff] [blame] | 871 | |
Steven Toth | d19770e | 2007-03-11 20:44:05 -0300 | [diff] [blame] | 872 | return 0; |
| 873 | } |
Michael Krufky | 44a6481 | 2007-03-20 23:00:18 -0300 | [diff] [blame] | 874 | |