From: Takashi Iwai Date: Tue, 29 May 2007 17:01:37 +0000 (+0200) Subject: [ALSA] hda-codec - Fix STAC922x capture boost level X-Git-Tag: v2.6.23-rc1~215^2~82 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=807a463603a2e014f36e88317aa5e07c15887fcd;p=linux-2.6 [ALSA] hda-codec - Fix STAC922x capture boost level STAC922x provides the capture boost level up to 4, but actually it works only up to 2. Since the range of the mixer is automatically defined from amp-capability bits, we need to override the value beforehand. snd_hda_override_amp_caps() is introduced for this purpose. The function patch_stac922x() calls this for NID 0x12 (Mux Capture Volume). This should fix another recording problem on Intel Macs. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index dd005ed89f..addcb2a0ae 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -2127,6 +2127,13 @@ static int patch_stac922x(struct hda_codec *codec) codec->patch_ops = stac92xx_patch_ops; + /* Fix Mux capture level; max to 2 */ + snd_hda_override_amp_caps(codec, 0x12, HDA_OUTPUT, + (0 << AC_AMPCAP_OFFSET_SHIFT) | + (2 << AC_AMPCAP_NUM_STEPS_SHIFT) | + (0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) | + (0 << AC_AMPCAP_MUTE_SHIFT)); + return 0; }