Commit 48ecb7e8 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Avoid overload of PCM volume on Cx5045 codec

The PCM volume of Cx5045 codec has overload that isn't useful but
rather harmful.  Add a hack to override the amp info to set the max
level 0 dB.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 8e9068b1
...@@ -826,6 +826,17 @@ static int patch_cxt5045(struct hda_codec *codec) ...@@ -826,6 +826,17 @@ static int patch_cxt5045(struct hda_codec *codec)
spec->init_verbs[0] = cxt5045_test_init_verbs; spec->init_verbs[0] = cxt5045_test_init_verbs;
#endif #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));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment