diff options
author | Ariff Abdullah <ariff@FreeBSD.org> | 2007-04-19 13:54:22 +0000 |
---|---|---|
committer | Ariff Abdullah <ariff@FreeBSD.org> | 2007-04-19 13:54:22 +0000 |
commit | fd7390d6406d953b09095a5d5198b693be12eba8 (patch) | |
tree | d9fbbaabaab08fe8c778853a63dabbf1299cf8b4 /sys/dev/sound/pcm/ac97_patch.c | |
parent | b03cfe239638b8b94b3e652a9184ffbf372ed25d (diff) | |
download | src-fd7390d6406d953b09095a5d5198b693be12eba8.tar.gz src-fd7390d6406d953b09095a5d5198b693be12eba8.zip |
- AC97 quirk / patch cleanups. Most quirks doesn't work in general sense
and should only be applied on certain specific card / vendor, hence the
addition of ac97_getsubvendor().
- Fix low volume issue on several MSI laptops through ALC655 quirk.
Reported/Tested by: Christian Mueller
<raptor-freebsd-multimedia@xpls.de>
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=168861
Diffstat (limited to 'sys/dev/sound/pcm/ac97_patch.c')
-rw-r--r-- | sys/dev/sound/pcm/ac97_patch.c | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/sys/dev/sound/pcm/ac97_patch.c b/sys/dev/sound/pcm/ac97_patch.c index 1be08522971c..1db0a989fd90 100644 --- a/sys/dev/sound/pcm/ac97_patch.c +++ b/sys/dev/sound/pcm/ac97_patch.c @@ -49,19 +49,49 @@ void ad198x_patch(struct ac97_info* codec) void ad1981b_patch(struct ac97_info* codec) { -#if 0 - ac97_wrcd(codec, AC97_AD_JACK_SPDIF, - ac97_rdcd(codec, AC97_AD_JACK_SPDIF) | 0x0800); -#endif + /* + * Enable headphone jack sensing. + */ + switch (ac97_getsubvendor(codec)) { + case 0x02d91014: /* IBM Thinkcentre */ + ac97_wrcd(codec, AC97_AD_JACK_SPDIF, + ac97_rdcd(codec, AC97_AD_JACK_SPDIF) | 0x0800); + break; + default: + break; + } } void cmi9739_patch(struct ac97_info* codec) { /* - * Few laptops (notably ASUS W1000N) need extra register - * initialization to power up the internal speakers. + * Few laptops need extra register initialization + * to power up the internal speakers. + */ + switch (ac97_getsubvendor(codec)) { + case 0x18431043: /* ASUS W1000N */ + ac97_wrcd(codec, AC97_REG_POWER, 0x000f); + ac97_wrcd(codec, AC97_MIXEXT_CLFE, 0x0000); + ac97_wrcd(codec, 0x64, 0x7110); + break; + default: + break; + } +} + +void alc655_patch(struct ac97_info* codec) +{ + /* + * MSI (Micro-Star International) specific EAPD quirk. */ - ac97_wrcd(codec, AC97_REG_POWER, 0x000f); - ac97_wrcd(codec, AC97_MIXEXT_CLFE, 0x0000); - ac97_wrcd(codec, 0x64, 0x7110); + switch (ac97_getsubvendor(codec)) { + case 0x00611462: /* MSI S250 */ + case 0x01311462: /* MSI S270 */ + case 0x01611462: /* LG K1 Express */ + case 0x03511462: /* MSI L725 */ + ac97_wrcd(codec, 0x7a, ac97_rdcd(codec, 0x7a) & 0xfffd); + break; + default: + break; + } } |