Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

+15 -5
+13 -5
drivers/media/dvb/frontends/mb86a20s.c
··· 43 43 const struct mb86a20s_config *config; 44 44 45 45 struct dvb_frontend frontend; 46 - 47 - 48 - 49 - 50 46 }; 51 47 52 48 struct regdata { ··· 171 175 { 0x45, 0x04 }, 172 176 { 0x48, 0x04 }, 173 177 { 0x50, 0xd5 }, 174 - { 0x51, 0x01 }, 178 + { 0x51, 0x01 }, /* Serial */ 175 179 { 0x50, 0xd6 }, 176 180 { 0x51, 0x1f }, 177 181 { 0x50, 0xd2 }, ··· 372 376 { 373 377 struct mb86a20s_state *state = fe->demodulator_priv; 374 378 int rc; 379 + u8 regD5 = 1; 375 380 376 381 dprintk("\n"); 377 382 ··· 380 383 rc = mb86a20s_writeregdata(state, mb86a20s_init); 381 384 if (rc < 0) 382 385 return rc; 386 + 387 + if (!state->config->is_serial) { 388 + regD5 &= ~1; 389 + 390 + rc = mb86a20s_writereg(state, 0x50, 0xd5); 391 + if (rc < 0) 392 + return rc; 393 + rc = mb86a20s_writereg(state, 0x51, regD5); 394 + if (rc < 0) 395 + return rc; 396 + } 383 397 384 398 return 0; 385 399 }
+1
drivers/media/dvb/frontends/mb86a20s.h
··· 26 26 27 27 struct mb86a20s_config { 28 28 u8 demod_address; 29 + bool is_serial; 29 30 }; 30 31 31 32 #if defined(CONFIG_DVB_MB86A20S) || (defined(CONFIG_DVB_MB86A20S_MODULE) \
+1
drivers/media/video/cx231xx/cx231xx-dvb.c
··· 143 143 144 144 static const struct mb86a20s_config pv_mb86a20s_config = { 145 145 .demod_address = 0x10, 146 + .is_serial = true, 146 147 }; 147 148 148 149 static struct tda18271_config pv_tda18271_config = {