diff options
author | Andy Walls <awalls@radix.net> | 2009-02-16 02:23:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:43:01 -0300 |
commit | fa3e70360c86480acbaa54c9791e843196327a66 (patch) | |
tree | bc8d1f8b68f9aad107d63d6b6c9e884519fe1d34 /drivers/media/video/cx18/cx18-driver.c | |
parent | 5811cf99df2e3c102055be3ea77508e56c9f77c6 (diff) |
V4L/DVB (10757): cx18, v4l2-chip-ident: Finish conversion of AV decoder core to v4l2_subdev
Added a new chip identifer to v4l2-chip-ident for the integrated A/V broadcast
decoder core internal to the CX23418. Completed separation and encapsulation
of the A/V decoder core interface as a v4l2_subdevice. The cx18 driver now
compiles and links again.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index f69e688ab6f4..f5a41dd663dc 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c @@ -621,13 +621,6 @@ static void __devinit cx18_init_struct2(struct cx18 *cx) i = 0; cx->active_input = i; cx->audio_input = cx->card->video_inputs[i].audio_index; - cx->av_state.vid_input = CX18_AV_COMPOSITE7; - cx->av_state.aud_input = CX18_AV_AUDIO8; - cx->av_state.audclk_freq = 48000; - cx->av_state.audmode = V4L2_TUNER_MODE_LANG1; - cx->av_state.slicer_line_delay = 0; - cx->av_state.slicer_line_offset = - (10 + cx->av_state.slicer_line_delay - 2); } static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev, @@ -812,6 +805,14 @@ static int __devinit cx18_probe(struct pci_dev *pci_dev, cx18_gpio_init(cx); + retval = cx18_av_probe(cx, &cx->sd_av); + if (retval) { + CX18_ERR("Could not register A/V decoder subdevice\n"); + goto free_map; + } + /* Initialize the A/V decoder PLLs to sane defaults */ + v4l2_subdev_call(cx->sd_av, core, init, (u32) CX18_AV_INIT_PLLS); + /* active i2c */ CX18_DEBUG_INFO("activating i2c...\n"); retval = init_cx18_i2c(cx); @@ -1020,6 +1021,9 @@ int cx18_init_on_first_open(struct cx18 *cx) cx18_vapi(cx, CX18_APU_RESETAI, 0); cx18_vapi(cx, CX18_APU_STOP, 1, CX18_APU_ENCODING_METHOD_MPEG); + /* Init the A/V decoder, if it hasn't been already */ + v4l2_subdev_call(cx->sd_av, core, init, (u32) CX18_AV_INIT_NORMAL); + vf.tuner = 0; vf.type = V4L2_TUNER_ANALOG_TV; vf.frequency = 6400; /* the tuner 'baseline' frequency */ |