summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2004-03-15 13:04:42 +0100
committerJaroslav Kysela <perex@suse.cz>2004-03-15 13:04:42 +0100
commitbcd243ff773eddf89a42a1bda517dc236e9b9967 (patch)
treecb4476cdd962f302d89b55dffbe8eeb54ad89a3a
parentf97fb347dfc88212adf825ee375ffbf36b037b46 (diff)
ALSA CVS update - Jaroslav Kysela <perex@suse.cz>
AC97 Codec Core Kevin Mack <kevmack@accesscomm.ca> Here's a quick and dirty patch that's given me basic sound from my Gateway M675 notebook (Sigmatel 9758 AC97 codec).
-rw-r--r--include/sound/ac97_codec.h4
-rw-r--r--sound/pci/ac97/ac97_codec.c1
-rw-r--r--sound/pci/ac97/ac97_patch.c15
-rw-r--r--sound/pci/ac97/ac97_patch.h1
4 files changed, 21 insertions, 0 deletions
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 0f27586b8fd0..0113fbebcf92 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -226,10 +226,14 @@
#define AC97_GPIO_LINE2_HL1R 0x8000 /* Opt./ Handset to Line2 relay control (out) */
/* specific - SigmaTel */
+#define AC97_SIGMATEL_OUTSEL 0x64 /* Output Select, STAC9758 */
+#define AC97_SIGMATEL_INSEL 0x66 /* Input Select, STAC9758 */
+#define AC97_SIGMATEL_IOMISC 0x68 /* STAC9758 */
#define AC97_SIGMATEL_ANALOG 0x6c /* Analog Special */
#define AC97_SIGMATEL_DAC2INVERT 0x6e
#define AC97_SIGMATEL_BIAS1 0x70
#define AC97_SIGMATEL_BIAS2 0x72
+#define AC97_SIGMATEL_VARIOUS 0x72 /* STAC9758 */
#define AC97_SIGMATEL_MULTICHN 0x74 /* Multi-Channel programming */
#define AC97_SIGMATEL_CIC1 0x76
#define AC97_SIGMATEL_CIC2 0x78
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 8cd709fac269..6f94c782458c 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -171,6 +171,7 @@ static const ac97_codec_id_t snd_ac97_codec_ids[] = {
{ 0x83847650, 0xffffffff, "STAC9750/51", NULL, NULL }, // patch?
{ 0x83847652, 0xffffffff, "STAC9752/53", NULL, NULL }, // patch?
{ 0x83847656, 0xffffffff, "STAC9756/57", patch_sigmatel_stac9756, NULL },
+{ 0x83847658, 0xffffffff, "STAC9758/59", patch_sigmatel_stac9758, NULL },
{ 0x83847666, 0xffffffff, "STAC9766/67", NULL, NULL }, // patch?
{ 0, 0, NULL, NULL, NULL }
};
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index fbf889c1db0e..414bc3729451 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -447,6 +447,21 @@ int patch_sigmatel_stac9756(ac97_t * ac97)
return 0;
}
+int patch_sigmatel_stac9758(ac97_t * ac97)
+{
+ // 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);
+ return 0;
+}
+
/*
* Cirrus Logic CS42xx codecs
*/
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h
index 2cc081a47304..3e78799c593a 100644
--- a/sound/pci/ac97/ac97_patch.h
+++ b/sound/pci/ac97/ac97_patch.h
@@ -34,6 +34,7 @@ int patch_sigmatel_stac9708(ac97_t * ac97);
int patch_sigmatel_stac9721(ac97_t * ac97);
int patch_sigmatel_stac9744(ac97_t * ac97);
int patch_sigmatel_stac9756(ac97_t * ac97);
+int patch_sigmatel_stac9758(ac97_t * ac97);
int patch_cirrus_cs4299(ac97_t * ac97);
int patch_cirrus_spdif(ac97_t * ac97);
int patch_conexant(ac97_t * ac97);