aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r--sound/pci/ac97/ac97_codec.c2
-rw-r--r--sound/pci/ac97/ac97_patch.c38
-rw-r--r--sound/pci/ac97/ac97_patch.h1
3 files changed, 40 insertions, 1 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index f82c636e99a9..e5d062d640df 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -156,7 +156,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
156{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk 156{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL, NULL }, // only guess --jk
157{ 0x4e534331, 0xffffffff, "LM4549", NULL, NULL }, 157{ 0x4e534331, 0xffffffff, "LM4549", NULL, NULL },
158{ 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix 158{ 0x4e534350, 0xffffffff, "LM4550", patch_lm4550, NULL }, // volume wrap fix
159{ 0x50534304, 0xffffffff, "UCB1400", NULL, NULL }, 159{ 0x50534304, 0xffffffff, "UCB1400", patch_ucb1400, NULL },
160{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH }, 160{ 0x53494c20, 0xffffffe0, "Si3036,8", mpatch_si3036, mpatch_si3036, AC97_MODEM_PATCH },
161{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL }, 161{ 0x54524102, 0xffffffff, "TR28022", NULL, NULL },
162{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL }, 162{ 0x54524106, 0xffffffff, "TR28026", NULL, NULL },
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 094cfc1f3a19..5267b006c5c8 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -2872,3 +2872,41 @@ int patch_lm4550(struct snd_ac97 *ac97)
2872 ac97->res_table = lm4550_restbl; 2872 ac97->res_table = lm4550_restbl;
2873 return 0; 2873 return 0;
2874} 2874}
2875
2876/*
2877 * UCB1400 codec (http://www.semiconductors.philips.com/acrobat_download/datasheets/UCB1400-02.pdf)
2878 */
2879static const struct snd_kcontrol_new snd_ac97_controls_ucb1400[] = {
2880/* enable/disable headphone driver which allows direct connection to
2881 stereo headphone without the use of external DC blocking
2882 capacitors */
2883AC97_SINGLE("Headphone Driver", 0x6a, 6, 1, 0),
2884/* Filter used to compensate the DC offset is added in the ADC to remove idle
2885 tones from the audio band. */
2886AC97_SINGLE("DC Filter", 0x6a, 4, 1, 0),
2887/* Control smart-low-power mode feature. Allows automatic power down
2888 of unused blocks in the ADC analog front end and the PLL. */
2889AC97_SINGLE("Smart Low Power Mode", 0x6c, 4, 3, 0),
2890};
2891
2892static int patch_ucb1400_specific(struct snd_ac97 * ac97)
2893{
2894 int idx, err;
2895 for (idx = 0; idx < ARRAY_SIZE(snd_ac97_controls_ucb1400); idx++)
2896 if ((err = snd_ctl_add(ac97->bus->card, snd_ctl_new1(&snd_ac97_controls_ucb1400[idx], ac97))) < 0)
2897 return err;
2898 return 0;
2899}
2900
2901static struct snd_ac97_build_ops patch_ucb1400_ops = {
2902 .build_specific = patch_ucb1400_specific,
2903};
2904
2905int patch_ucb1400(struct snd_ac97 * ac97)
2906{
2907 ac97->build_ops = &patch_ucb1400_ops;
2908 /* enable headphone driver and smart low power mode by default */
2909 snd_ac97_write(ac97, 0x6a, 0x0050);
2910 snd_ac97_write(ac97, 0x6c, 0x0030);
2911 return 0;
2912}
diff --git a/sound/pci/ac97/ac97_patch.h b/sound/pci/ac97/ac97_patch.h
index adcaa04586cb..741979217207 100644
--- a/sound/pci/ac97/ac97_patch.h
+++ b/sound/pci/ac97/ac97_patch.h
@@ -58,5 +58,6 @@ int patch_cm9780(struct snd_ac97 * ac97);
58int patch_vt1616(struct snd_ac97 * ac97); 58int 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 patch_ucb1400(struct snd_ac97 * ac97);
61int mpatch_si3036(struct snd_ac97 * ac97); 62int mpatch_si3036(struct snd_ac97 * ac97);
62int patch_lm4550(struct snd_ac97 * ac97); 63int patch_lm4550(struct snd_ac97 * ac97);