Update of /cvsroot/alsa/alsa-kernel/pci/emu10k1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28640/pci/emu10k1

Modified Files:
        emu10k1_main.c emufx.c emumixer.c 
Log Message:
Initial attempt to add support for SB Live 5.1 (c) 2003

Index: emu10k1_main.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- emu10k1_main.c      6 Mar 2004 16:51:30 -0000       1.32
+++ emu10k1_main.c      3 May 2004 08:43:04 -0000       1.33
@@ -690,7 +690,7 @@
        if (extin_mask == 0)
                extin_mask = 0x3fcf;
        if (extout_mask == 0)
-               extout_mask = 0x1fff;
+               extout_mask = 0x7fff;
        emu->fx8010.extin_mask = extin_mask;
        emu->fx8010.extout_mask = extout_mask;
 

Index: emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- emufx.c     6 Mar 2004 16:51:30 -0000       1.51
+++ emufx.c     3 May 2004 08:43:04 -0000       1.52
@@ -120,8 +120,8 @@
        /* 0x0a */ "PCM Capture Left",
        /* 0x0b */ "PCM Capture Right",
        /* 0x0c */ "MIC Capture",
-       /* 0x0d */ NULL,
-       /* 0x0e */ NULL,
+       /* 0x0d */ "AC97 Surround Left",
+       /* 0x0e */ "AC97 Surround Right",
        /* 0x0f */ NULL,
        /* 0x10 */ NULL,
        /* 0x11 */ "Analog Center",
@@ -2113,22 +2113,26 @@
                for (z = 0; z < 2; z++)
                        OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_REAR_L + z), GPR(playback 
+ SND_EMU10K1_PLAYBACK_CHANNELS + 2 + z), C_00000000, C_00000000);
 
-       if (emu->fx8010.extout_mask & (1<<EXTOUT_CENTER)) {
+       if (emu->fx8010.extout_mask & 
((1<<EXTOUT_AC97_REAR_L)|(1<<EXTOUT_AC97_REAR_R)))
+               for (z = 0; z < 2; z++)
+                       OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_REAR_L + z), 
GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2 + z), C_00000000, C_00000000);
+
+       if (emu->fx8010.extout_mask & (1<<EXTOUT_AC97_CENTER)) {
 #ifndef EMU10K1_CENTER_LFE_FROM_FRONT
-               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_CENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 4), C_00000000, C_00000000);
+               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 4), C_00000000, C_00000000);
                OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 4), C_00000000, C_00000000);
 #else
-               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_CENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 0), C_00000000, C_00000000);
+               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 0), C_00000000, C_00000000);
                OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 0), C_00000000, C_00000000);
 #endif
        }
 
-       if (emu->fx8010.extout_mask & (1<<EXTOUT_LFE)) {
+       if (emu->fx8010.extout_mask & (1<<EXTOUT_AC97_LFE)) {
 #ifndef EMU10K1_CENTER_LFE_FROM_FRONT
-               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_LFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_00000000, C_00000000);
+               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_00000000, C_00000000);
                OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_00000000, C_00000000);
 #else
-               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_LFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_00000000, C_00000000);
+               OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_00000000, C_00000000);
                OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + 
SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_00000000, C_00000000);
 #endif
        }

Index: emumixer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emumixer.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- emumixer.c  16 Jan 2004 18:08:49 -0000      1.20
+++ emumixer.c  3 May 2004 08:43:04 -0000       1.21
@@ -34,6 +34,8 @@
 
 #define chip_t emu10k1_t
 
+#define AC97_ID_STAC9758       0x83847658
+
 static int snd_emu10k1_spdif_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * 
uinfo)
 {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
@@ -531,6 +533,10 @@
                        snd_ac97_write(emu->ac97, AC97_REC_SEL, 0x0000);
                        c = audigy_remove_ctls;
                } else {
+                       if (emu->ac97->id == AC97_ID_STAC9758) {
+                               emu->rear_ac97 = 1;
+                               snd_emu10k1_ptr_write(emu, AC97SLOT, 0, 
AC97SLOT_CNTR|AC97SLOT_LFE|AC97SLOT_REAR_LEFT|AC97SLOT_REAR_RIGHT);
+                       }
                        /* remove unused AC97 controls */
                        snd_ac97_write(emu->ac97, AC97_SURROUND_MASTER, 0x0202);
                        snd_ac97_write(emu->ac97, AC97_CENTER_LFE_MASTER, 0x0202);



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to