summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorHans Verkuil <devnull@localhost>2005-12-22 13:49:45 +0000
committerHans Verkuil <devnull@localhost>2005-12-22 13:49:45 +0000
commit3b7e6d1df0ee0051df0c9c70c9a90e3b9b75433f (patch)
treefb16a9ff957b7a88c2b59fd135bce193252bd864 /linux/include
parent80815883388b791e62cf4ff2fb3a4b22680a5ea2 (diff)
downloadmediapointer-dvb-s2-3b7e6d1df0ee0051df0c9c70c9a90e3b9b75433f.tar.gz
mediapointer-dvb-s2-3b7e6d1df0ee0051df0c9c70c9a90e3b9b75433f.tar.bz2
Calculate the saa7115 AMCLK regs instead of using fixed values
- Calculate the audio master clock registers from the actual frequencies. This simplifies the code and it also prepares for adding CGC2 support. - VIDIOC_INT_AUDIO_CLOCK_FREQ now receives an u32 instead of an enum. It is more generic and actually easier to implement. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/v4l2-common.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h
index d3fd48157..9b77a27b9 100644
--- a/linux/include/media/v4l2-common.h
+++ b/linux/include/media/v4l2-common.h
@@ -26,13 +26,6 @@
#ifndef V4L2_COMMON_H_
#define V4L2_COMMON_H_
-/* VIDIOC_INT_AUDIO_CLOCK_FREQ */
-enum v4l2_audio_clock_freq {
- V4L2_AUDCLK_32_KHZ = 32000,
- V4L2_AUDCLK_441_KHZ = 44100,
- V4L2_AUDCLK_48_KHZ = 48000,
-};
-
/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */
struct v4l2_register {
u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */
@@ -77,10 +70,12 @@ enum v4l2_chip_ident {
/* Reset the I2C chip */
#define VIDIOC_INT_RESET _IO ('d', 102)
-/* Set the frequency of the audio clock output.
+/* Set the frequency (in Hz) of the audio clock output.
Used to slave an audio processor to the video decoder, ensuring that audio
- and video remain synchronized. */
-#define VIDIOC_INT_AUDIO_CLOCK_FREQ _IOR ('d', 103, enum v4l2_audio_clock_freq)
+ and video remain synchronized.
+ Usual values for the frequency are 48000, 44100 or 32000 Hz.
+ If the frequency is not supported, then -EINVAL is returned. */
+#define VIDIOC_INT_AUDIO_CLOCK_FREQ _IOW ('d', 103, u32)
/* Video decoders that support sliced VBI need to implement this ioctl.
Field p of the v4l2_sliced_vbi_line struct is set to the start of the VBI