Commit c68db717 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Jaroslav Kysela

ALSA: ac97: add AC97 STMicroelectronics' codecs

Add the STMicroelectronics ST7597 codec and an unknown codec
from the same manufacturer found on the Creative SB 128 card (CT4810).
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent af9a75dd
...@@ -83,6 +83,7 @@ static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = { ...@@ -83,6 +83,7 @@ static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
{ 0x4e534300, 0xffffff00, "National Semiconductor", NULL, NULL }, { 0x4e534300, 0xffffff00, "National Semiconductor", NULL, NULL },
{ 0x50534300, 0xffffff00, "Philips", NULL, NULL }, { 0x50534300, 0xffffff00, "Philips", NULL, NULL },
{ 0x53494c00, 0xffffff00, "Silicon Laboratory", NULL, NULL }, { 0x53494c00, 0xffffff00, "Silicon Laboratory", NULL, NULL },
{ 0x53544d00, 0xffffff00, "STMicroelectronics", NULL, NULL },
{ 0x54524100, 0xffffff00, "TriTech", NULL, NULL }, { 0x54524100, 0xffffff00, "TriTech", NULL, NULL },
{ 0x54584e00, 0xffffff00, "Texas Instruments", NULL, NULL }, { 0x54584e00, 0xffffff00, "Texas Instruments", NULL, NULL },
{ 0x56494100, 0xffffff00, "VIA Technologies", NULL, NULL }, { 0x56494100, 0xffffff00, "VIA Technologies", NULL, NULL },
...@@ -161,6 +162,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = { ...@@ -161,6 +162,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
{ 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix { 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix
{ 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL }, { 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL },
{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, { 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH },
{ 0x53544d02, 0xffffffff, "ST7597", NULL, NULL },
{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, { 0x54524102, 0xffffffff, "TR28022", NULL, NULL },
{ 0x54524103, 0xffffffff, "TR28023", NULL, NULL }, { 0x54524103, 0xffffffff, "TR28023", NULL, NULL },
{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, { 0x54524106, 0xffffffff, "TR28026", NULL, NULL },
...@@ -213,6 +215,14 @@ static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg) ...@@ -213,6 +215,14 @@ static int snd_ac97_valid_reg(struct snd_ac97 *ac97, unsigned short reg)
{ {
/* filter some registers for buggy codecs */ /* filter some registers for buggy codecs */
switch (ac97->id) { switch (ac97->id) {
case AC97_ID_ST_AC97_ID4:
if (reg == 0x08)
return 0;
/* fall through */
case AC97_ID_ST7597:
if (reg == 0x22 || reg == 0x7a)
return 1;
/* fall through */
case AC97_ID_AK4540: case AC97_ID_AK4540:
case AC97_ID_AK4542: case AC97_ID_AK4542:
if (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c) if (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c)
......
...@@ -62,3 +62,5 @@ ...@@ -62,3 +62,5 @@
#define AC97_ID_CM9761_78 0x434d4978 #define AC97_ID_CM9761_78 0x434d4978
#define AC97_ID_CM9761_82 0x434d4982 #define AC97_ID_CM9761_82 0x434d4982
#define AC97_ID_CM9761_83 0x434d4983 #define AC97_ID_CM9761_83 0x434d4983
#define AC97_ID_ST7597 0x53544d02
#define AC97_ID_ST_AC97_ID4 0x53544d04
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