Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295066
b: refs/heads/master
c: abfac0b
h: refs/heads/master
v: v3
  • Loading branch information
Gianluca Gennari authored and Mauro Carvalho Chehab committed Mar 19, 2012
1 parent abb6d16 commit 9f09b09
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 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: abf9d005375d6c6160cc9c17e5dcac32e412c8dc
refs/heads/master: abfac0b64876294aaf1aab01df56041a3995a91f
2 changes: 1 addition & 1 deletion trunk/drivers/staging/media/as102/as102_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct as102_dev_t {
struct as10x_bus_adapter_t bus_adap;
struct list_head device_entry;
struct kref kref;
unsigned long minor;
uint8_t elna_cfg;

struct dvb_adapter dvb_adap;
struct dvb_frontend dvb_fe;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/media/as102/as102_fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static int as102_fe_ts_bus_ctrl(struct dvb_frontend *fe, int acquire)

if (acquire) {
if (elna_enable)
as10x_cmd_set_context(&dev->bus_adap, 1010, 0xC0);
as10x_cmd_set_context(&dev->bus_adap, CONTEXT_LNA, dev->elna_cfg);

ret = as10x_cmd_turn_on(&dev->bus_adap);
} else {
Expand Down
15 changes: 14 additions & 1 deletion trunk/drivers/staging/media/as102/as102_usb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ static const char * const as102_device_names[] = {
NULL /* Terminating entry */
};

/* eLNA configuration: devices built on the reference design work best
with 0xA0, while custom designs seem to require 0xC0 */
static uint8_t const as102_elna_cfg[] = {
0xA0,
0xC0,
0xC0,
0xA0,
0xA0,
0x00 /* Terminating entry */
};

struct usb_driver as102_usb_driver = {
.name = DRIVER_FULL_NAME,
.probe = as102_usb_probe,
Expand Down Expand Up @@ -371,8 +382,10 @@ static int as102_usb_probe(struct usb_interface *intf,
/* Assign the user-friendly device name */
for (i = 0; i < (sizeof(as102_usb_id_table) /
sizeof(struct usb_device_id)); i++) {
if (id == &as102_usb_id_table[i])
if (id == &as102_usb_id_table[i]) {
as102_dev->name = as102_device_names[i];
as102_dev->elna_cfg = as102_elna_cfg[i];
}
}

if (as102_dev->name == NULL)
Expand Down

0 comments on commit 9f09b09

Please sign in to comment.