forked from luck/tmp_suning_uos_patched
V4L/DVB (6831): Audio routes fix for blackbird boards with the wm8775 ADC
Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds. The wm8775 module initializes the audio input at "route 2", which doesn't hold true for all boards. The HVR-1300, for example, uses route 1 for tuner audio, and route 2 for baseband. So we must route the audio to the proper input depending on what video input is being used. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
4423a9a339
commit
7b27d45bb5
@ -302,22 +302,22 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_TELEVISION,
|
.type = CX88_VMUX_TELEVISION,
|
||||||
.vmux = 0,
|
.vmux = 0,
|
||||||
.gpio0 = 0x0000bde2,
|
.gpio0 = 0x0000bde2,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_COMPOSITE1,
|
.type = CX88_VMUX_COMPOSITE1,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
.gpio0 = 0x0000bde6,
|
.gpio0 = 0x0000bde6,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0x0000bde6,
|
.gpio0 = 0x0000bde6,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.radio = {
|
.radio = {
|
||||||
.type = CX88_RADIO,
|
.type = CX88_RADIO,
|
||||||
.gpio0 = 0x0000bd62,
|
.gpio0 = 0x0000bd62,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},
|
},
|
||||||
.mpeg = CX88_MPEG_BLACKBIRD,
|
.mpeg = CX88_MPEG_BLACKBIRD,
|
||||||
},
|
},
|
||||||
@ -378,7 +378,7 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
|
.gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.radio = {
|
.radio = {
|
||||||
.type = CX88_RADIO,
|
.type = CX88_RADIO,
|
||||||
@ -549,7 +549,7 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.input = {{
|
.input = {{
|
||||||
.type = CX88_VMUX_TELEVISION,
|
.type = CX88_VMUX_TELEVISION,
|
||||||
.vmux = 0,
|
.vmux = 0,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.mpeg = CX88_MPEG_BLACKBIRD,
|
.mpeg = CX88_MPEG_BLACKBIRD,
|
||||||
},
|
},
|
||||||
@ -672,22 +672,22 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_TELEVISION,
|
.type = CX88_VMUX_TELEVISION,
|
||||||
.vmux = 0,
|
.vmux = 0,
|
||||||
.gpio0 = 0x00009d80,
|
.gpio0 = 0x00009d80,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_COMPOSITE1,
|
.type = CX88_VMUX_COMPOSITE1,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
.gpio0 = 0x00009d76,
|
.gpio0 = 0x00009d76,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0x00009d76,
|
.gpio0 = 0x00009d76,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.radio = {
|
.radio = {
|
||||||
.type = CX88_RADIO,
|
.type = CX88_RADIO,
|
||||||
.gpio0 = 0x00009d00,
|
.gpio0 = 0x00009d00,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},
|
},
|
||||||
.mpeg = CX88_MPEG_BLACKBIRD,
|
.mpeg = CX88_MPEG_BLACKBIRD,
|
||||||
},
|
},
|
||||||
@ -826,23 +826,23 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_COMPOSITE1,
|
.type = CX88_VMUX_COMPOSITE1,
|
||||||
.vmux = 0,
|
.vmux = 0,
|
||||||
.gpio0 = 0x0000cd73,
|
.gpio0 = 0x0000cd73,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
.gpio0 = 0x0000cd73,
|
.gpio0 = 0x0000cd73,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_TELEVISION,
|
.type = CX88_VMUX_TELEVISION,
|
||||||
.vmux = 3,
|
.vmux = 3,
|
||||||
.gpio0 = 0x0000cdb3,
|
.gpio0 = 0x0000cdb3,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.radio = {
|
.radio = {
|
||||||
.type = CX88_RADIO,
|
.type = CX88_RADIO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0x0000cdf3,
|
.gpio0 = 0x0000cdf3,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},
|
},
|
||||||
.mpeg = CX88_MPEG_BLACKBIRD,
|
.mpeg = CX88_MPEG_BLACKBIRD,
|
||||||
},
|
},
|
||||||
@ -1110,12 +1110,12 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_COMPOSITE1,
|
.type = CX88_VMUX_COMPOSITE1,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
.gpio0 = 0x3de6,
|
.gpio0 = 0x3de6,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0x3de6,
|
.gpio0 = 0x3de6,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
}},
|
}},
|
||||||
.radio = {
|
.radio = {
|
||||||
.type = CX88_RADIO,
|
.type = CX88_RADIO,
|
||||||
@ -1340,17 +1340,17 @@ static const struct cx88_board cx88_boards[] = {
|
|||||||
.type = CX88_VMUX_TELEVISION,
|
.type = CX88_VMUX_TELEVISION,
|
||||||
.vmux = 0,
|
.vmux = 0,
|
||||||
.gpio0 = 0xe780,
|
.gpio0 = 0xe780,
|
||||||
.extadc = 1,
|
.audioroute = 1,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_COMPOSITE1,
|
.type = CX88_VMUX_COMPOSITE1,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
.gpio0 = 0xe780,
|
.gpio0 = 0xe780,
|
||||||
.extadc = 1,
|
.audioroute = 2,
|
||||||
},{
|
},{
|
||||||
.type = CX88_VMUX_SVIDEO,
|
.type = CX88_VMUX_SVIDEO,
|
||||||
.vmux = 2,
|
.vmux = 2,
|
||||||
.gpio0 = 0xe780,
|
.gpio0 = 0xe780,
|
||||||
.extadc = 1,
|
.audioroute = 2,
|
||||||
}},
|
}},
|
||||||
/* fixme: Add radio support */
|
/* fixme: Add radio support */
|
||||||
.mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
|
.mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
|
||||||
|
@ -394,9 +394,21 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
|
|||||||
|
|
||||||
if (core->board.mpeg & CX88_MPEG_BLACKBIRD) {
|
if (core->board.mpeg & CX88_MPEG_BLACKBIRD) {
|
||||||
/* sets sound input from external adc */
|
/* sets sound input from external adc */
|
||||||
if (INPUT(input).extadc)
|
if (INPUT(input).audioroute) {
|
||||||
|
/* The wm8775 module has the "2" route hardwired into
|
||||||
|
the initialization. Some boards may use different
|
||||||
|
routes for different inputs. HVR-1300 surely does */
|
||||||
|
if (core->board.audio_chip &&
|
||||||
|
core->board.audio_chip == AUDIO_CHIP_WM8775) {
|
||||||
|
struct v4l2_routing route;
|
||||||
|
|
||||||
|
route.input = INPUT(input).audioroute;
|
||||||
|
cx88_call_i2c_clients(core,
|
||||||
|
VIDIOC_INT_S_AUDIO_ROUTING,&route);
|
||||||
|
}
|
||||||
|
|
||||||
cx_set(AUD_CTL, EN_I2SIN_ENABLE);
|
cx_set(AUD_CTL, EN_I2SIN_ENABLE);
|
||||||
else
|
} else
|
||||||
cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
|
cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -228,7 +228,7 @@ struct cx88_input {
|
|||||||
enum cx88_itype type;
|
enum cx88_itype type;
|
||||||
u32 gpio0, gpio1, gpio2, gpio3;
|
u32 gpio0, gpio1, gpio2, gpio3;
|
||||||
unsigned int vmux:2;
|
unsigned int vmux:2;
|
||||||
unsigned int extadc:1;
|
unsigned int audioroute;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cx88_board {
|
struct cx88_board {
|
||||||
|
Loading…
Reference in New Issue
Block a user