aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/msp3400-kthreads.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:09:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:09:31 -0400
commit25581ad107be24b89d805da51a03d616f8f3d1be (patch)
tree36e2bd32667b5dd5a39e1939c1c5162f18967715 /drivers/media/video/msp3400-kthreads.c
parent72cf2709bf8e0410800f118c4298bfbf8715b303 (diff)
parent7477ddaa4d2d69bbcd49e12990af158dbb03f2f2 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (244 commits) V4L/DVB (4210b): git-dvb: tea575x-tuner build fix V4L/DVB (4210a): git-dvb versus matroxfb V4L/DVB (4209): Added some BTTV PCI IDs for newer boards Fixes some sync issues between V4L/DVB development and GIT V4L/DVB (4206): Cx88-blackbird: always set encoder height based on tvnorm->id V4L/DVB (4205): Merge tda9887 module into tuner. V4L/DVB (4203): Explicitly set the enum values. V4L/DVB (4202): allow selecting CX2341x port mode V4L/DVB (4200): Disable bitrate_mode when encoding mpeg-1. V4L/DVB (4199): Add cx2341x-specific control array to cx2341x.c V4L/DVB (4198): Avoid newer usages of obsoleted experimental MPEGCOMP API V4L/DVB (4197): Port new MPEG API to saa7134-empress with saa6752hs V4L/DVB (4196): Port cx88-blackbird to the new MPEG API. V4L/DVB (4193): Update cx2341x fw encoding API doc. V4L/DVB (4192): Use control helpers for saa7115, cx25840, msp3400. V4L/DVB (4191): Add CX2341X MPEG encoder module. V4L/DVB (4190): Add helper functions for control processing to v4l2-common. V4L/DVB (4189): Add videodev support for VIDIOC_S/G/TRY_EXT_CTRLS. V4L/DVB (4188): Add new MPEG control/ioctl definitions to videodev2.h V4L/DVB (4186): Add support for the DNTV Live! mini DVB-T card. ...
Diffstat (limited to 'drivers/media/video/msp3400-kthreads.c')
-rw-r--r--drivers/media/video/msp3400-kthreads.c40
1 files changed, 28 insertions, 12 deletions
diff --git a/drivers/media/video/msp3400-kthreads.c b/drivers/media/video/msp3400-kthreads.c
index 633a10213789..f2fd9195b3ac 100644
--- a/drivers/media/video/msp3400-kthreads.c
+++ b/drivers/media/video/msp3400-kthreads.c
@@ -244,19 +244,21 @@ static void msp3400c_set_audmode(struct i2c_client *client)
244 the hardware does not support SAP. So the rxsubchans combination 244 the hardware does not support SAP. So the rxsubchans combination
245 of STEREO | LANG2 does not occur. */ 245 of STEREO | LANG2 does not occur. */
246 246
247 /* switch to mono if only mono is available */ 247 if (state->mode != MSP_MODE_EXTERN) {
248 if (state->rxsubchans == V4L2_TUNER_SUB_MONO) 248 /* switch to mono if only mono is available */
249 audmode = V4L2_TUNER_MODE_MONO; 249 if (state->rxsubchans == V4L2_TUNER_SUB_MONO)
250 /* if bilingual */ 250 audmode = V4L2_TUNER_MODE_MONO;
251 else if (state->rxsubchans & V4L2_TUNER_SUB_LANG2) { 251 /* if bilingual */
252 /* and mono or stereo, then fallback to lang1 */ 252 else if (state->rxsubchans & V4L2_TUNER_SUB_LANG2) {
253 if (audmode == V4L2_TUNER_MODE_MONO || 253 /* and mono or stereo, then fallback to lang1 */
254 audmode == V4L2_TUNER_MODE_STEREO) 254 if (audmode == V4L2_TUNER_MODE_MONO ||
255 audmode = V4L2_TUNER_MODE_LANG1; 255 audmode == V4L2_TUNER_MODE_STEREO)
256 audmode = V4L2_TUNER_MODE_LANG1;
257 }
258 /* if stereo, and audmode is not mono, then switch to stereo */
259 else if (audmode != V4L2_TUNER_MODE_MONO)
260 audmode = V4L2_TUNER_MODE_STEREO;
256 } 261 }
257 /* if stereo, and audmode is not mono, then switch to stereo */
258 else if (audmode != V4L2_TUNER_MODE_MONO)
259 audmode = V4L2_TUNER_MODE_STEREO;
260 262
261 /* switch demodulator */ 263 /* switch demodulator */
262 switch (state->mode) { 264 switch (state->mode) {
@@ -481,6 +483,7 @@ int msp3400c_thread(void *data)
481 /* no carrier scan, just unmute */ 483 /* no carrier scan, just unmute */
482 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n"); 484 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n");
483 state->scan_in_progress = 0; 485 state->scan_in_progress = 0;
486 state->rxsubchans = V4L2_TUNER_SUB_STEREO;
484 msp_set_audio(client); 487 msp_set_audio(client);
485 continue; 488 continue;
486 } 489 }
@@ -947,6 +950,14 @@ int msp34xxg_thread(void *data)
947 if (kthread_should_stop()) 950 if (kthread_should_stop())
948 break; 951 break;
949 952
953 if (state->mode == MSP_MODE_EXTERN) {
954 /* no carrier scan needed, just unmute */
955 v4l_dbg(1, msp_debug, client, "thread: no carrier scan\n");
956 state->scan_in_progress = 0;
957 msp_set_audio(client);
958 continue;
959 }
960
950 /* setup the chip*/ 961 /* setup the chip*/
951 msp34xxg_reset(client); 962 msp34xxg_reset(client);
952 state->std = state->radio ? 0x40 : msp_standard; 963 state->std = state->radio ? 0x40 : msp_standard;
@@ -978,6 +989,11 @@ int msp34xxg_thread(void *data)
978 v4l_dbg(1, msp_debug, client, "detected standard: %s (0x%04x)\n", 989 v4l_dbg(1, msp_debug, client, "detected standard: %s (0x%04x)\n",
979 msp_standard_std_name(state->std), state->std); 990 msp_standard_std_name(state->std), state->std);
980 991
992 if (state->std == 9) {
993 /* AM NICAM mode */
994 msp_write_dsp(client, 0x0e, 0x7c00);
995 }
996
981 /* unmute: dispatch sound to scart output, set scart volume */ 997 /* unmute: dispatch sound to scart output, set scart volume */
982 msp_set_audio(client); 998 msp_set_audio(client);
983 999