X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fcx88%2Fcx88-tvaudio.c;h=2bd84d351a18eb3bf7e9f2301583ed04a004ed16;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=da8d97ce0c4b559e22e4705b20613baa7b1bd77c;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c index da8d97ce0..2bd84d351 100644 --- a/drivers/media/video/cx88/cx88-tvaudio.c +++ b/drivers/media/video/cx88/cx88-tvaudio.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -137,22 +138,12 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl) { u32 volume; -#ifndef USING_CX88_ALSA /* restart dma; This avoids buzz in NICAM and is good in others */ cx88_stop_audio_dma(core); -#endif cx_write(AUD_RATE_THRES_DMD, 0x000000C0); -#ifndef USING_CX88_ALSA cx88_start_audio_dma(core); -#endif - - if (cx88_boards[core->board].blackbird) { - /* sets sound input from external adc */ - if (core->board == CX88_BOARD_HAUPPAUGE_ROSLYN) - cx_clear(AUD_CTL, EN_I2SIN_ENABLE); - else - cx_set(AUD_CTL, EN_I2SIN_ENABLE); + if (cx88_boards[core->board].mpeg & CX88_MPEG_BLACKBIRD) { cx_write(AUD_I2SINPUTCNTL, 4); cx_write(AUD_BAUDRATE, 1); /* 'pass-thru mode': this enables the i2s output to the mpeg encoder */ @@ -161,7 +152,7 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl) cx_write(AUD_I2SCNTL, 0); /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */ } - if ((always_analog) || (!cx88_boards[core->board].blackbird)) { + if ((always_analog) || (!(cx88_boards[core->board].mpeg & CX88_MPEG_BLACKBIRD))) { ctl |= EN_DAC_ENABLE; cx_write(AUD_CTL, ctl); } @@ -718,7 +709,7 @@ static void set_audio_standard_FM(struct cx88_core *core, /* ----------------------------------------------------------- */ -int cx88_detect_nicam(struct cx88_core *core) +static int cx88_detect_nicam(struct cx88_core *core) { int i, j = 0; @@ -885,6 +876,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; } @@ -905,6 +897,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; @@ -926,6 +919,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; @@ -968,6 +962,7 @@ int cx88_audio_thread(void *data) msleep_interruptible(1000); if (kthread_should_stop()) break; + try_to_freeze(); /* just monitor the audio status for now ... */ memset(&t, 0, sizeof(t));