aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorBen Backx <ben@bbackx.com>2008-06-22 10:00:53 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-02-24 08:51:25 -0500
commitf1bbb43a667067f24a729df78dc050348b1c7846 (patch)
tree8d589d5f7f5dacfc0779583d6eaeb55be7848652 /drivers/media
parentc81c8b68b46752721b0c1addfabb828da27e1489 (diff)
firesat: fix DVB-S2 device recognition
This only makes sure that a DVB-S2 device is really recognized as a S2, nothing else is added yet. It's using the string containing the model that is stored in the configuration ROM, the older version was using some hardware revision dependent part of the ROM. Signed-off-by: Ben Backx <ben@bbackx.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/firesat/avc_api.c17
-rw-r--r--drivers/media/dvb/firesat/firesat.h3
-rw-r--r--drivers/media/dvb/firesat/firesat_1394.c28
3 files changed, 31 insertions, 17 deletions
diff --git a/drivers/media/dvb/firesat/avc_api.c b/drivers/media/dvb/firesat/avc_api.c
index d70795623fb9..0ad6420e342f 100644
--- a/drivers/media/dvb/firesat/avc_api.c
+++ b/drivers/media/dvb/firesat/avc_api.c
@@ -251,7 +251,7 @@ int AVCTuner_DSD(struct firesat *firesat, struct dvb_frontend_parameters *params
251 251
252// printk(KERN_INFO "%s\n", __func__); 252// printk(KERN_INFO "%s\n", __func__);
253 253
254 if(firesat->type == FireSAT_DVB_S) 254 if (firesat->type == FireSAT_DVB_S || firesat->type == FireSAT_DVB_S2)
255 AVCTuner_tuneQPSK(firesat, params, &CmdFrm); 255 AVCTuner_tuneQPSK(firesat, params, &CmdFrm);
256 else { 256 else {
257 if(firesat->type == FireSAT_DVB_T) { 257 if(firesat->type == FireSAT_DVB_T) {
@@ -654,21 +654,6 @@ int AVCIdentifySubunit(struct firesat *firesat, unsigned char *systemId, int *tr
654 } 654 }
655 if(systemId) 655 if(systemId)
656 *systemId = RspFrm.operand[7]; 656 *systemId = RspFrm.operand[7];
657 if(transport)
658 *transport = RspFrm.operand[14] & 0x7;
659 switch(RspFrm.operand[14] & 0x7) {
660 case 1:
661 printk(KERN_INFO "%s: found DVB/S\n",__func__);
662 break;
663 case 2:
664 printk(KERN_INFO "%s: found DVB/C\n",__func__);
665 break;
666 case 3:
667 printk(KERN_INFO "%s: found DVB/T\n",__func__);
668 break;
669 default:
670 printk(KERN_INFO "%s: found unknown tuner id %u\n",__func__,RspFrm.operand[14] & 0x7);
671 }
672 if(has_ci) 657 if(has_ci)
673 *has_ci = (RspFrm.operand[14] >> 4) & 0x1; 658 *has_ci = (RspFrm.operand[14] >> 4) & 0x1;
674 return 0; 659 return 0;
diff --git a/drivers/media/dvb/firesat/firesat.h b/drivers/media/dvb/firesat/firesat.h
index f852a1ac7740..d1e2ce37063e 100644
--- a/drivers/media/dvb/firesat/firesat.h
+++ b/drivers/media/dvb/firesat/firesat.h
@@ -13,7 +13,8 @@
13enum model_type { 13enum model_type {
14 FireSAT_DVB_S = 1, 14 FireSAT_DVB_S = 1,
15 FireSAT_DVB_C = 2, 15 FireSAT_DVB_C = 2,
16 FireSAT_DVB_T = 3 16 FireSAT_DVB_T = 3,
17 FireSAT_DVB_S2 = 4
17}; 18};
18 19
19struct firesat { 20struct firesat {
diff --git a/drivers/media/dvb/firesat/firesat_1394.c b/drivers/media/dvb/firesat/firesat_1394.c
index c7ccf633c24b..dcac70a2991e 100644
--- a/drivers/media/dvb/firesat/firesat_1394.c
+++ b/drivers/media/dvb/firesat/firesat_1394.c
@@ -263,6 +263,8 @@ static int firesat_probe(struct device *dev)
263 int result; 263 int result;
264 unsigned char subunitcount = 0xff, subunit; 264 unsigned char subunitcount = 0xff, subunit;
265 struct firesat **firesats = kmalloc(sizeof (void*) * 2,GFP_KERNEL); 265 struct firesat **firesats = kmalloc(sizeof (void*) * 2,GFP_KERNEL);
266 int kv_len;
267 char *kv_buf;
266 268
267 if (!firesats) { 269 if (!firesats) {
268 printk("%s: couldn't allocate memory.\n", __func__); 270 printk("%s: couldn't allocate memory.\n", __func__);
@@ -329,6 +331,32 @@ static int firesat_probe(struct device *dev)
329 331
330 firesat->subunit = subunit; 332 firesat->subunit = subunit;
331 333
334 /* Reading device model from ROM */
335 kv_len = (ud->model_name_kv->value.leaf.len - 2) *
336 sizeof(quadlet_t);
337 kv_buf = kmalloc((sizeof(quadlet_t) * kv_len), GFP_KERNEL);
338 memcpy(kv_buf,
339 CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(ud->model_name_kv),
340 kv_len);
341 while ((kv_buf + kv_len - 1) == '\0') kv_len--;
342 kv_buf[kv_len++] = '\0';
343
344 /* Determining the device model */
345 if (strcmp(kv_buf, "FireDTV S/CI") == 0) {
346 printk(KERN_INFO "%s: found DVB/S\n", __func__);
347 firesat->type = 1;
348 } else if (strcmp(kv_buf, "FireDTV C/CI") == 0) {
349 printk(KERN_INFO "%s: found DVB/C\n", __func__);
350 firesat->type = 2;
351 } else if (strcmp(kv_buf, "FireDTV T/CI") == 0) {
352 printk(KERN_INFO "%s: found DVB/T\n", __func__);
353 firesat->type = 3;
354 } else if (strcmp(kv_buf, "FireDTV S2 ") == 0) {
355 printk(KERN_INFO "%s: found DVB/S2\n", __func__);
356 firesat->type = 4;
357 }
358 kfree(kv_buf);
359
332 if (AVCIdentifySubunit(firesat, NULL, (int*)&firesat->type, &firesat->has_ci)) { 360 if (AVCIdentifySubunit(firesat, NULL, (int*)&firesat->type, &firesat->has_ci)) {
333 printk("%s: cannot identify subunit %d\n", __func__, subunit); 361 printk("%s: cannot identify subunit %d\n", __func__, subunit);
334 spin_lock_irqsave(&firesat_list_lock, flags); 362 spin_lock_irqsave(&firesat_list_lock, flags);