Commit bcd243ff authored by Jaroslav Kysela's avatar Jaroslav Kysela

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).
parent f97fb347
......@@ -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
......
......@@ -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 }
};
......
......@@ -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
*/
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment