Update of /cvsroot/alsa/alsa-kernel/pci/ac97
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18276
Modified Files:
ac97_patch.c
Log Message:
patch_sigmatel_stac9758
- initialize with default values from datasheet
- apply old initialization only for Gateway M675 notebook
Index: ac97_patch.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- ac97_patch.c 16 Apr 2004 18:25:15 -0000 1.45
+++ ac97_patch.c 21 Apr 2004 18:44:13 -0000 1.46
@@ -449,16 +449,36 @@
int patch_sigmatel_stac9758(ac97_t * ac97)
{
+ static unsigned short regs[4] = {
+ AC97_SIGMATEL_OUTSEL,
+ AC97_SIGMATEL_IOMISC,
+ AC97_SIGMATEL_INSEL,
+ AC97_SIGMATEL_VARIOUS
+ };
+ static unsigned short def_regs[4] = {
+ /* OUTSEL */ 0xd794,
+ /* IOMISC */ 0x2001,
+ /* INSEL */ 0x0201,
+ /* VARIOUS */ 0x0000
+ };
+ static unsigned short m675_regs[4] = {
+ /* OUTSEL */ 0x9040,
+ /* IOMISC */ 0x2102,
+ /* INSEL */ 0x0203,
+ /* VARIOUS */ 0x0001
+ };
+ unsigned short *pregs = def_regs;
+ int i;
+
+ /* Gateway M675 notebook */
+ if (ac97->pci->subsystem_vendor == 0x107b &&
+ ac97->pci->subsystem_device == 0x0601)
+ pregs = m675_regs;
+
// patch for SigmaTel
ac97->build_ops = &patch_sigmatel_stac9700_ops;
- // turn on stereo speaker, headphone and line-out
- snd_ac97_write_cache(ac97, AC97_SIGMATEL_OUTSEL, 0x9040);
- // headphone select and boost
- snd_ac97_write_cache(ac97, AC97_SIGMATEL_IOMISC, 0x2102);
- // enable mic
- snd_ac97_write_cache(ac97, AC97_SIGMATEL_INSEL, 0x0203);
- // enable stereo mic
- snd_ac97_write_cache(ac97, AC97_SIGMATEL_VARIOUS, 0x0001);
+ for (i = 0; i < 4; i++)
+ snd_ac97_write_cache(ac97, regs[i], pregs[i]);
return 0;
}
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog