diff options
Diffstat (limited to 'drivers/media/video/au0828/au0828-dvb.c')
-rw-r--r-- | drivers/media/video/au0828/au0828-dvb.c | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c index ba94be7e0ac1..a882cf546d0a 100644 --- a/drivers/media/video/au0828/au0828-dvb.c +++ b/drivers/media/video/au0828/au0828-dvb.c @@ -36,11 +36,39 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); #define _AU0828_BULKPIPE 0x83 #define _BULKPIPESIZE 0xe522 +static u8 hauppauge_hvr950q_led_states[] = { + 0x00, /* off */ + 0x02, /* yellow */ + 0x04, /* green */ +}; + +static struct au8522_led_config hauppauge_hvr950q_led_cfg = { + .gpio_output = 0x00e0, + .gpio_output_enable = 0x6006, + .gpio_output_disable = 0x0660, + + .gpio_leds = 0x00e2, + .led_states = hauppauge_hvr950q_led_states, + .num_led_states = sizeof(hauppauge_hvr950q_led_states), + + .vsb8_strong = 20 /* dB */ * 10, + .qam64_strong = 25 /* dB */ * 10, + .qam256_strong = 32 /* dB */ * 10, +}; + static struct au8522_config hauppauge_hvr950q_config = { .demod_address = 0x8e >> 1, .status_mode = AU8522_DEMODLOCKING, .qam_if = AU8522_IF_6MHZ, .vsb_if = AU8522_IF_6MHZ, + .led_cfg = &hauppauge_hvr950q_led_cfg, +}; + +static struct au8522_config fusionhdtv7usb_config = { + .demod_address = 0x8e >> 1, + .status_mode = AU8522_DEMODLOCKING, + .qam_if = AU8522_IF_6MHZ, + .vsb_if = AU8522_IF_6MHZ, }; static struct au8522_config hauppauge_woodbury_config = { @@ -53,7 +81,6 @@ static struct au8522_config hauppauge_woodbury_config = { static struct xc5000_config hauppauge_hvr950q_tunerconfig = { .i2c_address = 0x61, .if_khz = 6000, - .tuner_callback = au0828_tuner_callback }; static struct mxl5007t_config mxl5007t_hvr950q_config = { @@ -146,7 +173,8 @@ static int start_urb_transfer(struct au0828_dev *dev) purb->status = -EINPROGRESS; usb_fill_bulk_urb(purb, dev->usbdev, - usb_rcvbulkpipe(dev->usbdev, _AU0828_BULKPIPE), + usb_rcvbulkpipe(dev->usbdev, + _AU0828_BULKPIPE), purb->transfer_buffer, URB_BUFSIZE, urb_completion, @@ -353,14 +381,12 @@ int au0828_dvb_register(struct au0828_dev *dev) switch (dev->board) { case AU0828_BOARD_HAUPPAUGE_HVR850: case AU0828_BOARD_HAUPPAUGE_HVR950Q: - case AU0828_BOARD_DVICO_FUSIONHDTV7: dvb->frontend = dvb_attach(au8522_attach, &hauppauge_hvr950q_config, &dev->i2c_adap); if (dvb->frontend != NULL) - dvb_attach(xc5000_attach, dvb->frontend, - &dev->i2c_adap, - &hauppauge_hvr950q_tunerconfig, dev); + dvb_attach(xc5000_attach, dvb->frontend, &dev->i2c_adap, + &hauppauge_hvr950q_tunerconfig); break; case AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL: dvb->frontend = dvb_attach(au8522_attach, @@ -380,6 +406,16 @@ int au0828_dvb_register(struct au0828_dev *dev) 0x60, &dev->i2c_adap, &hauppauge_woodbury_tunerconfig); break; + case AU0828_BOARD_DVICO_FUSIONHDTV7: + dvb->frontend = dvb_attach(au8522_attach, + &fusionhdtv7usb_config, + &dev->i2c_adap); + if (dvb->frontend != NULL) { + dvb_attach(xc5000_attach, dvb->frontend, + &dev->i2c_adap, + &hauppauge_hvr950q_tunerconfig); + } + break; default: printk(KERN_WARNING "The frontend of your DVB/ATSC card " "isn't supported yet\n"); @@ -390,6 +426,8 @@ int au0828_dvb_register(struct au0828_dev *dev) __func__); return -1; } + /* define general-purpose callback pointer */ + dvb->frontend->callback = au0828_tuner_callback; /* register everything */ ret = dvb_register(dev); |