aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/msp3400-kthreads.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-03-18 15:15:00 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-24 14:26:58 -0500
commit301e22d69140898eddd38a9134da711cb5dfc170 (patch)
tree27a7d8df45f703a30cc983829e427d803a297d86 /drivers/media/video/msp3400-kthreads.c
parent2474ed444b475614ef795523076be7cc8437ae00 (diff)
V4L/DVB (3584): Implement V4L2_TUNER_MODE_LANG1_LANG2 audio mode
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/msp3400-kthreads.c')
-rw-r--r--drivers/media/video/msp3400-kthreads.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c
index 1c794c3b9f21..c3984ea9ca07 100644
--- a/drivers/media/video/msp3400-kthreads.c
+++ b/drivers/media/video/msp3400-kthreads.c
@@ -223,9 +223,9 @@ void msp3400c_set_mode(struct i2c_client *client, int mode)
223 nor do they support stereo BTSC. */ 223 nor do they support stereo BTSC. */
224static void msp3400c_set_audmode(struct i2c_client *client) 224static void msp3400c_set_audmode(struct i2c_client *client)
225{ 225{
226 static char *strmode[] = { "mono", "stereo", "lang2", "lang1" }; 226 static char *strmode[] = { "mono", "stereo", "lang2", "lang1", "lang1+lang2" };
227 struct msp_state *state = i2c_get_clientdata(client); 227 struct msp_state *state = i2c_get_clientdata(client);
228 char *modestr = (state->audmode >= 0 && state->audmode < 4) ? 228 char *modestr = (state->audmode >= 0 && state->audmode < 5) ?
229 strmode[state->audmode] : "unknown"; 229 strmode[state->audmode] : "unknown";
230 int src = 0; /* channel source: FM/AM, nicam or SCART */ 230 int src = 0; /* channel source: FM/AM, nicam or SCART */
231 231
@@ -250,6 +250,7 @@ static void msp3400c_set_audmode(struct i2c_client *client)
250 case V4L2_TUNER_MODE_MONO: 250 case V4L2_TUNER_MODE_MONO:
251 case V4L2_TUNER_MODE_LANG1: 251 case V4L2_TUNER_MODE_LANG1:
252 case V4L2_TUNER_MODE_LANG2: 252 case V4L2_TUNER_MODE_LANG2:
253 case V4L2_TUNER_MODE_LANG1_LANG2:
253 msp_write_dsp(client, 0x000e, 0x3000); 254 msp_write_dsp(client, 0x000e, 0x3000);
254 break; 255 break;
255 } 256 }
@@ -261,6 +262,7 @@ static void msp3400c_set_audmode(struct i2c_client *client)
261 msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5)); 262 msp3400c_set_carrier(client, MSP_CARRIER(6.5), MSP_CARRIER(6.5));
262 break; 263 break;
263 case V4L2_TUNER_MODE_STEREO: 264 case V4L2_TUNER_MODE_STEREO:
265 case V4L2_TUNER_MODE_LANG1_LANG2:
264 msp3400c_set_carrier(client, MSP_CARRIER(7.2), MSP_CARRIER(7.02)); 266 msp3400c_set_carrier(client, MSP_CARRIER(7.2), MSP_CARRIER(7.02));
265 break; 267 break;
266 case V4L2_TUNER_MODE_LANG1: 268 case V4L2_TUNER_MODE_LANG1:
@@ -296,6 +298,7 @@ static void msp3400c_set_audmode(struct i2c_client *client)
296 /* switch audio */ 298 /* switch audio */
297 switch (state->audmode) { 299 switch (state->audmode) {
298 case V4L2_TUNER_MODE_STEREO: 300 case V4L2_TUNER_MODE_STEREO:
301 case V4L2_TUNER_MODE_LANG1_LANG2:
299 src |= 0x0020; 302 src |= 0x0020;
300 break; 303 break;
301 case V4L2_TUNER_MODE_MONO: 304 case V4L2_TUNER_MODE_MONO:
@@ -835,6 +838,7 @@ static void msp34xxg_set_source(struct i2c_client *client, u16 reg, int in)
835 matrix = 0x10; 838 matrix = 0x10;
836 break; 839 break;
837 case V4L2_TUNER_MODE_STEREO: 840 case V4L2_TUNER_MODE_STEREO:
841 case V4L2_TUNER_MODE_LANG1_LANG2:
838 default: 842 default:
839 source = 1; /* stereo or A|B */ 843 source = 1; /* stereo or A|B */
840 matrix = 0x20; 844 matrix = 0x20;