Commit 6f0d8c02 authored by David T.L. Wong's avatar David T.L. Wong Committed by Mauro Carvalho Chehab

V4L/DVB (13211): cx23885: card Mygica X8506 analog TV support

Signed-off-by: default avatarDavid T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 8e069bb9
...@@ -200,10 +200,15 @@ struct cx23885_board cx23885_boards[] = { ...@@ -200,10 +200,15 @@ struct cx23885_board cx23885_boards[] = {
}, },
[CX23885_BOARD_MYGICA_X8506] = { [CX23885_BOARD_MYGICA_X8506] = {
.name = "Mygica X8506 DMB-TH", .name = "Mygica X8506 DMB-TH",
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_XC5000,
.tuner_addr = 0x61,
.porta = CX23885_ANALOG_VIDEO, .porta = CX23885_ANALOG_VIDEO,
.portb = CX23885_MPEG_DVB, .portb = CX23885_MPEG_DVB,
.input = { .input = {
{
.type = CX23885_VMUX_TELEVISION,
.vmux = CX25840_COMPOSITE2,
},
{ {
.type = CX23885_VMUX_COMPOSITE1, .type = CX23885_VMUX_COMPOSITE1,
.vmux = CX25840_COMPOSITE8, .vmux = CX25840_COMPOSITE8,
...@@ -224,10 +229,15 @@ struct cx23885_board cx23885_boards[] = { ...@@ -224,10 +229,15 @@ struct cx23885_board cx23885_boards[] = {
}, },
[CX23885_BOARD_MAGICPRO_PROHDTVE2] = { [CX23885_BOARD_MAGICPRO_PROHDTVE2] = {
.name = "Magic-Pro ProHDTV Extreme 2", .name = "Magic-Pro ProHDTV Extreme 2",
.tuner_type = TUNER_ABSENT, .tuner_type = TUNER_XC5000,
.tuner_addr = 0x61,
.porta = CX23885_ANALOG_VIDEO, .porta = CX23885_ANALOG_VIDEO,
.portb = CX23885_MPEG_DVB, .portb = CX23885_MPEG_DVB,
.input = { .input = {
{
.type = CX23885_VMUX_TELEVISION,
.vmux = CX25840_COMPOSITE2,
},
{ {
.type = CX23885_VMUX_COMPOSITE1, .type = CX23885_VMUX_COMPOSITE1,
.vmux = CX25840_COMPOSITE8, .vmux = CX25840_COMPOSITE8,
......
...@@ -486,6 +486,11 @@ static int cx23885_dvb_set_frontend(struct dvb_frontend *fe, ...@@ -486,6 +486,11 @@ static int cx23885_dvb_set_frontend(struct dvb_frontend *fe,
break; break;
} }
break; break;
case CX23885_BOARD_MYGICA_X8506:
case CX23885_BOARD_MAGICPRO_PROHDTVE2:
/* Select Digital TV */
cx23885_gpio_set(dev, GPIO_0);
break;
} }
return 0; return 0;
} }
......
...@@ -402,6 +402,13 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input) ...@@ -402,6 +402,13 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
INPUT(input)->gpio2, INPUT(input)->gpio3); INPUT(input)->gpio2, INPUT(input)->gpio3);
dev->input = input; dev->input = input;
if (dev->board == CX23885_BOARD_MYGICA_X8506 ||
dev->board == CX23885_BOARD_MAGICPRO_PROHDTVE2) {
/* Select Analog TV */
if (INPUT(input)->type == CX23885_VMUX_TELEVISION)
cx23885_gpio_clear(dev, GPIO_0);
}
/* Tell the internal A/V decoder */ /* Tell the internal A/V decoder */
v4l2_subdev_call(dev->sd_cx25840, video, s_routing, v4l2_subdev_call(dev->sd_cx25840, video, s_routing,
INPUT(input)->vmux, 0, 0); INPUT(input)->vmux, 0, 0);
...@@ -1508,6 +1515,7 @@ int cx23885_video_register(struct cx23885_dev *dev) ...@@ -1508,6 +1515,7 @@ int cx23885_video_register(struct cx23885_dev *dev)
tun_setup.mode_mask = T_ANALOG_TV; tun_setup.mode_mask = T_ANALOG_TV;
tun_setup.type = dev->tuner_type; tun_setup.type = dev->tuner_type;
tun_setup.addr = v4l2_i2c_subdev_addr(sd); tun_setup.addr = v4l2_i2c_subdev_addr(sd);
tun_setup.tuner_callback = cx23885_tuner_callback;
v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup); v4l2_subdev_call(sd, tuner, s_type_addr, &tun_setup);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment