summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-06-26 14:49:58 +0200
committerJaroslav Kysela <perex@perex.cz>2008-06-27 08:51:21 +0200
commit031005f78c8d0aebc17ddf7a34af9ffd48034d7d (patch)
treec1cf93a32ba54e99f3058f7fbf1464fcb6f9dd4d
parent4a3b6983232cd296ea260e06461d031f10065d63 (diff)
downloadblackbird-obmc-linux-031005f78c8d0aebc17ddf7a34af9ffd48034d7d.tar.gz
blackbird-obmc-linux-031005f78c8d0aebc17ddf7a34af9ffd48034d7d.zip
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: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--sound/pci/hda/patch_conexant.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index e3df8ac37076..64df8100593d 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -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;
}
OpenPOWER on IntegriCloud