From: Takashi Iwai <tiwai@suse.de>
Subject: ALSA: hda - Add hint for suppressing lower cap for IDT codecs
Patch-mainline: Never
References: bnc#812332

IDT codec driver gives the cap to the lowest dB range when the volume
resolution is too high.  This was a workaround for the weird percent
appearance in alsamixer & co when the raw values are used.
Meanwhile, SLED11 updated PulseAudio and GNOME mixer that handle the
volume in dB level well, and this low cap is rather confusing.

This patch adds a special hint string for IDT codec so that the HP
preload image can add this hint and disable the low dB cap check.

Since 3.9 and later upstream driver already dropped the low cap check,
we don't have to care about the patch-mainline tag :)

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_sigmatel.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3161,7 +3161,8 @@ static int create_controls_idx(struct hd
 	char name[32];
 	int err;
 
-	if (!spec->check_volume_offset) {
+	if (!spec->check_volume_offset &&
+	    snd_hda_get_bool_hint(codec, "check_volume_offset") != 0) {
 		unsigned int caps, step, nums, db_scale;
 		caps = query_amp_caps(codec, nid, HDA_OUTPUT);
 		step = (caps & AC_AMPCAP_STEP_SIZE) >>
