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

Modified Files:
        ac97_patch.c 
Log Message:
Added some AD1885 specific controls

Index: ac97_patch.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ac97_patch.c        17 Jun 2003 18:43:32 -0000      1.16
+++ ac97_patch.c        26 Jul 2003 09:46:14 -0000      1.17
@@ -650,6 +650,26 @@
        return 0;
 }
 
+static const snd_kcontrol_new_t snd_ac97_controls_ad1885[] = {
+       AC97_SINGLE("Digital Mono Direct", AC97_AD_MISC, 11, 1, 0),
+       AC97_SINGLE("Digital Audio Mode", AC97_AD_MISC, 12, 1, 0),
+       AC97_SINGLE("Low Power Mixer", AC97_AD_MISC, 14, 1, 0),
+       AC97_SINGLE("Zero Fill DAC", AC97_AD_MISC, 15, 1, 0),
+};
+
+static int patch_ad1885_specific(ac97_t * ac97)
+{
+       int err;
+
+       if ((err = patch_build_controls(ac97, snd_ac97_controls_ad1885, 
ARRAY_SIZE(snd_ac97_controls_ad1885))) < 0)
+               return err;
+       return 0;
+}
+
+static struct snd_ac97_build_ops patch_ad1885_build_ops = {
+       .build_specific = &patch_ad1885_specific
+};
+
 int patch_ad1885(ac97_t * ac97)
 {
        unsigned short jack;
@@ -661,6 +681,8 @@
        /* turn off jack sense bits D8 & D9 */
        jack = snd_ac97_read(ac97, AC97_AD_JACK_SPDIF);
        snd_ac97_write_cache(ac97, AC97_AD_JACK_SPDIF, jack | 0x0300);
+
+       ac97->build_ops = &patch_ad1885_build_ops;
        return 0;
 }
 



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to