diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-18 21:15:00 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2006-03-18 21:15:00 +0100 |
commit | 22b9fe2c0f517b6adfe0c517f61d8c3605973cbc (patch) | |
tree | 3f0617cfd96849da851b4c8b9c87347e001b735b /linux/drivers/media/video/pvrusb2 | |
parent | 2d0abb67a8d568f7bfd5ae1814cf1f34757237da (diff) | |
download | mediapointer-dvb-s2-22b9fe2c0f517b6adfe0c517f61d8c3605973cbc.tar.gz mediapointer-dvb-s2-22b9fe2c0f517b6adfe0c517f61d8c3605973cbc.tar.bz2 |
Implement V4L2_TUNER_MODE_LANG1_LANG2 audio mode
From: Hans Verkuil <hverkuil@xs4all.nl>
Add a new audio mode V4L2_TUNER_MODE_LANG1_LANG2 (used by VIDIOC_G/S_TUNER).
This mode allows the user to select both languages of a bilingual transmission,
one language on the left, one on the right audio channel. If there is no
bilingual transmission, or it is not supported, then this mode should act like
V4L2_TUNER_MODE_STEREO.
This mode is introduced for PVR-like drivers where it is useful to be able to
record both languages of a bilingual broadcast.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2')
4 files changed, 11 insertions, 1 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c index 7e2fab330..ac798f4e0 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c @@ -66,6 +66,8 @@ static int xlat_audiomode_to_v4l2(int id) return V4L2_TUNER_MODE_LANG1; case PVR2_CVAL_AUDIOMODE_LANG2: return V4L2_TUNER_MODE_LANG2; + case PVR2_CVAL_AUDIOMODE_LANG1_LANG2: + return V4L2_TUNER_MODE_LANG1_LANG2; } return V4L2_TUNER_MODE_STEREO; } diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index b87651e5a..539456b44 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -158,6 +158,7 @@ static const char *control_values_audiomode[] = { [PVR2_CVAL_AUDIOMODE_SAP] = "SAP", [PVR2_CVAL_AUDIOMODE_LANG1] = "Lang1", [PVR2_CVAL_AUDIOMODE_LANG2] = "Lang2", + [PVR2_CVAL_AUDIOMODE_LANG1_LANG2] = "Lang1+Lang2", }; diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h index 667c95a27..085afe566 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h @@ -119,8 +119,9 @@ #define PVR2_CVAL_AUDIOMODE_SAP 2 #define PVR2_CVAL_AUDIOMODE_LANG1 3 #define PVR2_CVAL_AUDIOMODE_LANG2 4 +#define PVR2_CVAL_AUDIOMODE_LANG1_LANG2 5 #define PVR2_CVAL_AUDIOMODE_MIN PVR2_CVAL_AUDIOMODE_MONO -#define PVR2_CVAL_AUDIOMODE_MAX PVR2_CVAL_AUDIOMODE_LANG2 +#define PVR2_CVAL_AUDIOMODE_MAX PVR2_CVAL_AUDIOMODE_LANG1_LANG2 /* Values that pvr2_hdw_get_signal_status() returns */ #define PVR2_SIGNAL_OK 0x0001 diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 017d30ad0..e208c4862 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -593,6 +593,9 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, case PVR2_CVAL_AUDIOMODE_LANG2: vt->audmode = V4L2_TUNER_MODE_LANG2; break; + case PVR2_CVAL_AUDIOMODE_LANG1_LANG2: + vt->audmode = V4L2_TUNER_MODE_LANG1_LANG2; + break; case PVR2_CVAL_AUDIOMODE_SAP: vt->audmode = V4L2_TUNER_MODE_SAP; break; @@ -620,6 +623,9 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, case V4L2_TUNER_MODE_LANG1: val = PVR2_CVAL_AUDIOMODE_LANG1; break; + case V4L2_TUNER_MODE_LANG1_LANG2: + val = PVR2_CVAL_AUDIOMODE_LANG1_LANG2; + break; case V4L2_TUNER_MODE_SAP: // Also LANG2 val = PVR2_CVAL_AUDIOMODE_SAP; break; |