aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/ir-keymaps.c93
-rw-r--r--drivers/media/common/saa7146_fops.c2
-rw-r--r--drivers/media/common/saa7146_video.c10
-rw-r--r--drivers/media/common/tuners/mxl5005s.c6
-rw-r--r--drivers/media/common/tuners/tda827x.c15
-rw-r--r--drivers/media/common/tuners/tda8290.c63
-rw-r--r--drivers/media/common/tuners/tda9887.c5
-rw-r--r--drivers/media/common/tuners/tuner-xc2028.c35
-rw-r--r--drivers/media/common/tuners/xc5000.c7
9 files changed, 197 insertions, 39 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index 4952aeb5dd80..d8229a0e9a9c 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -2391,6 +2391,67 @@ IR_KEYTAB_TYPE ir_codes_powercolor_real_angel[IR_KEYTAB_SIZE] = {
2391}; 2391};
2392EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel); 2392EXPORT_SYMBOL_GPL(ir_codes_powercolor_real_angel);
2393 2393
2394/* Kworld Plus TV Analog Lite PCI IR
2395 Mauro Carvalho Chehab <mchehab@infradead.org>
2396 */
2397IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE] = {
2398 [0x0c] = KEY_PROG1, /* Kworld key */
2399 [0x16] = KEY_CLOSECD, /* -> ) */
2400 [0x1d] = KEY_POWER2,
2401
2402 [0x00] = KEY_1,
2403 [0x01] = KEY_2,
2404 [0x02] = KEY_3, /* Two keys have the same code: 3 and left */
2405 [0x03] = KEY_4, /* Two keys have the same code: 3 and right */
2406 [0x04] = KEY_5,
2407 [0x05] = KEY_6,
2408 [0x06] = KEY_7,
2409 [0x07] = KEY_8,
2410 [0x08] = KEY_9,
2411 [0x0a] = KEY_0,
2412
2413 [0x09] = KEY_AGAIN,
2414 [0x14] = KEY_MUTE,
2415
2416 [0x20] = KEY_UP,
2417 [0x21] = KEY_DOWN,
2418 [0x0b] = KEY_ENTER,
2419
2420 [0x10] = KEY_CHANNELUP,
2421 [0x11] = KEY_CHANNELDOWN,
2422
2423 /* Couldn't map key left/key right since those
2424 conflict with '3' and '4' scancodes
2425 I dunno what the original driver does
2426 */
2427
2428 [0x13] = KEY_VOLUMEUP,
2429 [0x12] = KEY_VOLUMEDOWN,
2430
2431 /* The lower part of the IR
2432 There are several duplicated keycodes there.
2433 Most of them conflict with digits.
2434 Add mappings just to the unused scancodes.
2435 Somehow, the original driver has a way to know,
2436 but this doesn't seem to be on some GPIO.
2437 Also, it is not related to the time between keyup
2438 and keydown.
2439 */
2440 [0x19] = KEY_PAUSE, /* Timeshift */
2441 [0x1a] = KEY_STOP,
2442 [0x1b] = KEY_RECORD,
2443
2444 [0x22] = KEY_TEXT,
2445
2446 [0x15] = KEY_AUDIO, /* ((*)) */
2447 [0x0f] = KEY_ZOOM,
2448 [0x1c] = KEY_SHUFFLE, /* snapshot */
2449
2450 [0x18] = KEY_RED, /* B */
2451 [0x23] = KEY_GREEN, /* C */
2452};
2453EXPORT_SYMBOL_GPL(ir_codes_kworld_plus_tv_analog);
2454
2394IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE] = { 2455IR_KEYTAB_TYPE ir_codes_avermedia_a16d[IR_KEYTAB_SIZE] = {
2395 [0x20] = KEY_LIST, 2456 [0x20] = KEY_LIST,
2396 [0x00] = KEY_POWER, 2457 [0x00] = KEY_POWER,
@@ -2511,3 +2572,35 @@ IR_KEYTAB_TYPE ir_codes_real_audio_220_32_keys[IR_KEYTAB_SIZE] = {
2511 2572
2512}; 2573};
2513EXPORT_SYMBOL_GPL(ir_codes_real_audio_220_32_keys); 2574EXPORT_SYMBOL_GPL(ir_codes_real_audio_220_32_keys);
2575
2576/* ATI TV Wonder HD 600 USB
2577 Devin Heitmueller <devin.heitmueller@gmail.com>
2578 */
2579IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE] = {
2580 [0x00] = KEY_RECORD, /* Row 1 */
2581 [0x01] = KEY_PLAYPAUSE,
2582 [0x02] = KEY_STOP,
2583 [0x03] = KEY_POWER,
2584 [0x04] = KEY_PREVIOUS, /* Row 2 */
2585 [0x05] = KEY_REWIND,
2586 [0x06] = KEY_FORWARD,
2587 [0x07] = KEY_NEXT,
2588 [0x08] = KEY_EPG, /* Row 3 */
2589 [0x09] = KEY_HOME,
2590 [0x0a] = KEY_MENU,
2591 [0x0b] = KEY_CHANNELUP,
2592 [0x0c] = KEY_BACK, /* Row 4 */
2593 [0x0d] = KEY_UP,
2594 [0x0e] = KEY_INFO,
2595 [0x0f] = KEY_CHANNELDOWN,
2596 [0x10] = KEY_LEFT, /* Row 5 */
2597 [0x11] = KEY_SELECT,
2598 [0x12] = KEY_RIGHT,
2599 [0x13] = KEY_VOLUMEUP,
2600 [0x14] = KEY_LAST, /* Row 6 */
2601 [0x15] = KEY_DOWN,
2602 [0x16] = KEY_MUTE,
2603 [0x17] = KEY_VOLUMEDOWN,
2604};
2605
2606EXPORT_SYMBOL_GPL(ir_codes_ati_tv_wonder_hd_600);
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 127b0526a727..7d844af88384 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -313,7 +313,7 @@ static int fops_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
313/* 313/*
314 DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg)); 314 DEB_EE(("inode:%p, file:%p, cmd:%d, arg:%li\n",inode, file, cmd, arg));
315*/ 315*/
316 return video_usercopy(inode, file, cmd, arg, saa7146_video_do_ioctl); 316 return video_usercopy(file, cmd, arg, saa7146_video_do_ioctl);
317} 317}
318 318
319static int fops_mmap(struct file *file, struct vm_area_struct * vma) 319static int fops_mmap(struct file *file, struct vm_area_struct * vma)
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index fe0bd55977e3..101b01dbb8ea 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -834,7 +834,7 @@ static int video_end(struct saa7146_fh *fh, struct file *file)
834 * copying is done already, arg is a kernel pointer. 834 * copying is done already, arg is a kernel pointer.
835 */ 835 */
836 836
837static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg) 837int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg)
838{ 838{
839 struct saa7146_fh *fh = file->private_data; 839 struct saa7146_fh *fh = file->private_data;
840 struct saa7146_dev *dev = fh->dev; 840 struct saa7146_dev *dev = fh->dev;
@@ -1216,17 +1216,11 @@ static int __saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *a
1216#endif 1216#endif
1217 default: 1217 default:
1218 return v4l_compat_translate_ioctl(file, cmd, arg, 1218 return v4l_compat_translate_ioctl(file, cmd, arg,
1219 __saa7146_video_do_ioctl); 1219 saa7146_video_do_ioctl);
1220 } 1220 }
1221 return 0; 1221 return 0;
1222} 1222}
1223 1223
1224int saa7146_video_do_ioctl(struct inode *inode, struct file *file,
1225 unsigned int cmd, void *arg)
1226{
1227 return __saa7146_video_do_ioctl(file, cmd, arg);
1228}
1229
1230/*********************************************************************************/ 1224/*********************************************************************************/
1231/* buffer handling functions */ 1225/* buffer handling functions */
1232 1226
diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index a8878244bb3c..31522d2e318e 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -3598,7 +3598,7 @@ static u16 MXL_GetInitRegister(struct dvb_frontend *fe, u8 *RegNum,
3598 76, 77, 91, 134, 135, 137, 147, 3598 76, 77, 91, 134, 135, 137, 147,
3599 156, 166, 167, 168, 25 }; 3599 156, 166, 167, 168, 25 };
3600 3600
3601 *count = sizeof(RegAddr) / sizeof(u8); 3601 *count = ARRAY_SIZE(RegAddr);
3602 3602
3603 status += MXL_BlockInit(fe); 3603 status += MXL_BlockInit(fe);
3604 3604
@@ -3630,7 +3630,7 @@ static u16 MXL_GetCHRegister(struct dvb_frontend *fe, u8 *RegNum, u8 *RegVal,
3630 */ 3630 */
3631#endif 3631#endif
3632 3632
3633 *count = sizeof(RegAddr) / sizeof(u8); 3633 *count = ARRAY_SIZE(RegAddr);
3634 3634
3635 for (i = 0 ; i < *count; i++) { 3635 for (i = 0 ; i < *count; i++) {
3636 RegNum[i] = RegAddr[i]; 3636 RegNum[i] = RegAddr[i];
@@ -3648,7 +3648,7 @@ static u16 MXL_GetCHRegister_ZeroIF(struct dvb_frontend *fe, u8 *RegNum,
3648 3648
3649 u8 RegAddr[] = {43, 136}; 3649 u8 RegAddr[] = {43, 136};
3650 3650
3651 *count = sizeof(RegAddr) / sizeof(u8); 3651 *count = ARRAY_SIZE(RegAddr);
3652 3652
3653 for (i = 0; i < *count; i++) { 3653 for (i = 0; i < *count; i++) {
3654 RegNum[i] = RegAddr[i]; 3654 RegNum[i] = RegAddr[i];
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c
index 4a74f65e759a..f4d931f14fad 100644
--- a/drivers/media/common/tuners/tda827x.c
+++ b/drivers/media/common/tuners/tda827x.c
@@ -80,10 +80,11 @@ static void tda827x_set_std(struct dvb_frontend *fe,
80 mode = "xx"; 80 mode = "xx";
81 } 81 }
82 82
83 if (params->mode == V4L2_TUNER_RADIO) 83 if (params->mode == V4L2_TUNER_RADIO) {
84 priv->sgIF = 88; /* if frequency is 5.5 MHz */ 84 priv->sgIF = 88; /* if frequency is 5.5 MHz */
85 85 dprintk("setting tda827x to radio FM\n");
86 dprintk("setting tda827x to system %s\n", mode); 86 } else
87 dprintk("setting tda827x to system %s\n", mode);
87} 88}
88 89
89 90
@@ -199,7 +200,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe,
199 fe->ops.i2c_gate_ctrl(fe, 1); 200 fe->ops.i2c_gate_ctrl(fe, 1);
200 i2c_transfer(priv->i2c_adap, &msg, 1); 201 i2c_transfer(priv->i2c_adap, &msg, 1);
201 202
202 priv->frequency = tuner_freq - if_freq; // FIXME 203 priv->frequency = params->frequency;
203 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; 204 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
204 205
205 return 0; 206 return 0;
@@ -304,7 +305,7 @@ static int tda827xo_set_analog_params(struct dvb_frontend *fe,
304 reg2[1] = 0x08; /* Vsync en */ 305 reg2[1] = 0x08; /* Vsync en */
305 i2c_transfer(priv->i2c_adap, &msg, 1); 306 i2c_transfer(priv->i2c_adap, &msg, 1);
306 307
307 priv->frequency = freq * 62500; 308 priv->frequency = params->frequency;
308 309
309 return 0; 310 return 0;
310} 311}
@@ -591,7 +592,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe,
591 fe->ops.i2c_gate_ctrl(fe, 1); 592 fe->ops.i2c_gate_ctrl(fe, 1);
592 i2c_transfer(priv->i2c_adap, &msg, 1); 593 i2c_transfer(priv->i2c_adap, &msg, 1);
593 594
594 priv->frequency = tuner_freq - if_freq; // FIXME 595 priv->frequency = params->frequency;
595 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; 596 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0;
596 597
597 return 0; 598 return 0;
@@ -691,7 +692,7 @@ static int tda827xa_set_analog_params(struct dvb_frontend *fe,
691 tuner_reg[1] = 0x19 + (priv->lpsel << 1); 692 tuner_reg[1] = 0x19 + (priv->lpsel << 1);
692 i2c_transfer(priv->i2c_adap, &msg, 1); 693 i2c_transfer(priv->i2c_adap, &msg, 1);
693 694
694 priv->frequency = freq * 62500; 695 priv->frequency = params->frequency;
695 696
696 return 0; 697 return 0;
697} 698}
diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c
index c112bdd4e0f0..0ee79fd7c7a9 100644
--- a/drivers/media/common/tuners/tda8290.c
+++ b/drivers/media/common/tuners/tda8290.c
@@ -32,6 +32,9 @@ static int debug;
32module_param(debug, int, 0644); 32module_param(debug, int, 0644);
33MODULE_PARM_DESC(debug, "enable verbose debug messages"); 33MODULE_PARM_DESC(debug, "enable verbose debug messages");
34 34
35static int deemphasis_50;
36MODULE_PARM_DESC(deemphasis_50, "0 - 75us deemphasis; 1 - 50us deemphasis");
37
35/* ---------------------------------------------------------------------- */ 38/* ---------------------------------------------------------------------- */
36 39
37struct tda8290_priv { 40struct tda8290_priv {
@@ -139,9 +142,34 @@ static void set_audio(struct dvb_frontend *fe,
139 mode = "xx"; 142 mode = "xx";
140 } 143 }
141 144
142 tuner_dbg("setting tda829x to system %s\n", mode); 145 if (params->mode == V4L2_TUNER_RADIO) {
146 priv->tda8290_easy_mode = 0x01; /* Start with MN values */
147 tuner_dbg("setting to radio FM\n");
148 } else {
149 tuner_dbg("setting tda829x to system %s\n", mode);
150 }
143} 151}
144 152
153struct {
154 unsigned char seq[2];
155} fm_mode[] = {
156 { { 0x01, 0x81} }, /* Put device into expert mode */
157 { { 0x03, 0x48} }, /* Disable NOTCH and VIDEO filters */
158 { { 0x04, 0x04} }, /* Disable color carrier filter (SSIF) */
159 { { 0x05, 0x04} }, /* ADC headroom */
160 { { 0x06, 0x10} }, /* group delay flat */
161
162 { { 0x07, 0x00} }, /* use the same radio DTO values as a tda8295 */
163 { { 0x08, 0x00} },
164 { { 0x09, 0x80} },
165 { { 0x0a, 0xda} },
166 { { 0x0b, 0x4b} },
167 { { 0x0c, 0x68} },
168
169 { { 0x0d, 0x00} }, /* PLL off, no video carrier detect */
170 { { 0x14, 0x00} }, /* disable auto mute if no video */
171};
172
145static void tda8290_set_params(struct dvb_frontend *fe, 173static void tda8290_set_params(struct dvb_frontend *fe,
146 struct analog_parameters *params) 174 struct analog_parameters *params)
147{ 175{
@@ -178,15 +206,30 @@ static void tda8290_set_params(struct dvb_frontend *fe,
178 tuner_i2c_xfer_send(&priv->i2c_props, soft_reset, 2); 206 tuner_i2c_xfer_send(&priv->i2c_props, soft_reset, 2);
179 msleep(1); 207 msleep(1);
180 208
181 expert_mode[1] = priv->tda8290_easy_mode + 0x80; 209 if (params->mode == V4L2_TUNER_RADIO) {
182 tuner_i2c_xfer_send(&priv->i2c_props, expert_mode, 2); 210 int i;
183 tuner_i2c_xfer_send(&priv->i2c_props, gainset_off, 2); 211 unsigned char deemphasis[] = { 0x13, 1 };
184 tuner_i2c_xfer_send(&priv->i2c_props, if_agc_spd, 2); 212
185 if (priv->tda8290_easy_mode & 0x60) 213 /* FIXME: allow using a different deemphasis */
186 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_9, 2); 214
187 else 215 if (deemphasis_50)
188 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_6, 2); 216 deemphasis[1] = 2;
189 tuner_i2c_xfer_send(&priv->i2c_props, pll_bw_nom, 2); 217
218 for (i = 0; i < ARRAY_SIZE(fm_mode); i++)
219 tuner_i2c_xfer_send(&priv->i2c_props, fm_mode[i].seq, 2);
220
221 tuner_i2c_xfer_send(&priv->i2c_props, deemphasis, 2);
222 } else {
223 expert_mode[1] = priv->tda8290_easy_mode + 0x80;
224 tuner_i2c_xfer_send(&priv->i2c_props, expert_mode, 2);
225 tuner_i2c_xfer_send(&priv->i2c_props, gainset_off, 2);
226 tuner_i2c_xfer_send(&priv->i2c_props, if_agc_spd, 2);
227 if (priv->tda8290_easy_mode & 0x60)
228 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_9, 2);
229 else
230 tuner_i2c_xfer_send(&priv->i2c_props, adc_head_6, 2);
231 tuner_i2c_xfer_send(&priv->i2c_props, pll_bw_nom, 2);
232 }
190 233
191 tda8290_i2c_bridge(fe, 1); 234 tda8290_i2c_bridge(fe, 1);
192 235
diff --git a/drivers/media/common/tuners/tda9887.c b/drivers/media/common/tuners/tda9887.c
index ff1788cc5d48..544cdbe88a6c 100644
--- a/drivers/media/common/tuners/tda9887.c
+++ b/drivers/media/common/tuners/tda9887.c
@@ -180,11 +180,10 @@ static struct tvnorm tvnorms[] = {
180 },{ 180 },{
181 .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H, 181 .std = V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H,
182 .name = "SECAM-BGH", 182 .name = "SECAM-BGH",
183 .b = ( cPositiveAmTV | 183 .b = ( cNegativeFmTV |
184 cQSS ), 184 cQSS ),
185 .c = ( cTopDefault), 185 .c = ( cTopDefault),
186 .e = ( cGating_36 | 186 .e = ( cAudioIF_5_5 |
187 cAudioIF_5_5 |
188 cVideoIF_38_90 ), 187 cVideoIF_38_90 ),
189 },{ 188 },{
190 .std = V4L2_STD_SECAM_L, 189 .std = V4L2_STD_SECAM_L,
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c
index b65e6803e6c6..1adce9ff52ce 100644
--- a/drivers/media/common/tuners/tuner-xc2028.c
+++ b/drivers/media/common/tuners/tuner-xc2028.c
@@ -28,6 +28,12 @@ static int debug;
28module_param(debug, int, 0644); 28module_param(debug, int, 0644);
29MODULE_PARM_DESC(debug, "enable verbose debug messages"); 29MODULE_PARM_DESC(debug, "enable verbose debug messages");
30 30
31static int no_poweroff;
32module_param(no_poweroff, int, 0644);
33MODULE_PARM_DESC(debug, "0 (default) powers device off when not used.\n"
34 "1 keep device energized and with tuner ready all the times.\n"
35 " Faster, but consumes more power and keeps the device hotter\n");
36
31static char audio_std[8]; 37static char audio_std[8];
32module_param_string(audio_std, audio_std, sizeof(audio_std), 0); 38module_param_string(audio_std, audio_std, sizeof(audio_std), 0);
33MODULE_PARM_DESC(audio_std, 39MODULE_PARM_DESC(audio_std,
@@ -1091,6 +1097,34 @@ static int xc2028_set_params(struct dvb_frontend *fe,
1091 T_DIGITAL_TV, type, 0, demod); 1097 T_DIGITAL_TV, type, 0, demod);
1092} 1098}
1093 1099
1100static int xc2028_sleep(struct dvb_frontend *fe)
1101{
1102 struct xc2028_data *priv = fe->tuner_priv;
1103 int rc = 0;
1104
1105 /* Avoid firmware reload on slow devices */
1106 if (no_poweroff)
1107 return 0;
1108
1109 tuner_dbg("Putting xc2028/3028 into poweroff mode.\n");
1110 if (debug > 1) {
1111 tuner_dbg("Printing sleep stack trace:\n");
1112 dump_stack();
1113 }
1114
1115 mutex_lock(&priv->lock);
1116
1117 if (priv->firm_version < 0x0202)
1118 rc = send_seq(priv, {0x00, 0x08, 0x00, 0x00});
1119 else
1120 rc = send_seq(priv, {0x80, 0x08, 0x00, 0x00});
1121
1122 priv->cur_fw.type = 0; /* need firmware reload */
1123
1124 mutex_unlock(&priv->lock);
1125
1126 return rc;
1127}
1094 1128
1095static int xc2028_dvb_release(struct dvb_frontend *fe) 1129static int xc2028_dvb_release(struct dvb_frontend *fe)
1096{ 1130{
@@ -1171,6 +1205,7 @@ static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = {
1171 .get_frequency = xc2028_get_frequency, 1205 .get_frequency = xc2028_get_frequency,
1172 .get_rf_strength = xc2028_signal, 1206 .get_rf_strength = xc2028_signal,
1173 .set_params = xc2028_set_params, 1207 .set_params = xc2028_set_params,
1208 .sleep = xc2028_sleep,
1174}; 1209};
1175 1210
1176struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe, 1211struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index e12d13e0cbe9..493ce93caf43 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -36,10 +36,6 @@ static int debug;
36module_param(debug, int, 0644); 36module_param(debug, int, 0644);
37MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off)."); 37MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
38 38
39static int xc5000_load_fw_on_attach;
40module_param_named(init_fw, xc5000_load_fw_on_attach, int, 0644);
41MODULE_PARM_DESC(init_fw, "Load firmware during driver initialization.");
42
43static DEFINE_MUTEX(xc5000_list_mutex); 39static DEFINE_MUTEX(xc5000_list_mutex);
44static LIST_HEAD(hybrid_tuner_instance_list); 40static LIST_HEAD(hybrid_tuner_instance_list);
45 41
@@ -1017,9 +1013,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
1017 memcpy(&fe->ops.tuner_ops, &xc5000_tuner_ops, 1013 memcpy(&fe->ops.tuner_ops, &xc5000_tuner_ops,
1018 sizeof(struct dvb_tuner_ops)); 1014 sizeof(struct dvb_tuner_ops));
1019 1015
1020 if (xc5000_load_fw_on_attach)
1021 xc5000_init(fe);
1022
1023 return fe; 1016 return fe;
1024fail: 1017fail:
1025 mutex_unlock(&xc5000_list_mutex); 1018 mutex_unlock(&xc5000_list_mutex);