At Mon, 08 Oct 2012 18:52:26 +0200, Julien Danjou wrote:
On Mon, Oct 08 2012, Takashi Iwai wrote:
Yep, as David pointed out, the beep control overrides the amp setup. And your previous result suggested that we shouldn't use this beep path either (except for unmuting it), otherwise you get a noise again.
So, the patch below is the revised version. It removes the beep control but still opens the path to NID 0x1d.
It does remove the beep control, and I think it therefore break the beep functionnality: I've no sound when echoing '\a'. But that's likely to be expected anyhow. :-/
Doesn't the beep work if you load pcspkr module? It should be there independently.
But yeah, definitely, I've no noise anymore in this case with this patch.
Now, I can still make the noise come back when "speaker" or "master" is muted. This is definitely not a side effect of your patch, I just didn't raise it before.
Hm, then maybe the effect of removing noise appears no matter which input of NID 0x0b be unmuted?
This diff is between "no noise" (= just loaded the module with your patch) and "noise with master muted":
diff -u /tmp/no-noise.txt /tmp/noise-master-mute.txt --- /tmp/no-noise.txt 2012-10-08 18:36:44.601047347 +0200 +++ /tmp/noise-master-mute.txt 2012-10-08 18:37:02.221050163 +0200 @@ -3,7 +3,7 @@ !!ALSA Information Script v 0.4.61 !!################################
-!!Script ran on: Mon Oct 8 16:36:44 UTC 2012 +!!Script ran on: Mon Oct 8 16:37:02 UTC 2012
!!Linux Distribution @@ -260,7 +260,7 @@ ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Speaker Phantom Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
- Amp-Out vals: [0x00 0x00]
- Amp-Out vals: [0x80 0x80] Pincap 0x00010050: OUT EAPD Balanced EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A
This diff is between "no noise" (= just loaded the module with your patch) and "noise with speaker muted":
diff -u /tmp/no-noise.txt /tmp/noise-speaker-mute.txt --- /tmp/no-noise.txt 2012-10-08 18:36:44.601047347 +0200 +++ /tmp/noise-speaker-mute.txt 2012-10-08 18:37:10.913051519 +0200 @@ -3,7 +3,7 @@ !!ALSA Information Script v 0.4.61 !!################################
-!!Script ran on: Mon Oct 8 16:36:44 UTC 2012 +!!Script ran on: Mon Oct 8 16:37:10 UTC 2012
!!Linux Distribution @@ -260,7 +260,7 @@ ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Speaker Phantom Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
- Amp-Out vals: [0x00 0x00]
- Amp-Out vals: [0x80 0x80] Pincap 0x00010050: OUT EAPD Balanced EAPD 0x2: EAPD Pin Default 0x90170110: [Fixed] Speaker at Int N/A
So, obviously muting the amp triggers the noise. BTW, does the noise come only from speaker, not from headphone, correct?
Related tests: what happens if you mute both input amps of the node 0x0d? This is a mixer widget between DAC and the speaker pin. Does this widget work as a proper mute/unmute point without causing noise?
Now, I've discovered one more thing, don't know if you know. This is how I managed to REALLY mute the speakers, the noise, everything (even playing a sound file with everything unmuted makes no sound):
% diff -u /tmp/sound.txt /tmp/no-sound-at-all.txt --- /tmp/sound.txt 2012-10-08 18:48:02.605161041 +0200 +++ /tmp/no-sound-at-all.txt 2012-10-08 18:47:50.453158964 +0200 @@ -3,7 +3,7 @@ !!ALSA Information Script v 0.4.61 !!################################
-!!Script ran on: Mon Oct 8 16:48:02 UTC 2012 +!!Script ran on: Mon Oct 8 16:47:50 UTC 2012
!!Linux Distribution @@ -267,7 +267,7 @@ Conn = Analog, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Misc = NO_PRESENCE
- Pin-ctls: 0x40: OUT
- Pin-ctls: 0x00: Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 2
This essentially disables the output of the speaker pin.
When doing that, I cannot hear anything, because it seems to disconnect the speakers. My idea would be to set this pin to 0x00 instead of 0x40 when "Speakers" are set to mute (I don't know about master though). WDYT?
Possible, but a bit hackish. Let's see...
Takashi