diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-23 13:32:46 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-10 05:06:47 +0400 |
commit | 33c0fcad2160bc211272295e862c6f708118d006 (patch) | |
tree | 1627d21d1042a1ede7fc9c8f55356ab314a6a63e /drivers/media/video/ivtv/ivtv-controls.c | |
parent | 612570f2c4794bbf4e5bfa8648b61fbfc9cd8501 (diff) | |
download | linux-33c0fcad2160bc211272295e862c6f708118d006.tar.xz |
V4L/DVB (6092): ivtv: more cleanups, merged ivtv-audio.c and ivtv-video.c into ivtv-routing.c
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-controls.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-controls.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-controls.c b/drivers/media/video/ivtv/ivtv-controls.c index 0005ea46f208..8c02fa661591 100644 --- a/drivers/media/video/ivtv/ivtv-controls.c +++ b/drivers/media/video/ivtv/ivtv-controls.c @@ -21,7 +21,7 @@ #include "ivtv-driver.h" #include "ivtv-cards.h" #include "ivtv-ioctl.h" -#include "ivtv-audio.h" +#include "ivtv-routing.h" #include "ivtv-i2c.h" #include "ivtv-mailbox.h" #include "ivtv-controls.h" @@ -231,8 +231,10 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) } IVTV_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { + static u32 freqs[3] = { 44100, 48000, 32000 }; struct cx2341x_mpeg_params p = itv->params; int err = cx2341x_ext_ctrls(&p, atomic_read(&itv->capturing), arg, cmd); + unsigned idx; if (err) return err; @@ -254,7 +256,11 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) } itv->params = p; itv->dualwatch_stereo_mode = p.audio_properties & 0x0300; - ivtv_audio_set_audio_clock_freq(itv, p.audio_properties & 0x03); + idx = p.audio_properties & 0x03; + /* The audio clock of the digitizer must match the codec sample + rate otherwise you get some very strange effects. */ + if (idx < sizeof(freqs)) + ivtv_call_i2c_clients(itv, VIDIOC_INT_AUDIO_CLOCK_FREQ, &freqs[idx]); return err; } return -EINVAL; |