At Fri, 16 Apr 2004 15:25:42 +0800,
R CHAN wrote:
> 
> Hi, recent Alsa changes (ac97_patch.c) seem to have broken my
> ALC655 ac97 codec on via82xx. The breakage happened around 2.6.5.
> 
> Specifically, I can no longer set
> 
> Mic As Center/LFE control
> 
> Unlike Line-In As Surround it is now reported
> as a volume control with Mono values from 0-0.
> Can't set that bit at all.

try the attached patch.

> Secondly, I can't get 5.1 sound at all - though
> duplicate front does work.

doesn't 'aplay -Dsurroun51 some-6ch-sample.wav' work?


Takashi
Index: alsa-kernel/pci/ac97/ac97_codec.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v
retrieving revision 1.117
diff -u -r1.117 ac97_codec.c
--- alsa-kernel/pci/ac97/ac97_codec.c   14 Apr 2004 17:23:52 -0000      1.117
+++ alsa-kernel/pci/ac97/ac97_codec.c   16 Apr 2004 14:28:38 -0000
@@ -880,7 +880,7 @@
                .info = snd_ac97_info_single,
                .get = snd_ac97_get_single,
                .put = snd_ac97_put_spsa,
-               .private_value = AC97_EXTENDED_STATUS | (4 << 8) | (3 << 16) | (0 << 
24),
+               .private_value = AC97_SINGLE_VALUE(AC97_EXTENDED_STATUS, 4, 3, 0)
        },
 };
 
Index: alsa-kernel/pci/ac97/ac97_local.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_local.h,v
retrieving revision 1.4
diff -u -r1.4 ac97_local.h
--- alsa-kernel/pci/ac97/ac97_local.h   23 Oct 2003 17:00:15 -0000      1.4
+++ alsa-kernel/pci/ac97/ac97_local.h   16 Apr 2004 14:24:56 -0000
@@ -22,10 +22,11 @@
  *
  */
 
+#define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift) << 8) | ((mask) << 
16) | ((invert) << 24))
 #define AC97_SINGLE(xname, reg, shift, mask, invert) \
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
   .get = snd_ac97_get_single, .put = snd_ac97_put_single, \
-  .private_value = (reg) | ((shift) << 8) | ((mask) << 16) | ((invert) << 24) }
+  .private_value =  AC97_SINGLE_VALUE(reg, shift, mask, invert) }
 
 /* ac97_codec.c */
 extern const char *snd_ac97_stereo_enhancements[];
Index: alsa-kernel/pci/ac97/ac97_patch.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.43
diff -u -r1.43 ac97_patch.c
--- alsa-kernel/pci/ac97/ac97_patch.c   7 Apr 2004 10:03:31 -0000       1.43
+++ alsa-kernel/pci/ac97/ac97_patch.c   16 Apr 2004 14:26:27 -0000
@@ -1090,6 +1090,7 @@
                .info = snd_ac97_info_single,
                .get = snd_ac97_alc650_mic_get,
                .put = snd_ac97_alc650_mic_put,
+               .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
        },
 };
 
@@ -1190,6 +1191,7 @@
                .info = snd_ac97_info_single,
                .get = snd_ac97_alc655_mic_get,
                .put = snd_ac97_alc655_mic_put,
+               .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
        },
 };
 

Reply via email to