diff options
author | Gerd Knorr <devnull@localhost> | 2004-04-08 08:14:49 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-04-08 08:14:49 +0000 |
commit | f1e23ba0c545f6e4c6516afa543cc43f4231ac41 (patch) | |
tree | a92969eb8c5a30f3a8f2a5a9c2d9ee38566c98ab | |
parent | c953889122ac5a6d03ee86599ae54c250354b513 (diff) | |
download | mediapointer-dvb-s2-f1e23ba0c545f6e4c6516afa543cc43f4231ac41.tar.gz mediapointer-dvb-s2-f1e23ba0c545f6e4c6516afa543cc43f4231ac41.tar.bz2 |
- cx88: fix PAL-DK fm/stereo.
- misc.
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.saa7134 | 34 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 170 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-tvaudio.c | 4 |
3 files changed, 51 insertions, 157 deletions
diff --git a/linux/Documentation/video4linux/CARDLIST.saa7134 b/linux/Documentation/video4linux/CARDLIST.saa7134 index d7feb5fe5..5782f6112 100644 --- a/linux/Documentation/video4linux/CARDLIST.saa7134 +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 @@ -6,23 +6,23 @@ 5 -> SKNet Monster TV [1131:4e85] 6 -> Tevion MD 9717 7 -> KNC One TV-Station RDS / Typhoon TV Tuner RDS [1131:fe01,1894:fe01] - 8 -> KNC One TV-Station DVR [1894:a006] - 9 -> Terratec Cinergy 400 TV [153B:1142] - 10 -> Medion 5044 - 11 -> Kworld/KuroutoShikou SAA7130-TVPCI - 12 -> Terratec Cinergy 600 TV [153B:1143] - 13 -> Medion 7134 [16be:0003] - 14 -> Typhoon TV+Radio 90031 - 15 -> ELSA EX-VISION 300TV [1048:226b] - 16 -> ELSA EX-VISION 500TV [1048:226b] - 17 -> ASUS TV-FM 7134 [1043:4842,1043:4830,1043:4840] - 18 -> AOPEN VA1000 POWER [1131:7133] - 19 -> 10MOONS PCI TV CAPTURE CARD [1131:2001] - 20 -> BMK MPEX No Tuner - 21 -> Compro VideoMate TV [185b:c100] - 22 -> Matrox CronosPlus [102B:48d0] - 23 -> Medion 2819/ AverMedia M156 [1461:a70b,1461:2115] - 24 -> BMK MPEX Tuner + 8 -> Terratec Cinergy 400 TV [153B:1142] + 9 -> Medion 5044 + 10 -> Kworld/KuroutoShikou SAA7130-TVPCI + 11 -> Terratec Cinergy 600 TV [153B:1143] + 12 -> Medion 7134 [16be:0003] + 13 -> Typhoon TV+Radio 90031 + 14 -> ELSA EX-VISION 300TV [1048:226b] + 15 -> ELSA EX-VISION 500TV [1048:226b] + 16 -> ASUS TV-FM 7134 [1043:4842,1043:4830,1043:4840] + 17 -> AOPEN VA1000 POWER [1131:7133] + 18 -> BMK MPEX No Tuner + 19 -> Compro VideoMate TV [185b:c100] + 20 -> Matrox CronosPlus [102B:48d0] + 21 -> 10MOONS PCI TV CAPTURE CARD [1131:2001] + 22 -> Medion 2819/ AverMedia M156 [1461:a70b,1461:2115] + 23 -> BMK MPEX Tuner + 24 -> KNC One TV-Station DVR [1894:a006] 25 -> ASUS TV-FM 7133 [1043:4843] 26 -> Pinnacle PCTV Stereo (saa7134) [11bd:002b] 27 -> Manli MuchTV M-TV002 diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 761eb52ff..1686f3a79 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -297,7 +297,7 @@ static void set_audio_standard_NICAM_L(struct cx8800_dev *dev) static void set_audio_standard_A2(struct cx8800_dev *dev) { /* from dscaler cvs */ - static const struct rlist a2[] = { + static const struct rlist a2_common[] = { { AUD_PDF_DDS_CNST_BYTE2, 0x06 }, { AUD_PDF_DDS_CNST_BYTE1, 0x82 }, { AUD_PDF_DDS_CNST_BYTE0, 0x12 }, @@ -346,17 +346,21 @@ static void set_audio_standard_A2(struct cx8800_dev *dev) { AUD_RDSQ_SEL, 0x00000017 }, { AUD_RDSQ_SHIFT, 0x00000000 }, { AUD_POLYPH80SCALEFAC, 0x00000001 }, - - // Table 1 + + { /* end of list */ }, + }; + + static const struct rlist a2_table1[] = { + // PAL-BG { AUD_DMD_RA_DDS, 0x002a73bd }, { AUD_C1_UP_THR, 0x00007000 }, { AUD_C1_LO_THR, 0x00005400 }, { AUD_C2_UP_THR, 0x00005400 }, { AUD_C2_LO_THR, 0x00003000 }, - -#if 0 - // found this in WDM-driver for A2, must country spec. - // Table 2 + { /* end of list */ }, + }; + static const struct rlist a2_table2[] = { + // PAL-DK { AUD_DMD_RA_DDS, 0x002a73bd }, { AUD_C1_UP_THR, 0x00007000 }, { AUD_C1_LO_THR, 0x00005400 }, @@ -364,8 +368,10 @@ static void set_audio_standard_A2(struct cx8800_dev *dev) { AUD_C2_LO_THR, 0x00003000 }, { AUD_DN0_FREQ, 0x00003a1c }, { AUD_DN2_FREQ, 0x0000d2e0 }, - - // Table 3 + { /* end of list */ }, + }; + static const struct rlist a2_table3[] = { + // unknown, probably NTSC-M { AUD_DMD_RA_DDS, 0x002a2873 }, { AUD_C1_UP_THR, 0x00003c00 }, { AUD_C1_LO_THR, 0x00003000 }, @@ -375,140 +381,26 @@ static void set_audio_standard_A2(struct cx8800_dev *dev) { AUD_DN1_FREQ, 0x00003418 }, { AUD_DN2_FREQ, 0x000029c7 }, { AUD_POLY0_DDS_CONSTANT, 0x000a7540 }, -#endif - { /* end of list */ }, }; - static const struct rlist a2_old[] = { - { AUD_DN0_FREQ, 0x0000312b }, - { AUD_POLY0_DDS_CONSTANT, 0x000a62b4 }, - { AUD_IIR1_0_SEL, 0x00000000 }, - { AUD_IIR1_1_SEL, 0x00000001 }, - { AUD_IIR1_2_SEL, 0x0000001f }, - { AUD_IIR1_3_SEL, 0x00000020 }, - { AUD_IIR1_4_SEL, 0x00000023 }, - { AUD_IIR1_5_SEL, 0x00000007 }, - { AUD_IIR1_0_SHIFT, 0x00000000 }, - { AUD_IIR1_1_SHIFT, 0x00000000 }, - { AUD_IIR1_2_SHIFT, 0x00000007 }, - { AUD_IIR1_3_SHIFT, 0x00000007 }, - { AUD_IIR1_4_SHIFT, 0x00000007 }, - { AUD_IIR1_5_SHIFT, 0x00000000 }, - { AUD_IIR2_0_SEL, 0x00000002 }, - { AUD_IIR2_1_SEL, 0x00000003 }, - { AUD_IIR2_2_SEL, 0x00000004 }, - { AUD_IIR2_3_SEL, 0x00000005 }, - { AUD_IIR3_0_SEL, 0x00000021 }, - { AUD_IIR3_1_SEL, 0x00000023 }, - { AUD_IIR3_2_SEL, 0x00000016 }, - { AUD_IIR3_0_SHIFT, 0x00000000 }, - { AUD_IIR3_1_SHIFT, 0x00000000 }, - { AUD_IIR3_2_SHIFT, 0x00000000 }, - { AUD_IIR4_0_SEL, 0x0000001d }, - { AUD_IIR4_1_SEL, 0x00000019 }, - { AUD_IIR4_2_SEL, 0x00000008 }, - { AUD_IIR4_0_SHIFT, 0x00000000 }, - { AUD_IIR4_1_SHIFT, 0x00000000 }, - { AUD_IIR4_2_SHIFT, 0x00000001 }, - { AUD_IIR4_0_CA0, 0x0003e57e }, - { AUD_IIR4_0_CA1, 0x00005e11 }, - { AUD_IIR4_0_CA2, 0x0003a7cf }, - { AUD_IIR4_0_CB0, 0x00002368 }, - { AUD_IIR4_0_CB1, 0x0003bf1b }, - { AUD_IIR4_1_CA0, 0x00006349 }, - { AUD_IIR4_1_CA1, 0x00006f27 }, - { AUD_IIR4_1_CA2, 0x0000e7a3 }, - { AUD_IIR4_1_CB0, 0x00005653 }, - { AUD_IIR4_1_CB1, 0x0000cf97 }, - { AUD_IIR4_2_CA0, 0x00006349 }, - { AUD_IIR4_2_CA1, 0x00006f27 }, - { AUD_IIR4_2_CA2, 0x0000e7a3 }, - { AUD_IIR4_2_CB0, 0x00005653 }, - { AUD_IIR4_2_CB1, 0x0000cf97 }, - { AUD_HP_MD_IIR4_1, 0x00000001 }, - { AUD_HP_PROG_IIR4_1, 0x00000017 }, - { AUD_DN1_FREQ, 0x00003618 }, - { AUD_DN1_SRC_SEL, 0x00000017 }, - { AUD_DN1_SHFT, 0x00000007 }, - { AUD_DN1_AFC, 0x00000000 }, - { AUD_DN1_FREQ_SHIFT, 0x00000000 }, - { AUD_DN2_SRC_SEL, 0x00000040 }, - { AUD_DN2_SHFT, 0x00000000 }, - { AUD_DN2_AFC, 0x00000002 }, - { AUD_DN2_FREQ, 0x0000caaf }, - { AUD_DN2_FREQ_SHIFT, 0x00000000 }, - { AUD_PDET_SRC, 0x00000014 }, - { AUD_PDET_SHIFT, 0x00000000 }, - { AUD_DEEMPH0_SRC_SEL, 0x00000011 }, - { AUD_DEEMPH1_SRC_SEL, 0x00000013 }, - { AUD_DEEMPH0_SHIFT, 0x00000000 }, - { AUD_DEEMPH1_SHIFT, 0x00000000 }, - { AUD_DEEMPH0_G0, 0x000004da }, - { AUD_DEEMPH0_A0, 0x0000777a }, - { AUD_DEEMPH0_B0, 0x00000000 }, - { AUD_DEEMPH0_A1, 0x0003f062 }, - { AUD_DEEMPH0_B1, 0x00000000 }, - { AUD_DEEMPH1_G0, 0x000004da }, - { AUD_DEEMPH1_A0, 0x0000777a }, - { AUD_DEEMPH1_B0, 0x00000000 }, - { AUD_DEEMPH1_A1, 0x0003f062 }, - { AUD_DEEMPH1_B1, 0x00000000 }, - { AUD_PLL_EN, 0x00000000 }, - { AUD_DMD_RA_DDS, 0x002a4efb }, - { AUD_RATE_ADJ1, 0x00001000 }, - { AUD_RATE_ADJ2, 0x00002000 }, - { AUD_RATE_ADJ3, 0x00003000 }, - { AUD_RATE_ADJ4, 0x00004000 }, - { AUD_RATE_ADJ5, 0x00005000 }, - { AUD_C2_UP_THR, 0x0000ffff }, - { AUD_C2_LO_THR, 0x0000e800 }, - { AUD_C1_UP_THR, 0x00008c00 }, - { AUD_C1_LO_THR, 0x00006c00 }, - - // ; Completely ditch AFC feedback - { AUD_DCOC_0_SRC, 0x00000021 }, - { AUD_DCOC_1_SRC, 0x0000001a }, - { AUD_DCOC1_SHIFT, 0x00000000 }, - { AUD_DCOC_1_SHIFT_IN0, 0x0000000a }, - { AUD_DCOC_1_SHIFT_IN1, 0x00000008 }, - { AUD_DCOC_PASS_IN, 0x00000000 }, - { AUD_IIR4_0_SEL, 0x00000023 }, - - // ; Completely ditc FM-2 AFC feedback - { AUD_DN1_AFC, 0x00000000 }, - { AUD_DCOC_2_SRC, 0x0000001b }, - { AUD_IIR4_1_SEL, 0x00000025 }, - - // ; WARNING!!! THIS CHANGE WAS NOT EXPECTED!!! - // ; Swap I & Q inputs into second rotator - // ; to reverse frequency and therefor invert - // ; phase from the cordic FM demodulator - // ; (frequency rotation must also be reversed - { AUD_DN2_SRC_SEL, 0x00000001 }, - { AUD_DN2_FREQ, 0x00003551 }, - - // setup Audio PLL - { AUD_PLL_PRESCALE, 0x00000002 }, - { AUD_PLL_INT, 0x0000001f }, - - { /* end of list */ }, + set_audio_start(dev, 0x0004, EN_DMTRX_LR | EN_A2_AUTO_STEREO); + set_audio_registers(dev, a2_common); + switch (dev->tvaudio) { + case WW_A2_BG: + dprintk("%s PAL-BG (status: known-good)\n",__FUNCTION__); + set_audio_registers(dev, a2_table1); + break; + case WW_A2_DK: + dprintk("%s PAL-DK (status: known-good)\n",__FUNCTION__); + set_audio_registers(dev, a2_table2); + break; + case WW_A2_M: + dprintk("%s NTSC-M (status: unknown)\n",__FUNCTION__); + set_audio_registers(dev, a2_table3); + break; }; - - - dprintk("%s (status: WorksForMe[tm])\n",__FUNCTION__); - - if (0) { - /* old code */ - set_audio_start(dev, 0x0004, EN_DMTRX_SUMR | EN_A2_AUTO_STEREO); - set_audio_registers(dev, a2_old); - set_audio_finish(dev); - } else { - /* new code */ - set_audio_start(dev, 0x0004, EN_DMTRX_LR | EN_A2_AUTO_STEREO); - set_audio_registers(dev, a2); - set_audio_finish(dev); - } + set_audio_finish(dev); } static void set_audio_standard_EIAJ(struct cx8800_dev *dev) diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index cdd35478b..14756822e 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -791,9 +791,11 @@ static int tvaudio_thread_ddep(void *data) (norms & 0x40) ? " M" : ""); } - /* quick & dirty -- to be fixed up later ... */ + /* kick automatic standard detection */ saa_dsp_writel(dev, 0x454 >> 2, 0); saa_dsp_writel(dev, 0x454 >> 2, norms | 0x80); + + /* setup crossbars */ saa_dsp_writel(dev, 0x464 >> 2, 0x000000); saa_dsp_writel(dev, 0x470 >> 2, 0x101010); |