Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226176
b: refs/heads/master
c: ede676c
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 230df9c commit 069d5ed
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 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: 9417bc6dd9de85944501f8f4ce8dd0e64135ca82
refs/heads/master: ede676c72d0b18f1c15300f7874370e771489a1c
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/cx231xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ config VIDEO_CX231XX_DVB
depends on VIDEO_CX231XX && DVB_CORE
select VIDEOBUF_DVB
select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_NXP18271 if !DVB_FE_CUSTOMISE
select DVB_MB86A20S if !DVB_FE_CUSTOMISE

---help---
This adds support for DVB cards based on the
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/cx231xx/cx231xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ struct cx231xx_board cx231xx_boards[] = {
.gpio_pin_status_mask = 0x4001000,
.tuner_i2c_master = 2,
.demod_i2c_master = 1,
.has_dvb = 0, /* FIXME: need driver for mb86a20s */
.has_dvb = 1,
.demod_addr = 0x10,
.norm = V4L2_STD_PAL_M,
.input = {{
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/media/video/cx231xx/cx231xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "tda18271.h"
#include "s5h1411.h"
#include "lgdt3305.h"
#include "mb86a20s.h"

MODULE_DESCRIPTION("driver for cx231xx based DVB cards");
MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>");
Expand Down Expand Up @@ -88,6 +89,11 @@ static struct tda18271_std_map cnxt_rde253s_tda18271_std_map = {
.if_lvl = 1, .rfagc_top = 0x37, },
};

static struct tda18271_std_map mb86a20s_tda18271_config = {
.dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4,
.if_lvl = 7, .rfagc_top = 0x37, },
};

static struct tda18271_config cnxt_rde253s_tunerconfig = {
.std_map = &cnxt_rde253s_tda18271_std_map,
.gate = TDA18271_GATE_ANALOG,
Expand Down Expand Up @@ -135,6 +141,16 @@ static struct tda18271_config hcw_tda18271_config = {
.gate = TDA18271_GATE_DIGITAL,
};

static const struct mb86a20s_config pv_mb86a20s_config = {
.demod_address = 0x10,
};

static struct tda18271_config pv_tda18271_config = {
.std_map = &mb86a20s_tda18271_config,
.gate = TDA18271_GATE_DIGITAL,
.small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
};

static inline void print_err_status(struct cx231xx *dev, int packet, int status)
{
char *errmsg = "Unknown";
Expand Down Expand Up @@ -687,6 +703,29 @@ static int dvb_init(struct cx231xx *dev)
&hcw_tda18271_config);
break;

case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID:

printk(KERN_INFO "%s: looking for demod on i2c bus: %d\n",
__func__, i2c_adapter_id(&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap));

dev->dvb->frontend = dvb_attach(mb86a20s_attach,
&pv_mb86a20s_config,
&dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap);

if (dev->dvb->frontend == NULL) {
printk(DRIVER_NAME
": Failed to attach mb86a20s demod\n");
result = -EINVAL;
goto out_free;
}

/* define general-purpose callback pointer */
dvb->frontend->callback = cx231xx_tuner_callback;

dvb_attach(tda18271_attach, dev->dvb->frontend,
0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap,
&pv_tda18271_config);
break;

default:
printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
Expand Down

0 comments on commit 069d5ed

Please sign in to comment.