diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-03 15:48:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:28 -0500 |
commit | 7572f9c5575c721f43b575a71fda1ecd896e0327 (patch) | |
tree | daf8a4b2dde8a319bb4bf44ef59685a2ffcfd6ab | |
parent | 55fa288deca4b17e539ba49a9b0d0ed474afa6f8 (diff) |
[media] mb86a20s: add support for serial streams
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>
-rw-r--r-- | drivers/media/dvb/frontends/mb86a20s.c | 18 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/mb86a20s.h | 1 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-dvb.c | 1 |
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/mb86a20s.c b/drivers/media/dvb/frontends/mb86a20s.c index 1e6bec6aa0f9..b4de8f12df27 100644 --- a/drivers/media/dvb/frontends/mb86a20s.c +++ b/drivers/media/dvb/frontends/mb86a20s.c | |||
@@ -43,10 +43,6 @@ struct mb86a20s_state { | |||
43 | const struct mb86a20s_config *config; | 43 | const struct mb86a20s_config *config; |
44 | 44 | ||
45 | struct dvb_frontend frontend; | 45 | struct dvb_frontend frontend; |
46 | |||
47 | |||
48 | |||
49 | |||
50 | }; | 46 | }; |
51 | 47 | ||
52 | struct regdata { | 48 | struct regdata { |
@@ -175,7 +171,7 @@ static struct regdata mb86a20s_init[] = { | |||
175 | { 0x45, 0x04 }, | 171 | { 0x45, 0x04 }, |
176 | { 0x48, 0x04 }, | 172 | { 0x48, 0x04 }, |
177 | { 0x50, 0xd5 }, | 173 | { 0x50, 0xd5 }, |
178 | { 0x51, 0x01 }, | 174 | { 0x51, 0x01 }, /* Serial */ |
179 | { 0x50, 0xd6 }, | 175 | { 0x50, 0xd6 }, |
180 | { 0x51, 0x1f }, | 176 | { 0x51, 0x1f }, |
181 | { 0x50, 0xd2 }, | 177 | { 0x50, 0xd2 }, |
@@ -376,6 +372,7 @@ static int mb86a20s_initfe(struct dvb_frontend *fe) | |||
376 | { | 372 | { |
377 | struct mb86a20s_state *state = fe->demodulator_priv; | 373 | struct mb86a20s_state *state = fe->demodulator_priv; |
378 | int rc; | 374 | int rc; |
375 | u8 regD5 = 1; | ||
379 | 376 | ||
380 | dprintk("\n"); | 377 | dprintk("\n"); |
381 | 378 | ||
@@ -384,6 +381,17 @@ static int mb86a20s_initfe(struct dvb_frontend *fe) | |||
384 | if (rc < 0) | 381 | if (rc < 0) |
385 | return rc; | 382 | return rc; |
386 | 383 | ||
384 | if (!state->config->is_serial) { | ||
385 | regD5 &= ~1; | ||
386 | |||
387 | rc = mb86a20s_writereg(state, 0x50, 0xd5); | ||
388 | if (rc < 0) | ||
389 | return rc; | ||
390 | rc = mb86a20s_writereg(state, 0x51, regD5); | ||
391 | if (rc < 0) | ||
392 | return rc; | ||
393 | } | ||
394 | |||
387 | return 0; | 395 | return 0; |
388 | } | 396 | } |
389 | 397 | ||
diff --git a/drivers/media/dvb/frontends/mb86a20s.h b/drivers/media/dvb/frontends/mb86a20s.h index e3461983a831..bf22e77888b9 100644 --- a/drivers/media/dvb/frontends/mb86a20s.h +++ b/drivers/media/dvb/frontends/mb86a20s.h | |||
@@ -26,6 +26,7 @@ | |||
26 | 26 | ||
27 | struct mb86a20s_config { | 27 | struct mb86a20s_config { |
28 | u8 demod_address; | 28 | u8 demod_address; |
29 | bool is_serial; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | #if defined(CONFIG_DVB_MB86A20S) || (defined(CONFIG_DVB_MB86A20S_MODULE) \ | 32 | #if defined(CONFIG_DVB_MB86A20S) || (defined(CONFIG_DVB_MB86A20S_MODULE) \ |
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index b55e7e0bc245..fe59a1c3f064 100644 --- a/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/drivers/media/video/cx231xx/cx231xx-dvb.c | |||
@@ -143,6 +143,7 @@ static struct tda18271_config hcw_tda18271_config = { | |||
143 | 143 | ||
144 | static const struct mb86a20s_config pv_mb86a20s_config = { | 144 | static const struct mb86a20s_config pv_mb86a20s_config = { |
145 | .demod_address = 0x10, | 145 | .demod_address = 0x10, |
146 | .is_serial = true, | ||
146 | }; | 147 | }; |
147 | 148 | ||
148 | static struct tda18271_config pv_tda18271_config = { | 149 | static struct tda18271_config pv_tda18271_config = { |