diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-23 05:32:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:06:47 -0400 |
commit | 33c0fcad2160bc211272295e862c6f708118d006 (patch) | |
tree | 1627d21d1042a1ede7fc9c8f55356ab314a6a63e /drivers/media/video/ivtv/ivtv-controls.c | |
parent | 612570f2c4794bbf4e5bfa8648b61fbfc9cd8501 (diff) |
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 @@ | |||
21 | #include "ivtv-driver.h" | 21 | #include "ivtv-driver.h" |
22 | #include "ivtv-cards.h" | 22 | #include "ivtv-cards.h" |
23 | #include "ivtv-ioctl.h" | 23 | #include "ivtv-ioctl.h" |
24 | #include "ivtv-audio.h" | 24 | #include "ivtv-routing.h" |
25 | #include "ivtv-i2c.h" | 25 | #include "ivtv-i2c.h" |
26 | #include "ivtv-mailbox.h" | 26 | #include "ivtv-mailbox.h" |
27 | #include "ivtv-controls.h" | 27 | #include "ivtv-controls.h" |
@@ -231,8 +231,10 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) | |||
231 | } | 231 | } |
232 | IVTV_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); | 232 | IVTV_DEBUG_IOCTL("VIDIOC_S_EXT_CTRLS\n"); |
233 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { | 233 | if (c->ctrl_class == V4L2_CTRL_CLASS_MPEG) { |
234 | static u32 freqs[3] = { 44100, 48000, 32000 }; | ||
234 | struct cx2341x_mpeg_params p = itv->params; | 235 | struct cx2341x_mpeg_params p = itv->params; |
235 | int err = cx2341x_ext_ctrls(&p, atomic_read(&itv->capturing), arg, cmd); | 236 | int err = cx2341x_ext_ctrls(&p, atomic_read(&itv->capturing), arg, cmd); |
237 | unsigned idx; | ||
236 | 238 | ||
237 | if (err) | 239 | if (err) |
238 | return err; | 240 | return err; |
@@ -254,7 +256,11 @@ int ivtv_control_ioctls(struct ivtv *itv, unsigned int cmd, void *arg) | |||
254 | } | 256 | } |
255 | itv->params = p; | 257 | itv->params = p; |
256 | itv->dualwatch_stereo_mode = p.audio_properties & 0x0300; | 258 | itv->dualwatch_stereo_mode = p.audio_properties & 0x0300; |
257 | ivtv_audio_set_audio_clock_freq(itv, p.audio_properties & 0x03); | 259 | idx = p.audio_properties & 0x03; |
260 | /* The audio clock of the digitizer must match the codec sample | ||
261 | rate otherwise you get some very strange effects. */ | ||
262 | if (idx < sizeof(freqs)) | ||
263 | ivtv_call_i2c_clients(itv, VIDIOC_INT_AUDIO_CLOCK_FREQ, &freqs[idx]); | ||
258 | return err; | 264 | return err; |
259 | } | 265 | } |
260 | return -EINVAL; | 266 | return -EINVAL; |