Update of /cvsroot/alsa/alsa-kernel/pci/ac97
In directory sc8-pr-cvs1:/tmp/cvs-serv7997

Modified Files:
        ac97_patch.c ac97_proc.c 
Log Message:
fixes by James Courtier-Dutton <[EMAIL PROTECTED]>:

- fixed the wrong detection of SPDIF output.  SPDIF-out is enabled
  on all chip revisions.
- fixed the ac97 codec name shown in proc file, using ac97->id.



Index: ac97_patch.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ac97_patch.c        23 Sep 2003 14:31:44 -0000      1.23
+++ ac97_patch.c        6 Oct 2003 10:55:25 -0000       1.24
@@ -898,7 +898,6 @@
 int patch_alc650(ac97_t * ac97)
 {
        unsigned short val;
-       int spdif = 0;
 
        ac97->build_ops = &patch_alc650_ops;
 
@@ -907,22 +906,16 @@
        ac97->spec.dev_flags = (ac97->id == 0x414c4722 ||
                                ac97->id == 0x414c4723);
 
-       /* check spdif (should be only on rev.E) */
-       if (ac97->spec.dev_flags) {
-               val = snd_ac97_read(ac97, AC97_EXTENDED_STATUS);
-               if (val & AC97_EA_SPCV)
-                       spdif = 1;
-       }
+       /* enable AC97_ALC650_GPIO_SETUP, AC97_ALC650_CLOCK for R/W */
+       snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS, 
+               snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x8000);
 
-       if (spdif) {
-               /* enable AC97_ALC650_GPIO_SETUP, AC97_ALC650_CLOCK for R/W */
-               snd_ac97_write_cache(ac97, AC97_ALC650_GPIO_STATUS, 
-                       snd_ac97_read(ac97, AC97_ALC650_GPIO_STATUS) | 0x8000);
+       /* Enable SPDIF-IN only on Rev.E and above */
+       if (ac97->spec.dev_flags) {
                /* enable spdif in */
                snd_ac97_write_cache(ac97, AC97_ALC650_CLOCK,
                                     snd_ac97_read(ac97, AC97_ALC650_CLOCK) | 0x03);
-       } else
-               ac97->ext_id &= ~AC97_EI_SPDIF; /* disable extended-id */
+       }
 
        val = snd_ac97_read(ac97, AC97_ALC650_MULTICH);
        val &= ~0xc000; /* slot: 3,4,7,8,6,9 */

Index: ac97_proc.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_proc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ac97_proc.c 1 Sep 2003 09:53:26 -0000       1.2
+++ ac97_proc.c 6 Oct 2003 10:55:25 -0000       1.3
@@ -37,15 +37,12 @@
 static void snd_ac97_proc_read_main(ac97_t *ac97, snd_info_buffer_t * buffer, int 
subidx)
 {
        char name[64];
-       unsigned int id;
        unsigned short val, tmp, ext, mext;
        static const char *spdif_slots[4] = { " SPDIF=3/4", " SPDIF=7/8", " 
SPDIF=6/9", " SPDIF=res" };
        static const char *spdif_rates[4] = { " Rate=44.1kHz", " Rate=res", " 
Rate=48kHz", " Rate=32kHz" };
        static const char *spdif_rates_cs4205[4] = { " Rate=48kHz", " Rate=44.1kHz", " 
Rate=res", " Rate=res" };
 
-       id = snd_ac97_read(ac97, AC97_VENDOR_ID1) << 16;
-       id |= snd_ac97_read(ac97, AC97_VENDOR_ID2);
-       snd_ac97_get_name(NULL, id, name, 0);
+       snd_ac97_get_name(NULL, ac97->id, name, 0);
        snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name);
        if ((ac97->scaps & AC97_SCAP_AUDIO) == 0)
                goto __modem;



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to