summaryrefslogtreecommitdiff
path: root/sound/pci/ac97/ac97_patch.c
diff options
context:
space:
mode:
authorCharl Coetzee <ccoetzee@interalia.ca>2006-02-09 11:48:21 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:28:39 +0100
commitba22429d3ea3b9945735b88d4dde74711171ffab (patch)
tree7b25c97061ca0c218e374620f341d5e988d48690 /sound/pci/ac97/ac97_patch.c
parent50dabc2d1139ba01362418874152aeeb591a4544 (diff)
[ALSA] ac97 - Added a codec patch for LM4550
Modules: AC97 Codec Added a codec patch for LM4550. It sets up a static volume resolution table. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97/ac97_patch.c')
-rw-r--r--sound/pci/ac97/ac97_patch.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 8bc79cbe3215..5c03b4b6f5c1 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -2825,3 +2825,34 @@ int mpatch_si3036(struct snd_ac97 * ac97)
snd_ac97_write_cache(ac97, 0x68, 0);
return 0;
}
+
+/*
+ * LM 4550 Codec
+ *
+ * We use a static resolution table since LM4550 codec cannot be
+ * properly autoprobed to determine the resolution via
+ * check_volume_resolution().
+ */
+
+static struct snd_ac97_res_table lm4550_restbl[] = {
+ { AC97_MASTER, 0x1f1f },
+ { AC97_HEADPHONE, 0x1f1f },
+ { AC97_MASTER_MONO, 0x001f },
+ { AC97_PC_BEEP, 0x001f }, /* LSB is ignored */
+ { AC97_PHONE, 0x001f },
+ { AC97_PHONE, 0x001f },
+ { AC97_MIC, 0x001f },
+ { AC97_LINE, 0x1f1f },
+ { AC97_CD, 0x1f1f },
+ { AC97_VIDEO, 0x1f1f },
+ { AC97_AUX, 0x1f1f },
+ { AC97_PCM, 0x1f1f },
+ { AC97_REC_GAIN, 0x0f0f },
+ { } /* terminator */
+};
+
+int patch_lm4550(struct snd_ac97 *ac97)
+{
+ ac97->res_table = lm4550_restbl;
+ return 0;
+}