Skip to content

Commit

Permalink
V4L/DVB (8030): TDA10023: make TS output mode configurable
Browse files Browse the repository at this point in the history
- make TS output mode configurable

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Jul 20, 2008
1 parent 584ce48 commit e758886
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/dvb/frontends/tda10023.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ static int tda10023_init (struct dvb_frontend *fe)
/* 084 */ 0x02, 0xff, 0x93, /* AGCCONF1 IFS=1 KAGCIF=2 KAGCTUN=3 */
/* 087 */ 0x2d, 0xff, 0xf6, /* SWEEP SWPOS=1 SWDYN=7 SWSTEP=1 SWLEN=2 */
/* 090 */ 0x04, 0x10, 0x00, /* SWRAMP=1 */
/* 093 */ 0x12, 0xff, 0xa1, /* INTP1 POCLKP=1 FEL=1 MFS=0 */
/* 093 */ 0x12, 0xff, TDA10023_OUTPUT_MODE_PARALLEL_B, /*
INTP1 POCLKP=1 FEL=1 MFS=0 */
/* 096 */ 0x2b, 0x01, 0xa1, /* INTS1 */
/* 099 */ 0x20, 0xff, 0x04, /* INTP2 SWAPP=? MSBFIRSTP=? INTPSEL=? */
/* 102 */ 0x2c, 0xff, 0x0d, /* INTP/S TRIP=0 TRIS=0 */
Expand All @@ -289,6 +290,9 @@ static int tda10023_init (struct dvb_frontend *fe)
tda10023_inittab[83] = (state->config->deltaf >> 8);
}

if (state->config->output_mode)
tda10023_inittab[95] = state->config->output_mode;

tda10023_writetab(state, tda10023_inittab);

return 0;
Expand Down
10 changes: 10 additions & 0 deletions drivers/media/dvb/frontends/tda1002x.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ struct tda1002x_config {
u8 invert;
};

enum tda10023_output_mode {
TDA10023_OUTPUT_MODE_PARALLEL_A = 0xe0,
TDA10023_OUTPUT_MODE_PARALLEL_B = 0xa1,
TDA10023_OUTPUT_MODE_PARALLEL_C = 0xa0,
TDA10023_OUTPUT_MODE_SERIAL, /* TODO: not implemented */
};

struct tda10023_config {
/* the demodulator's i2c address */
u8 demod_address;
Expand All @@ -43,6 +50,9 @@ struct tda10023_config {
u8 pll_p; /* defaults: 4 */
u8 pll_n; /* defaults: 1 */

/* MPEG2 TS output mode */
u8 output_mode;

/* input freq offset + baseband conversion type */
u16 deltaf;
};
Expand Down

0 comments on commit e758886

Please sign in to comment.