Skip to content

Commit

Permalink
[media] mb86a20s: add support for serial streams
Browse files Browse the repository at this point in the history
By comparing the traffic between Pixelview (cx23102-based and Kworld
(saa7134-based), the only difference is at register 0xd5. After some
tests, It seems that it is used to change mode between serial and parallel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 55fa288 commit 7572f9c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
18 changes: 13 additions & 5 deletions drivers/media/dvb/frontends/mb86a20s.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ struct mb86a20s_state {
const struct mb86a20s_config *config;

struct dvb_frontend frontend;




};

struct regdata {
Expand Down Expand Up @@ -175,7 +171,7 @@ static struct regdata mb86a20s_init[] = {
{ 0x45, 0x04 },
{ 0x48, 0x04 },
{ 0x50, 0xd5 },
{ 0x51, 0x01 },
{ 0x51, 0x01 }, /* Serial */
{ 0x50, 0xd6 },
{ 0x51, 0x1f },
{ 0x50, 0xd2 },
Expand Down Expand Up @@ -376,6 +372,7 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
{
struct mb86a20s_state *state = fe->demodulator_priv;
int rc;
u8 regD5 = 1;

dprintk("\n");

Expand All @@ -384,6 +381,17 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
if (rc < 0)
return rc;

if (!state->config->is_serial) {
regD5 &= ~1;

rc = mb86a20s_writereg(state, 0x50, 0xd5);
if (rc < 0)
return rc;
rc = mb86a20s_writereg(state, 0x51, regD5);
if (rc < 0)
return rc;
}

return 0;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/frontends/mb86a20s.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

struct mb86a20s_config {
u8 demod_address;
bool is_serial;
};

#if defined(CONFIG_DVB_MB86A20S) || (defined(CONFIG_DVB_MB86A20S_MODULE) \
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/cx231xx/cx231xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ static struct tda18271_config hcw_tda18271_config = {

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

static struct tda18271_config pv_tda18271_config = {
Expand Down

0 comments on commit 7572f9c

Please sign in to comment.