提交 031005f7 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

ALSA: hda - disable amp override on non-HP machines

Some machines with Cx5045 seem to have no problem with the volume
over 0dB on NID 0x17.  Disable amp overrides for other devices but HP.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 4a3b6983
......@@ -1005,15 +1005,19 @@ static int patch_cxt5045(struct hda_codec *codec)
#endif
}
/*
* Fix max PCM level to 0 dB
* (originall it has 0x2b steps with 0dB offset 0x14)
*/
snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
(0x14 << AC_AMPCAP_OFFSET_SHIFT) |
(0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(1 << AC_AMPCAP_MUTE_SHIFT));
switch (codec->subsystem_id >> 16) {
case 0x103c:
/* HP laptop has a really bad sound over 0dB on NID 0x17.
* Fix max PCM level to 0 dB
* (originall it has 0x2b steps with 0dB offset 0x14)
*/
snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
(0x14 << AC_AMPCAP_OFFSET_SHIFT) |
(0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) |
(0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
(1 << AC_AMPCAP_MUTE_SHIFT));
break;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册