diff options
author | Olli Salonen <olli.salonen@iki.fi> | 2015-02-28 12:25:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-03-03 10:36:12 -0300 |
commit | 809abdbf46377abe39a72884d026979bb1dbd6d3 (patch) | |
tree | 3da95d6527c64f0a282827b65b292691a482e2cf /drivers/media/usb/cx231xx/cx231xx-dvb.c | |
parent | c28aebe178a403f0e8632a283bc4d683b0c93e83 (diff) | |
download | talos-obmc-linux-809abdbf46377abe39a72884d026979bb1dbd6d3.tar.gz talos-obmc-linux-809abdbf46377abe39a72884d026979bb1dbd6d3.zip |
[media] cx231xx: Hauppauge HVR-955Q ATSC/QAM tuner
Hauppauge HVR-955Q is a ATSC/QAM USB tuner with LGDT3306A demodulator and SiLabs Si2157-A30 tuner.
Only digital TV has been tested (both ATSC and QAM256).
Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-dvb.c')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-dvb.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index ff39bf22442d..610d5675bde6 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -34,6 +34,7 @@ #include "si2165.h" #include "mb86a20s.h" #include "si2157.h" +#include "lgdt3306a.h" MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); @@ -160,6 +161,18 @@ static const struct si2165_config pctv_quatro_stick_1114xx_si2165_config = { .ref_freq_Hz = 24000000, }; +static struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = { + .i2c_addr = 0x59, + .qam_if_khz = 4000, + .vsb_if_khz = 3250, + .deny_i2c_rptr = 1, + .spectral_inversion = 1, + .mpeg_mode = LGDT3306A_MPEG_SERIAL, + .tpclk_edge = LGDT3306A_TPCLK_RISING_EDGE, + .tpvalid_polarity = LGDT3306A_TP_VALID_HIGH, + .xtalMHz = 25, +}; + static inline void print_err_status(struct cx231xx *dev, int packet, int status) { char *errmsg = "Unknown"; @@ -811,7 +824,61 @@ static int dvb_init(struct cx231xx *dev) dev->dvb->i2c_client_tuner = client; break; } + case CX231XX_BOARD_HAUPPAUGE_955Q: + { + struct i2c_client *client; + struct i2c_board_info info; + struct si2157_config si2157_config; + + memset(&info, 0, sizeof(struct i2c_board_info)); + + dev->dvb->frontend = dvb_attach(lgdt3306a_attach, + &hauppauge_955q_lgdt3306a_config, + tuner_i2c + ); + + if (dev->dvb->frontend == NULL) { + dev_err(dev->dev, + "Failed to attach LGDT3306A frontend.\n"); + result = -EINVAL; + goto out_free; + } + + dev->dvb->frontend->ops.i2c_gate_ctrl = NULL; + + /* define general-purpose callback pointer */ + dvb->frontend->callback = cx231xx_tuner_callback; + + /* attach tuner */ + memset(&si2157_config, 0, sizeof(si2157_config)); + si2157_config.fe = dev->dvb->frontend; + si2157_config.inversion = true; + strlcpy(info.type, "si2157", I2C_NAME_SIZE); + info.addr = 0x60; + info.platform_data = &si2157_config; + request_module("si2157"); + + client = i2c_new_device( + tuner_i2c, + &info); + if (client == NULL || client->dev.driver == NULL) { + dvb_frontend_detach(dev->dvb->frontend); + result = -ENODEV; + goto out_free; + } + + if (!try_module_get(client->dev.driver->owner)) { + i2c_unregister_device(client); + dvb_frontend_detach(dev->dvb->frontend); + result = -ENODEV; + goto out_free; + } + + dev->cx231xx_reset_analog_tuner = NULL; + dev->dvb->i2c_client_tuner = client; + break; + } case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID: case CX231XX_BOARD_KWORLD_UB430_USB_HYBRID: |