diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110_v4l.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/msp3400-kthreads.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/mxb.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-audio.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-tvaudio.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 1 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 1 |
13 files changed, 40 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c index 2f23ceab8..603a22e4b 100644 --- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c @@ -369,6 +369,11 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) fm_matrix = 0x3001; // stereo src = 0x0020; break; + case V4L2_TUNER_MODE_LANG1_LANG2: + dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1_LANG2\n"); + fm_matrix = 0x3000; // bilingual + src = 0x0020; + break; case V4L2_TUNER_MODE_LANG1: dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1\n"); fm_matrix = 0x3000; // mono diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 83458f993..5954bb858 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -1849,7 +1849,8 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); if (t->audmode == V4L2_TUNER_MODE_MONO) va.mode = VIDEO_SOUND_MONO; - else if (t->audmode == V4L2_TUNER_MODE_STEREO) + else if (t->audmode == V4L2_TUNER_MODE_STEREO || + t->audmode == V4L2_TUNER_MODE_LANG1_LANG2) va.mode = VIDEO_SOUND_STEREO; else if (t->audmode == V4L2_TUNER_MODE_LANG1) va.mode = VIDEO_SOUND_LANG1; diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index d7d19bdc3..c9068b6db 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -805,13 +805,14 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, bilingual -> lang1 */ cx25840_and_or(client, 0x809, ~0xf, 0x00); break; + case V4L2_TUNER_MODE_STEREO: case V4L2_TUNER_MODE_LANG1: /* mono -> mono stereo -> stereo bilingual -> lang1 */ cx25840_and_or(client, 0x809, ~0xf, 0x04); break; - case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: /* mono -> mono stereo -> stereo bilingual -> lang1/lang2 */ @@ -819,7 +820,7 @@ static int cx25840_command(struct i2c_client *client, unsigned int cmd, break; case V4L2_TUNER_MODE_LANG2: /* mono -> mono - stereo ->stereo + stereo -> stereo bilingual -> lang2 */ cx25840_and_or(client, 0x809, ~0xf, 0x01); break; diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index b51d1ea10..8bd458f61 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -889,6 +889,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) set_audio_standard_BTSC(core, 1, EN_BTSC_FORCE_SAP); break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: set_audio_standard_BTSC(core, 0, EN_BTSC_FORCE_STEREO); break; } @@ -909,6 +910,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) EN_NICAM_FORCE_MONO2); break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: set_audio_standard_NICAM(core, EN_NICAM_FORCE_STEREO); break; @@ -930,6 +932,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) EN_A2_FORCE_MONO2); break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: set_audio_standard_A2(core, EN_A2_FORCE_STEREO); break; diff --git a/linux/drivers/media/video/msp3400-kthreads.c b/linux/drivers/media/video/msp3400-kthreads.c index dd8dc256d..da1ffba47 100644 --- a/linux/drivers/media/video/msp3400-kthreads.c +++ b/linux/drivers/media/video/msp3400-kthreads.c @@ -225,9 +225,9 @@ void msp3400c_set_mode(struct i2c_client *client, int mode) nor do they support stereo BTSC. */ static void msp3400c_set_audmode(struct i2c_client *client) { - static char *strmode[] = { "mono", "stereo", "lang2", "lang1" }; + static char *strmode[] = { "mono", "stereo", "lang2", "lang1", "lang1+lang2" }; struct msp_state *state = i2c_get_clientdata(client); - char *modestr = (state->audmode >= 0 && state->audmode < 4) ? + char *modestr = (state->audmode >= 0 && state->audmode < 5) ? strmode[state->audmode] : "unknown"; int src = 0; /* channel source: FM/AM, nicam or SCART */ @@ -252,6 +252,7 @@ static void msp3400c_set_audmode(struct i2c_client *client) case V4L2_TUNER_MODE_MONO: case V4L2_TUNER_MODE_LANG1: case V4L2_TUNER_MODE_LANG2: + case V4L2_TUNER_MODE_LANG1_LANG2: msp_write_dsp(client, 0x000e, 0x3000); break; } @@ -263,6 +264,7 @@ static void msp3400c_set_audmode(struct i2c_client *client) msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: msp3400c_set_carrier(client, MSP_CARRIER(7.2), MSP_CARRIER(7.02)); break; case V4L2_TUNER_MODE_LANG1: @@ -299,6 +301,7 @@ static void msp3400c_set_audmode(struct i2c_client *client) /* switch audio */ switch (state->audmode) { case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: src |= 0x0020; break; case V4L2_TUNER_MODE_MONO: @@ -999,6 +1002,7 @@ static void msp34xxg_set_audmode(struct i2c_client *client) source = 0; /* mono only */ break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: source = 1; /* stereo or A|B, see comment in msp34xxg_get_v4l2_stereo() */ /* problem: that could also mean 2 (scart input) */ break; diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index ac1c22ef7..615cc0a1d 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -792,6 +792,12 @@ static int mxb_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_STEREO\n")); break; } + case V4L2_TUNER_MODE_LANG1_LANG2: { + mxb->cur_mode = V4L2_TUNER_MODE_LANG1_LANG2; + byte = TDA9840_SET_BOTH; + DEB_D(("VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1_LANG2\n")); + break; + } case V4L2_TUNER_MODE_LANG1: { mxb->cur_mode = V4L2_TUNER_MODE_LANG1; byte = TDA9840_SET_LANG1; 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; diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index ccf3ea2b3..c750866b9 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -506,12 +506,14 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au [ V4L2_TUNER_MODE_STEREO ] = "stereo", [ V4L2_TUNER_MODE_LANG1 ] = "lang1", [ V4L2_TUNER_MODE_LANG2 ] = "lang2", + [ V4L2_TUNER_MODE_LANG1_LANG2 ] = "lang1+lang2", }; static u32 fm[] = { [ V4L2_TUNER_MODE_MONO ] = 0x00, /* ch1 */ [ V4L2_TUNER_MODE_STEREO ] = 0x80, /* auto */ [ V4L2_TUNER_MODE_LANG1 ] = 0x00, /* ch1 */ [ V4L2_TUNER_MODE_LANG2 ] = 0x01, /* ch2 */ + [ V4L2_TUNER_MODE_LANG1_LANG2 ] = 0x80, /* auto */ }; u32 reg; diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index d204e1348..d2397d784 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -1721,6 +1721,7 @@ static int chip_command(struct i2c_client *client, mode = VIDEO_SOUND_MONO; break; case V4L2_TUNER_MODE_STEREO: + case V4L2_TUNER_MODE_LANG1_LANG2: mode = VIDEO_SOUND_STEREO; break; case V4L2_TUNER_MODE_LANG1: diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 2995bf836..bd2e07390 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -915,6 +915,7 @@ struct v4l2_modulator #define V4L2_TUNER_MODE_LANG2 0x0002 #define V4L2_TUNER_MODE_SAP 0x0002 #define V4L2_TUNER_MODE_LANG1 0x0003 +#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 struct v4l2_frequency { |