Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131719
b: refs/heads/master
c: f1bbb43
h: refs/heads/master
i:
  131717: 086b008
  131715: f252a80
  131711: 0beeec3
v: v3
  • Loading branch information
Ben Backx authored and Stefan Richter committed Feb 24, 2009
1 parent 3b0d3fc commit 0761608
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c81c8b68b46752721b0c1addfabb828da27e1489
refs/heads/master: f1bbb43a667067f24a729df78dc050348b1c7846
17 changes: 1 addition & 16 deletions trunk/drivers/media/dvb/firesat/avc_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ int AVCTuner_DSD(struct firesat *firesat, struct dvb_frontend_parameters *params

// printk(KERN_INFO "%s\n", __func__);

if(firesat->type == FireSAT_DVB_S)
if (firesat->type == FireSAT_DVB_S || firesat->type == FireSAT_DVB_S2)
AVCTuner_tuneQPSK(firesat, params, &CmdFrm);
else {
if(firesat->type == FireSAT_DVB_T) {
Expand Down Expand Up @@ -654,21 +654,6 @@ int AVCIdentifySubunit(struct firesat *firesat, unsigned char *systemId, int *tr
}
if(systemId)
*systemId = RspFrm.operand[7];
if(transport)
*transport = RspFrm.operand[14] & 0x7;
switch(RspFrm.operand[14] & 0x7) {
case 1:
printk(KERN_INFO "%s: found DVB/S\n",__func__);
break;
case 2:
printk(KERN_INFO "%s: found DVB/C\n",__func__);
break;
case 3:
printk(KERN_INFO "%s: found DVB/T\n",__func__);
break;
default:
printk(KERN_INFO "%s: found unknown tuner id %u\n",__func__,RspFrm.operand[14] & 0x7);
}
if(has_ci)
*has_ci = (RspFrm.operand[14] >> 4) & 0x1;
return 0;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/dvb/firesat/firesat.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
enum model_type {
FireSAT_DVB_S = 1,
FireSAT_DVB_C = 2,
FireSAT_DVB_T = 3
FireSAT_DVB_T = 3,
FireSAT_DVB_S2 = 4
};

struct firesat {
Expand Down
28 changes: 28 additions & 0 deletions trunk/drivers/media/dvb/firesat/firesat_1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ static int firesat_probe(struct device *dev)
int result;
unsigned char subunitcount = 0xff, subunit;
struct firesat **firesats = kmalloc(sizeof (void*) * 2,GFP_KERNEL);
int kv_len;
char *kv_buf;

if (!firesats) {
printk("%s: couldn't allocate memory.\n", __func__);
Expand Down Expand Up @@ -329,6 +331,32 @@ static int firesat_probe(struct device *dev)

firesat->subunit = subunit;

/* Reading device model from ROM */
kv_len = (ud->model_name_kv->value.leaf.len - 2) *
sizeof(quadlet_t);
kv_buf = kmalloc((sizeof(quadlet_t) * kv_len), GFP_KERNEL);
memcpy(kv_buf,
CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(ud->model_name_kv),
kv_len);
while ((kv_buf + kv_len - 1) == '\0') kv_len--;
kv_buf[kv_len++] = '\0';

/* Determining the device model */
if (strcmp(kv_buf, "FireDTV S/CI") == 0) {
printk(KERN_INFO "%s: found DVB/S\n", __func__);
firesat->type = 1;
} else if (strcmp(kv_buf, "FireDTV C/CI") == 0) {
printk(KERN_INFO "%s: found DVB/C\n", __func__);
firesat->type = 2;
} else if (strcmp(kv_buf, "FireDTV T/CI") == 0) {
printk(KERN_INFO "%s: found DVB/T\n", __func__);
firesat->type = 3;
} else if (strcmp(kv_buf, "FireDTV S2 ") == 0) {
printk(KERN_INFO "%s: found DVB/S2\n", __func__);
firesat->type = 4;
}
kfree(kv_buf);

if (AVCIdentifySubunit(firesat, NULL, (int*)&firesat->type, &firesat->has_ci)) {
printk("%s: cannot identify subunit %d\n", __func__, subunit);
spin_lock_irqsave(&firesat_list_lock, flags);
Expand Down

0 comments on commit 0761608

Please sign in to comment.