Commit bd25b7ca authored by Ville Syrjala's avatar Ville Syrjala Committed by Jaroslav Kysela

[ALSA] ac97: Fix AD1819 volume range

AD1819 volume registers can hold extra bits which do not affect the
actual volume. Add a res_table to the codec patch to fix the problem.
PCM, line and mic volume were tested.
Signed-off-by: default avatarVille Syrjala <syrjala@sci.fi>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 93ed1503
...@@ -1395,6 +1395,17 @@ static void ad1888_resume(struct snd_ac97 *ac97) ...@@ -1395,6 +1395,17 @@ static void ad1888_resume(struct snd_ac97 *ac97)
#endif #endif
static const struct snd_ac97_res_table ad1819_restbl[] = {
{ AC97_PHONE, 0x9f1f },
{ AC97_MIC, 0x9f1f },
{ AC97_LINE, 0x9f1f },
{ AC97_CD, 0x9f1f },
{ AC97_VIDEO, 0x9f1f },
{ AC97_AUX, 0x9f1f },
{ AC97_PCM, 0x9f1f },
{ } /* terminator */
};
int patch_ad1819(struct snd_ac97 * ac97) int patch_ad1819(struct snd_ac97 * ac97)
{ {
unsigned short scfg; unsigned short scfg;
...@@ -1402,6 +1413,7 @@ int patch_ad1819(struct snd_ac97 * ac97) ...@@ -1402,6 +1413,7 @@ int patch_ad1819(struct snd_ac97 * ac97)
// patch for Analog Devices // patch for Analog Devices
scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG); scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG);
snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x7000); /* select all codecs */ snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x7000); /* select all codecs */
ac97->res_table = ad1819_restbl;
return 0; return 0;
} }
......
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