aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharl Coetzee <ccoetzee@interalia.ca>2006-02-09 05:48:21 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:28:39 -0500
commitba22429d3ea3b9945735b88d4dde74711171ffab (patch)
tree7b25c97061ca0c218e374620f341d5e988d48690
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>
-rw-r--r--sound/pci/ac97/ac97_codec.c2
-rw-r--r--sound/pci/ac97/ac97_patch.c31
-rw-r--r--sound/pci/ac97/ac97_patch.h1
3 files changed, 33 insertions, 1 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 124c1bc4cb92..38b6c65d40c3 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -150,7 +150,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
150{ 0x49544561, 0xffffffff, "IT2646E", patch_it2646, NULL }, 150{ 0x49544561, 0xffffffff, "IT2646E", patch_it2646, NULL },
151{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk 151{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk
152{ 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, 152{ 0x4e534331, 0xffffffff, "LM4549", NULL, NULL },
153{ 0x4e534350, 0xffffffff, "LM4550", NULL, NULL }, 153{ 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix
154{ 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, 154{ 0x50534304, 0xffffffff, "UCB1400", NULL, NULL },
155{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, 155{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH },
156{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, 156{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL },
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)
2825 snd_ac97_write_cache(ac97, 0x68, 0); 2825 snd_ac97_write_cache(ac97, 0x68, 0);
2826 return 0; 2826 return 0;
2827} 2827}
2828
2829/*
2830 * LM 4550 Codec
2831 *
2832 * We use a static resolution table since LM4550 codec cannot be
2833 * properly autoprobed to determine the resolution via
2834 * check_volume_resolution().
2835 */
2836
2837static struct snd_ac97_res_table lm4550_restbl[] = {
2838 { AC97_MASTER, 0x1f1f },
2839 { AC97_HEADPHONE, 0x1f1f },
2840 { AC97_MASTER_MONO, 0x001f },
2841 { AC97_PC_BEEP, 0x001f }, /* LSB is ignored */
2842 { AC97_PHONE, 0x001f },
2843 { AC97_PHONE, 0x001f },
2844 { AC97_MIC, 0x001f },
2845 { AC97_LINE, 0x1f1f },
2846 { AC97_CD, 0x1f1f },
2847 { AC97_VIDEO, 0x1f1f },
2848 { AC97_AUX, 0x1f1f },
2849 { AC97_PCM, 0x1f1f },
2850 { AC97_REC_GAIN, 0x0f0f },
2851 { } /* terminator */
2852};
2853
2854int patch_lm4550(struct snd_ac97 *ac97)
2855{
2856 ac97->res_table = lm4550_restbl;
2857 return 0;
2858}
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h
index 5060cb6f2ec3..adcaa04586cb 100644
--- a/sound/pci/ac97/ac97_patch.h
+++ b/sound/pci/ac97/ac97_patch.h
@@ -59,3 +59,4 @@ int patch_vt1616(struct snd_ac97 * ac97);
59int patch_vt1617a(struct snd_ac97 * ac97); 59int patch_vt1617a(struct snd_ac97 * ac97);
60int patch_it2646(struct snd_ac97 * ac97); 60int patch_it2646(struct snd_ac97 * ac97);
61int mpatch_si3036(struct snd_ac97 * ac97); 61int mpatch_si3036(struct snd_ac97 * ac97);
62int patch_lm4550(struct snd_ac97 * ac97);