diff options
Diffstat (limited to 'sound/pci/ac97/ac97_patch.c')
-rw-r--r-- | sound/pci/ac97/ac97_patch.c | 38 |
1 files changed, 38 insertions, 0 deletions
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 | */ | ||
2879 | static 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 */ | ||
2883 | AC97_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. */ | ||
2886 | AC97_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. */ | ||
2889 | AC97_SINGLE("Smart Low Power Mode", 0x6c, 4, 3, 0), | ||
2890 | }; | ||
2891 | |||
2892 | static 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 | |||
2901 | static struct snd_ac97_build_ops patch_ucb1400_ops = { | ||
2902 | .build_specific = patch_ucb1400_specific, | ||
2903 | }; | ||
2904 | |||
2905 | int 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 | } | ||