Driver via ac97 sound problem (VT82C686) Compaq Presario 700

Driver via ac97 sound problem (VT82C686) Compaq Presario 700

Post by Raul Sanchez Sanche » Fri, 18 Jan 2002 17:00:11



Hi:

        All the problems i tell you occurs when i try to access to register in
via_card_init_proc. If i try to do this in 1886 initialization (
ac97_codec.c ) i haven't got any problem, i can write the registers of
the 1886 and i can read then perfectly.

        But my question is, later i set up 1886 chip, does via inicialization
change my configuration of it? If i try to print all the register of the
1886 in via_card_init_proc it fails :( and i can't be sure that via code
doesn't change them.

my 1886_setup proc is now as this:

static int setup_ad1886(struct ac97_codec * codec)
{
 int cnt;
 /* The spec says not to mess with other bits unless
 S/PDIF is turned *off* in reg 2A */
 //codec->codec_write(codec, AC97_EXTENDED_STATUS, 0);
 /* The 1886 spec dated 08/25/00 says default value=0
 but ac97 2.2 says it should be 0x2000. */
// codec->codec_write(codec, AC97_RESERVED_3A, 0x0000); /* 48 kHz */
codec->codec_write(codec, 0x0002, 0x003f);
codec->codec_write(codec, 0x0004, 0x003f);
codec->codec_write(codec, 0x0006, 0x003f);
codec->codec_write(codec, 0x000a, 0x003f);
codec->codec_write(codec, 0x000c, 0x003f);
codec->codec_write(codec, 0x000e, 0x003f);
codec->codec_write(codec, 0x0010, 0x0808);
codec->codec_write(codec, 0x0012, 0x083f);
codec->codec_write(codec, 0x0014, 0x0808);
codec->codec_write(codec, 0x0016, 0x0808);
codec->codec_write(codec, 0x0016, 0x0808);
codec->codec_write(codec, 0x0018, 0x0808);
codec->codec_write(codec, 0x001a, 0x0000);
codec->codec_write(codec, 0x001c, 0x0800);
codec->codec_write(codec, 0x0020, 0x0000);
codec->codec_write(codec, 0x0022, 0x000f);
codec->codec_write(codec, 0x0028, 0x0005);
codec->codec_write(codec, 0x002c, 0xbb80);
codec->codec_write(codec, 0x007a, 0xbb80);
codec->codec_write(codec, 0x0032, 0xbb80);
codec->codec_write(codec, 0x0078, 0xbb80);
codec->codec_write(codec, 0x003a, 0x0000);
codec->codec_write(codec, 0x0072, 0x0000);
codec->codec_write(codec, AC97_EXTENDED_STATUS, 1);
codec->codec_write(codec, AC97_RESERVED_3A, 0x2000); /* 48 kHz */
        for (cnt=0; cnt <= 0x7e; cnt = cnt +2)
                printk(KERN_INFO "reg:0x%02x  val:0x%04x\n", cnt,
codec->codec_read(codec, cnt));

 return 0;
 }

and the output in /var/log/messages is:

Jan 16 21:05:38 raul kernel:  INICIALIZANDO MIXER -----
Jan 16 21:05:38 raul kernel: reg:0x00  val:0x0410
Jan 16 21:05:38 raul kernel: reg:0x02  val:0x003f
Jan 16 21:05:38 raul kernel: reg:0x04  val:0x003f
Jan 16 21:05:38 raul kernel: reg:0x06  val:0x001f
Jan 16 21:05:38 raul kernel: reg:0x08  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x0a  val:0x001e
Jan 16 21:05:38 raul kernel: reg:0x0c  val:0x001f
Jan 16 21:05:38 raul kernel: reg:0x0e  val:0x001f
Jan 16 21:05:38 raul kernel: reg:0x10  val:0x0808
Jan 16 21:05:38 raul kernel: reg:0x12  val:0x081f
Jan 16 21:05:38 raul kernel: reg:0x14  val:0x0808
Jan 16 21:05:38 raul kernel: reg:0x16  val:0x0808
Jan 16 21:05:38 raul kernel: reg:0x18  val:0x0808
Jan 16 21:05:38 raul kernel: reg:0x1a  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x1c  val:0x0800
Jan 16 21:05:38 raul kernel: reg:0x1e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x20  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x22  val:0x000f
Jan 16 21:05:38 raul kernel: reg:0x24  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x26  val:0x000f
Jan 16 21:05:38 raul kernel: reg:0x28  val:0x0005
Jan 16 21:05:38 raul kernel: reg:0x2a  val:0x0401
Jan 16 21:05:38 raul kernel: reg:0x2c  val:0xbb80
Jan 16 21:05:38 raul kernel: reg:0x2e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x30  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x32  val:0xbb80
Jan 16 21:05:38 raul kernel: reg:0x34  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x36  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x38  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x3a  val:0x2000
Jan 16 21:05:38 raul kernel: reg:0x3c  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x3e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x40  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x42  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x44  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x46  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x48  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x4a  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x4c  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x4e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x50  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x52  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x54  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x56  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x58  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x5a  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x5c  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x5e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x60  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x62  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x64  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x66  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x68  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x6a  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x6c  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x6e  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x70  val:0x0000
Jan 16 21:05:38 raul kernel: reg:0x72  val:0x0002
Jan 16 21:05:38 raul kernel: reg:0x74  val:0x7000
Jan 16 21:05:38 raul kernel: reg:0x76  val:0x0404
Jan 16 21:05:38 raul kernel: reg:0x78  val:0xbb80
Jan 16 21:05:38 raul kernel: reg:0x7a  val:0xbb80
Jan 16 21:05:38 raul kernel: reg:0x7c  val:0x4144
Jan 16 21:05:38 raul kernel: reg:0x7e  val:0x5361
Jan 16 21:05:38 raul kernel: via82cxxx: board #1 at 0x1000, IRQ 5

As you can see, the register are well written in ad1886, so this are my
question,
---- Does via code inicialization change any value of ad1886?
---- Is possible that ad1886 works fine and the problem were with via
chipset?
----- Any suggestion is welcomed.

Thanks

--
-----------------------------------------------

Centro de Calculo              
Facultad de Informatica    Tlf: +34 968 36 4827
Universidad de Murcia      Fax: +34 968 36 4151
-----------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Compaq Presario 700 Sound Fix (Patch)

The problem regarding the Compaq Presario series 700 sound (no sound output, driver working properly) has been solved by initializing the JackSense JSM register.
This properly sets the AD1886 on Compaq Presario 700 series and alows audio to actually came out.
Sometimes a saturated sound cames out from PCM playback...adjusting volume seems to solve it. But this is at least a beggining of support for the 700 sound. I'll post again when I solve this minos issue.

diff -u --new-file --recursive linux-2.4.18/drivers/sound/ac97_codec.c linux/drivers/sound/ac97_codec.c
--- linux-2.4.18/drivers/sound/ac97_codec.c     Mon Nov 12 15:02:54 2001

 static int sigmatel_9708_init(struct ac97_codec *codec);
 static int sigmatel_9721_init(struct ac97_codec *codec);
 static int sigmatel_9744_init(struct ac97_codec *codec);
+static int ad1886_init(struct ac97_codec *codec);
 static int eapd_control(struct ac97_codec *codec, int);
 static int crystal_digital_control(struct ac97_codec *codec, int mode);

 static struct ac97_ops sigmatel_9721_ops = { sigmatel_9721_init, NULL, NULL };
 static struct ac97_ops sigmatel_9744_ops = { sigmatel_9744_init, NULL, NULL };
 static struct ac97_ops crystal_digital_ops = { NULL, eapd_control, crystal_digital_control };
+static struct ac97_ops ad1886_ops = { ad1886_init, eapd_control, NULL };

 /* sorted by vendor/device id */

        {0x41445348, "Analog Devices AD1881A",        &null_ops},
        {0x41445360, "Analog Devices AD1885", &default_ops},
        {0x41445460, "Analog Devices AD1885", &default_ops},
+       {0x41445361, "Analog Devices AD1886", &ad1886_ops},
        {0x414B4D00, "Asahi Kasei AK4540",    &null_ops},
        {0x414B4D01, "Asahi Kasei AK4542",    &null_ops},

        codec->codec_write(codec, 0x2C, 0XFFFF);
        return 0;
 }
+
+
+
+/*
+ *     Presario700 workaround
+ *     for Jack Sense/SPDIF Register misetting causing
+ *     no audible output
+ *     by Santiago Nullo 04/05/2002
+ */
+
+#define AC97_AD1886_JACK_SENSE 0x72
+
+static int ad1886_init(struct ac97_codec * codec)
+{
+       /* from AD1886 Specs */
+       codec->codec_write(codec, AC97_AD1886_JACK_SENSE, 0x0010);
+       return 0;
+}
+
+

 /*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. MERVA AIX instances

3. sound on compaq presario 700

4. Crashing HD: DriveReady SeekComplete Error

5. Problems whit Compaq Presario 700

6. modern shells...ksh vs. bash vs. tcsh, etc.

7. VIA VT82C686 AC97 audio problem

8. Seyon configuration

9. Compaq Presario 700

10. FreeBSD 4.6 on Compaq Presario 700

11. VIA AC97 audio (VT82C686 super south) and 2.4.2 kernel..

12. Driver via ac97 sound problem (VT82C686B)

13. VT82C686 APOLLO SUPER AC97/AUDIO sound not working