/* This function selects the correct audio input source */ static void set_stereo(struct pvr2_msp3400_handler *ctxt) { struct pvr2_hdw *hdw = ctxt->hdw; struct v4l2_routing route; pvr2_trace(PVR2_TRACE_CHIPS,"i2c msp3400 v4l2 set_stereo"); route.input = MSP_INPUT_DEFAULT; route.output = MSP_OUTPUT(MSP_SC_IN_DSP_SCART1); switch (hdw->input_val) { case PVR2_CVAL_INPUT_TV: break; case PVR2_CVAL_INPUT_RADIO: /* Assume that msp34xx also handle FM decoding, in which case we're still using the tuner. */ /* HV: actually it is more likely to be the SCART2 input if the ivtv experience is any indication. */ route.input = MSP_INPUT(MSP_IN_SCART2, MSP_IN_TUNER1, MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); break; case PVR2_CVAL_INPUT_SVIDEO: case PVR2_CVAL_INPUT_COMPOSITE: /* SCART 1 input */ route.input = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, MSP_DSP_IN_SCART, MSP_DSP_IN_SCART); break; } pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_S_AUDIO_ROUTING,&route); }
void tl880_msp_config(struct tl880_dev *tl880dev) { unsigned short msp_type[2]; struct v4l2_routing msp_routing; int standard; printk(KERN_DEBUG "tl880: Configuring the MSP chip\n"); #ifdef WILLNOTCOMPILE tl880_msp_set_std(tl880dev, /* gpJanus+16714 */ 2); #endif memset(&msp_routing, 0, sizeof(msp_routing)); // TODO: call only the MSP standard = V4L2_STD_NTSC_M; tl880_call_i2c_clients(tl880dev, VIDIOC_S_STD, (void *)&standard); tl880_call_i2c_clients(tl880dev, VIDIOC_INT_G_AUDIO_ROUTING, (void *)&msp_routing); printk(KERN_DEBUG "tl880: msp routing is %04x by %04x\n", msp_routing.input, msp_routing.output); msp_routing.input = MSP_INPUT(MSP_IN_MUTE, MSP_IN_TUNER1, MSP_DSP_IN_TUNER, MSP_DSP_IN_TUNER); msp_routing.output = MSP_OUTPUT(MSP_SC_IN_MUTE); printk(KERN_DEBUG "tl880: setting msp routing to %04x x %04x\n", msp_routing.input, msp_routing.output); tl880_call_i2c_clients(tl880dev, VIDIOC_INT_S_AUDIO_ROUTING, (void *)&msp_routing); tl880_msp_init(tl880dev, msp_type); }
.vchannels = 3, .norm = VIDEO_MODE_NTSC, .tuner_type = TUNER_PHILIPS_FM1236_MK3, .tda9887_conf = TDA9887_PRESENT|TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE, .has_tuner = 1, .decoder = EM28XX_TVP5150, .has_msp34xx = 1, /*FIXME: S-Video not tested */ .input = {{ .type = EM28XX_VMUX_TELEVISION, .vmux = 0, .amux = MSP_INPUT_DEFAULT, },{ .type = EM28XX_VMUX_SVIDEO, .vmux = 2, .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1, MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), }}, }, [EM2820_BOARD_MSI_VOX_USB_2] = { .name = "MSI VOX USB 2.0", .vchannels = 3, .norm = VIDEO_MODE_PAL, .tuner_type = TUNER_LG_PAL_NEW_TAPC, .tda9887_conf = TDA9887_PRESENT|TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE, .has_tuner = 1, .decoder = EM28XX_SAA7114, .input = {{ .type = EM28XX_VMUX_TELEVISION, .vmux = 4, .amux = 0, },{