From d47ee226646d66e244c30d48ea1486919d00755f Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Thu, 1 Jan 2009 17:02:31 -0500 Subject: cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18 From: Andy Walls Initial addition of controls to set AC-3 audio encoding for the CX23418 - it does not work yet due to firmware or cx18 driver issues. This change affects the common cx2341x and ivtv modules due to shared structures and common functions. Priority: normal Signed-off-by: Andy Walls --- linux/include/media/cx2341x.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h index 9ec4d5889..2601bc71c 100644 --- a/linux/include/media/cx2341x.h +++ b/linux/include/media/cx2341x.h @@ -1,5 +1,5 @@ /* - cx23415/6 header containing common defines. + cx23415/6/8 header containing common defines. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,6 +28,8 @@ enum cx2341x_port { enum cx2341x_cap { CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, CX2341X_CAP_HAS_TS = 1 << 1, + CX2341X_CAP_HAS_AC3 = 1 << 2, + CX2341X_CAP_HAS_LPCM = 1 << 3, }; struct cx2341x_mpeg_params { @@ -47,11 +49,12 @@ struct cx2341x_mpeg_params { enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; enum v4l2_mpeg_audio_encoding audio_encoding; enum v4l2_mpeg_audio_l2_bitrate audio_l2_bitrate; + enum v4l2_mpeg_audio_ac3_bitrate audio_ac3_bitrate; enum v4l2_mpeg_audio_mode audio_mode; enum v4l2_mpeg_audio_mode_extension audio_mode_extension; enum v4l2_mpeg_audio_emphasis audio_emphasis; enum v4l2_mpeg_audio_crc audio_crc; - u16 audio_properties; + u32 audio_properties; u16 audio_mute; /* video */ -- cgit v1.2.3 From bb03fecf7666d134e900e644a19a8a7b6ca0ccde Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 3 Jan 2009 12:21:30 -0500 Subject: cx18, cx2341x: Fix bugs in cx18 AC3 control and comply with V4L2 spec From: Andy Walls Fix bugs in the cx18 AC3 control implementation that would have affected ivtv and other drivers via the cx2341x module. Bring AC3 controls behavior into comliance with V4L2 specification. Thanks to Hans Verkuil for reviewing the previous patch and pointing out the problems. Reported-by: Hans Verkuil Priority: normal Signed-off-by: Andy Walls --- linux/include/media/cx2341x.h | 1 - 1 file changed, 1 deletion(-) (limited to 'linux/include/media') diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h index 2601bc71c..9ebe8558b 100644 --- a/linux/include/media/cx2341x.h +++ b/linux/include/media/cx2341x.h @@ -29,7 +29,6 @@ enum cx2341x_cap { CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, CX2341X_CAP_HAS_TS = 1 << 1, CX2341X_CAP_HAS_AC3 = 1 << 2, - CX2341X_CAP_HAS_LPCM = 1 << 3, }; struct cx2341x_mpeg_params { -- cgit v1.2.3 From a0756735c380eaa2d3f6e26366044f89575610d0 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 18 Jan 2009 23:59:11 +0100 Subject: saa7146: convert to video_ioctl2. From: Hans Verkuil The conversion to video_ioctl2 is the first phase to converting this driver to the latest v4l2 framework. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/saa7146_vv.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'linux/include/media') diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h index c8d0b23fd..eed5fccc8 100644 --- a/linux/include/media/saa7146_vv.h +++ b/linux/include/media/saa7146_vv.h @@ -150,16 +150,6 @@ struct saa7146_vv unsigned int resources; /* resource management for device */ }; -#define SAA7146_EXCLUSIVE 0x1 -#define SAA7146_BEFORE 0x2 -#define SAA7146_AFTER 0x4 - -struct saa7146_extension_ioctls -{ - unsigned int cmd; - int flags; -}; - /* flags */ #define SAA7146_USE_PORT_B_FOR_VBI 0x2 /* use input port b for vbi hardware bug workaround */ @@ -176,8 +166,10 @@ struct saa7146_ext_vv int num_stds; int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *); - struct saa7146_extension_ioctls *ioctls; - long (*ioctl)(struct saa7146_fh *, unsigned int cmd, void *arg); + /* the extension can override this */ + struct v4l2_ioctl_ops ops; + /* pointer to the saa7146 core ops */ + const struct v4l2_ioctl_ops *core_ops; struct v4l2_file_operations vbi_fops; }; @@ -213,6 +205,7 @@ void saa7146_set_hps_source_and_sync(struct saa7146_dev *saa, int source, int sy void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data); /* from saa7146_video.c */ +extern const struct v4l2_ioctl_ops saa7146_video_ioctl_ops; extern struct saa7146_use_ops saa7146_video_uops; int saa7146_start_preview(struct saa7146_fh *fh); int saa7146_stop_preview(struct saa7146_fh *fh); -- cgit v1.2.3