Created attachment 121091 [details] Output of alsa-info under Kernel 3.12.5 and snd_hda_intel "model" option "6stack" On a machine with HDA Intel Audio and an AD1988 codec (ASUS P5B board), running Kernel 3.12.5 causes the line-in hardware volume to span its full 0-54 range over a Pulseaudio volume range of 0-20724, instead of being mapped to the full 0-65536 Pulseaudio volume range, as is the case when running Kernels 3.11.9 and earlier. This causes previously suitable line-in mixer volumes to clip severely. The cause looks to be the 3.12.5 Kernel incorrectly reporting the hardware dB step, which manifests as an improper max_dB value calculated by alsa-lib and passed to Pulseaudio: 3.11.9: [pulseaudio][modules/alsa/alsa-mixer.c:2789 pa_alsa_path_dump()] Path analog-input-linein (Line In), direction=2, priority=81, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=54, min_dB=-58.5, max_dB=22.5 3.12.5: [pulseaudio][modules/alsa/alsa-mixer.c:2789 pa_alsa_path_dump()] Path analog-input-linein (Line In), direction=2, priority=81, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=54, min_dB=-58.5, max_dB=52.5 (A max_dB of 52.5 is reported for both mic inputs under both Kernels.) The following snd_hda_intel model options were tried without effect: <none/auto>, 6stack, and 6stack-dig. An alsa-info dump is attached. The associated Red Hat bug is https://bugzilla.redhat.com/show_bug.cgi?id=1047204
It's no bug from the driver perspective. The HD-audio driver provides "Line Boost" control as well as "Mic Boost" and "Front Mic Boost". This gives up to +30dB, but only if set. PA seems manipulating this control automatically. The control has been available for other codec drivers for long time, so it's nothing new. It's seen on AD codecs now, though, just because AD codec driver adapts the generic parser recently. That being said, all the exposed dB information is correct. The rest is an issue of PulseAudio, if any.
Meanwhile, it'd be relatively easy to suppress the line boost controls like the patch below. The line boost control was added by popular demands, so it should be still enabled as default. But there can be some case like yours where it's not desired. The extra hint like this patch would be helpful in such a case. You can pass it via the firmware patch option, as mentioned in HD-Audio.txt.
Created attachment 121101 [details] Patch to add line_boost hint
Thank you for the explanation, and for providing the line_boost=0 driver option. I've filed a bug with Pulseaudio: https://bugs.freedesktop.org/show_bug.cgi?id=73336
most user don't expect boost at line in, i think the default should be false
which BIOS version are you using ? Line In should be stereo Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="Line Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x00003737: IN OUT Detect Trigger ImpSense Vref caps: HIZ 50 GRD 80 100 Pin Default 0x01813021: [Jack] Line In at Ext Rear Conn = 1/8, Color = Blue DefAssociation = 0x2, Sequence = 0x1 Pin-ctls: 0x20: IN VREF_HIZ Unsolicited: tag=03, enabled=1 Connection: 1 0x2c Node 0x1a [Pin Complex] wcaps 0x400000: Mono Control: name="Line Phantom Jack", index=0, device=0 Pincap 0x00000020: IN Pin Default 0x918711f0: [Fixed] Line In at Int Rear Conn = Analog, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN
AD1988A/AD1988B HD AUDIO WIDGETS Table 10. Node ID Name Type Description 15 PORT-C Pin complex Rear panel line-in jack 19 Mixer Power-Down Power widget Powers down the analog mixer and associated amps 1A Analog PCBEEP Pin complex External analog PCBEEP signal input