Re: [alsa-devel] Headphone output problems with HP ProDesk 600 G1 (Realtek ALC221)
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at: http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
I tried using hda-analyzer but it fails on this machine with:
ValueError: wrong proc file format (unknown dig1 bit 'KAE')
Any suggestions for things to try to debug this?
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
HP ProDesk 600 G1 SFF is an All-In-One pc , should headphone and line out share the volume control if headphone can mute the line out or speaker
Simple mixer control 'Auto-Mute Mode',0 Capabilities: enum Items: 'Disabled' 'Speaker Only' 'Line Out Speaker' Item0: 'Line Out Speaker'
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x00 0x00] Converter: stream=8, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="PCM Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Device: name="ALC221 Analog", type="Audio", device=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x57 0x57] Converter: stream=8, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM
On Mon, Feb 17, 2014 at 8:13 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at:
http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
I tried using hda-analyzer but it fails on this machine with:
ValueError: wrong proc file format (unknown dig1 bit 'KAE')
Any suggestions for things to try to debug this?
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
With this patch, I get no audio output at all (totally silent on all ports). Even with playing around with alsamixer and muting/unmuting outputs I could not get anything coming out.
The alsa-info output from the patched kernel is here:
http://www.alsa-project.org/db/?f=df5874b4fdc01fd6d2c9541c9cde380fe844ac6c
The diff in the codec output from before is:
Pin-ctls: 0x00: Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out - Control: name="PCM Playback Switch", index=0, device=0 + Control: name="Front Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 @@ -186,7 +186,7 @@ ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Mic Jack", index=0, device=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0 - Amp-In vals: [0x01 0x01] + Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x0000373c: IN OUT HP Detect @@ -203,7 +203,7 @@ ControlAmp: chs=3, dir=In, idx=0, ofs=0 Control: name="Line Jack", index=0, device=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x2f, mute=0 - Amp-In vals: [0x00 0x00] + Amp-In vals: [0x01 0x01] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x00000034: IN OUT Detect @@ -256,6 +256,6 @@ 0x18 0x19 0x1a* 0x1b 0x1d 0x0b 0x12 Node 0x23 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 - Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] + Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] Connection: 6 0x18 0x19 0x1a 0x1b 0x1d 0x0b
HP ProDesk 600 G1 SFF is an All-In-One pc , should headphone and line out share the volume control if headphone can mute the line out or speaker
Simple mixer control 'Auto-Mute Mode',0 Capabilities: enum Items: 'Disabled' 'Speaker Only' 'Line Out Speaker' Item0: 'Line Out Speaker'
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x00 0x00] Converter: stream=8, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="PCM Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Device: name="ALC221 Analog", type="Audio", device=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x57 0x57] Converter: stream=8, channel=0 PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM
On Tue, Feb 18, 2014 at 10:22 AM, Robert Hancock hancockrwd@gmail.com wrote:
On Mon, Feb 17, 2014 at 8:13 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at:
http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
I tried using hda-analyzer but it fails on this machine with:
ValueError: wrong proc file format (unknown dig1 bit 'KAE')
Any suggestions for things to try to debug this?
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
With this patch, I get no audio output at all (totally silent on all ports). Even with playing around with alsamixer and muting/unmuting outputs I could not get anything coming out.
I've created a Bugzilla report here:
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
HP ProDesk 600 G1 SFF
Do SFF mean small form factor model ?
HD audio with Realtek ALC221 codec DTS Studio Sound audio management technology Microphone and headphone front ports (3.5mm) Line-out and Line-In rear Ports (3.5mm) Multi-streaming capable Internal speaker (standard)
Since all-in-one-pc model is usng ALC3228
DTS Sound+™; Realtek ALC 3228 Audio – 16 & 24-bit PCM; High performance integrated stereo speakers; Volume control and mute buttons; Stereo headphone jack; Microphone in; Stereo line out
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at:
http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
With this patch, I get no audio output at all (totally silent on all ports). Even with playing around with alsamixer and muting/unmuting outputs I could not get anything coming out.
The alsa-info output from the patched kernel is here:
http://www.alsa-project.org/db/?f=df5874b4fdc01fd6d2c9541c9cde380fe844ac6c
autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line speaker_outs=1 (0x17/0x0/0x0/0x0/0x0) hp_outs=1 (0x21/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x1a Line=0x1b
do you mean one of the front panel jacks support TRRS headset ?
use hda-jack-sense-test to find the nodes of front panel jacks and rear panel jacks
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x00 0x00]
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="PCM Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0
if small form factor is multistreaming capable , line out and headphone have to use different audio output 0x02 and 0x03 instead of sharing the same audio output 0x03
http://www.intel.com/support/motherboards/desktop/sb/CS-034206.htm
you still need to modify patch_realtek.c
spec->gen.indep_hp = 1;
@@ -1493,16 +1497,26 @@ static bool indep_hp_possible(struct hda_codec *codec) struct hda_gen_spec *spec = codec->spec; struct auto_pin_cfg *cfg = &spec->autocfg; struct nid_path *path; + hda_nid_t nid; int i, idx;
- if (cfg->line_out_type == AUTO_PIN_HP_OUT) - idx = spec->out_paths[0]; - else - idx = spec->hp_paths[0]; - path = snd_hda_get_path_from_idx(codec, idx); + if (cfg->line_out_type != AUTO_PIN_LINE_OUT) + return false; + + path = snd_hda_get_path_from_idx(codec, spec->out_paths[0]); if (!path) return false; + nid = path->path[0];
+ idx = spec->hp_paths[0]; + path = snd_hda_get_path_from_idx(codec, idx); + if (!path) + return false; + + /* Headphone and Line Out must use different Audio Output */ + if (path->path[0] == nid) + return false; + /* assume no path conflicts unless aamix is involved */ if (!spec->mixer_nid || !is_nid_contained(path, spec->mixer_nid)) return true;
On Tue, Feb 18, 2014 at 6:52 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
HP ProDesk 600 G1 SFF
Do SFF mean small form factor model ?
HD audio with Realtek ALC221 codec DTS Studio Sound audio management technology Microphone and headphone front ports (3.5mm) Line-out and Line-In rear Ports (3.5mm) Multi-streaming capable Internal speaker (standard)
Since all-in-one-pc model is usng ALC3228
DTS Sound+(tm); Realtek ALC 3228 Audio - 16 & 24-bit PCM; High performance integrated stereo speakers; Volume control and mute buttons; Stereo headphone jack; Microphone in; Stereo line out
Yes, this is the small form factor. It is definitely ALC221 (I checked the codec chip on the system board).
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at:
http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
With this patch, I get no audio output at all (totally silent on all ports). Even with playing around with alsamixer and muting/unmuting outputs I could not get anything coming out.
The alsa-info output from the patched kernel is here:
http://www.alsa-project.org/db/?f=df5874b4fdc01fd6d2c9541c9cde380fe844ac6c
autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line speaker_outs=1 (0x17/0x0/0x0/0x0/0x0) hp_outs=1 (0x21/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x1a Line=0x1b
do you mean one of the front panel jacks support TRRS headset ?
I think that is what the labelling is indicating, yes.
use hda-jack-sense-test to find the nodes of front panel jacks and rear panel jacks
From what I can tell:
When the headphone-only jack is plugged into, nothing happens with jack sensing When the headphone/mic jack is plugged into, both Pin 0x1a (Black Mic) and Pin 0x21 (Black HP Out) show present When the rear line out jack is plugged into, Pin 0x14 (Green Line Out) shows present When the rear line in jack is plugged into, nothing happens with jack sensing
Node 0x02 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="Speaker Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0 Amp-Out vals: [0x00 0x00]
Node 0x03 [Audio Output] wcaps 0x1d: Stereo Amp-Out Control: name="PCM Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0
if small form factor is multistreaming capable , line out and headphone have to use different audio output 0x02 and 0x03 instead of sharing the same audio output 0x03
http://www.intel.com/support/motherboards/desktop/sb/CS-034206.htm
you still need to modify patch_realtek.c
spec->gen.indep_hp = 1;
I did try enabling the indep_hp hint in the codec sysfs files as described in Documentation/sound/alsa/HD-Audio.txt. That did get the "Independent HP" mixer control to show up and I had the separate PCM devices (hw:1,0 and hw:1,2). However playing audio into both of those produced the same output, and it still had the loud clicking/popping noises and distorted audio (sounds like clipping even though the audio isn't very loud) on the headphone jack. Let me know if you think your patch would do anything more, and I can try it.
I did notice some strange things when playing with alsamixer: Playing with the "Line" mixer control changes the audio quality (higher levels seem to be less distorted). Changing the Input Source selection under the capture settings seems to affect the amount of distortion and clicking noises, too. I'm not sure why these settings should have any effect on playback. It's also not very repeatable - it seems like on different boots and/or power cycles, or depending on what I've been playing with before, the results are different. It's like the codec is somehow misconfigured and not routing signals the way they should be.
@@ -1493,16 +1497,26 @@ static bool indep_hp_possible(struct hda_codec *codec) struct hda_gen_spec *spec = codec->spec; struct auto_pin_cfg *cfg = &spec->autocfg; struct nid_path *path;
- hda_nid_t nid; int i, idx;
- if (cfg->line_out_type == AUTO_PIN_HP_OUT)
idx = spec->out_paths[0];
- else
idx = spec->hp_paths[0];
- path = snd_hda_get_path_from_idx(codec, idx);
if (cfg->line_out_type != AUTO_PIN_LINE_OUT)
return false;
path = snd_hda_get_path_from_idx(codec, spec->out_paths[0]); if (!path) return false;
nid = path->path[0];
idx = spec->hp_paths[0];
path = snd_hda_get_path_from_idx(codec, idx);
if (!path)
return false;
/* Headphone and Line Out must use different Audio Output */
if (path->path[0] == nid)
return false;
/* assume no path conflicts unless aamix is involved */ if (!spec->mixer_nid || !is_nid_contained(path, spec->mixer_nid)) return true;
2014-02-19 9:33 GMT+08:00 Robert Hancock hancockrwd@gmail.com:
On Tue, Feb 18, 2014 at 6:52 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
I have a HP ProDesk 600 G1 machine which seems to have some strange
behavior with the front headphone jack(s) running under Fedora 20 (running 3.13.2 kernel):
HP ProDesk 600 G1 SFF
Do SFF mean small form factor model ?
HD audio with Realtek ALC221 codec DTS Studio Sound audio management technology Microphone and headphone front ports (3.5mm) Line-out and Line-In rear Ports (3.5mm) Multi-streaming capable Internal speaker (standard)
Yes, this is the small form factor. It is definitely ALC221 (I checked the codec chip on the system board).
This machine has two front jacks: a headphone jack and a
microphone/headphone jack. When the headphones are plugged into the headphone jack, there's usually no change in the sound outputs list in the Sound control panel. The audio (mostly) works if the audio output device is set to Analog Output, but sometimes spuriously changes back to Speakers and the headphone output stops working (I suspect maybe from a spurious jack-sensing event, though I'm not certain). More confusingly, a couple of times I have gotten it into the state (through various fiddling with jacks and playing in the Sound control panel) where plugging into this jack is detected and causes the Headphone output to be selected in the control panel. I haven't been able to figure out consistently what causes this to happen.
If the headphone is plugged into the microphone/headphone jack, then
the control panel consistently switches to the Headphone output and consistently switches back the way it was when it's unplugged. However, there's no actual audio output coming out of that jack. (From some of the HP manuals, it sounds like with the Windows driver, when you plug into this jack, it's supposed to pop up a prompt asking you whether you want to use it as a microphone or headphones.)
The other strange thing is that intermittently, on the headphone
jack
you'll start getting a bunch of loud static (clicking noises) and any actual audio playback becomes very faint and distorted.
I'm guessing perhaps something isn't being initialized/setup
properly
in the codec, causing this kind of erratic behavior. The alsa-info output is uploaded at:
http://www.alsa-project.org/db/?f=594e837b7af07ffbe3473cf807465bc81a587880
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x00010014: OUT EAPD Detect EAPD 0x2: EAPD Pin Default 0x01014020: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0
it is a driver bug which assign PCM playback Switch to Line Out Jack
try the patch https://bugzilla.kernel.org/attachment.cgi?id=124971
With this patch, I get no audio output at all (totally silent on all ports). Even with playing around with alsamixer and muting/unmuting outputs I could not get anything coming out.
The alsa-info output from the patched kernel is here:
http://www.alsa-project.org/db/?f=df5874b4fdc01fd6d2c9541c9cde380fe844ac6c
autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line speaker_outs=1 (0x17/0x0/0x0/0x0/0x0) hp_outs=1 (0x21/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x1a Line=0x1b
do you mean one of the front panel jacks support TRRS headset ?
I think that is what the labelling is indicating, yes.
http://h20566.www2.hp.com/portal/site/hpsc/public/psi/manualsResults/?sp4ts....
refer to the maintenance and service guide
When a device is plugged into the Microphone/Headph one Connector, a dialog box will pop up asking if you want to use the connector for a microphone Line-In device or a headphone. You can reconfigure the connector at any time by double-clicking the Audio Manager icon in the Windows taskbar
the hardware reference guide and Illustrated Parts and Service map microphone jack and headphone jack
it seem not support TRRS headset
Do the icon really show a headset ( headphone with mic) ?
use hda-jack-sense-test to find the nodes of front panel jacks and rear panel jacks
From what I can tell:
When the headphone-only jack is plugged into, nothing happens with jack sensing When the headphone/mic jack is plugged into, both Pin 0x1a (Black Mic) and Pin 0x21 (Black HP Out) show present When the rear line out jack is plugged into, Pin 0x14 (Green Line Out) shows present When the rear line in jack is plugged into, nothing happens with jack sensing
did you use "-a" option for hda-jack-sense-test ?
On Tue, Feb 18, 2014 at 8:58 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line speaker_outs=1 (0x17/0x0/0x0/0x0/0x0) hp_outs=1 (0x21/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x1a Line=0x1b
do you mean one of the front panel jacks support TRRS headset ?
I think that is what the labelling is indicating, yes.
http://h20566.www2.hp.com/portal/site/hpsc/public/psi/manualsResults/?sp4ts....
refer to the maintenance and service guide
When a device is plugged into the Microphone/Headph one Connector, a dialog box will pop up asking if you want to use the connector for a microphone Line-In device or a headphone. You can reconfigure the connector at any time by double-clicking the Audio Manager icon in the Windows taskbar
the hardware reference guide and Illustrated Parts and Service map microphone jack and headphone jack
it seem not support TRRS headset
Do the icon really show a headset ( headphone with mic) ?
I suppose not, it just has a headphone and a microphone. I assume it's quite possible that it only supports one at a time.
use hda-jack-sense-test to find the nodes of front panel jacks and rear panel jacks
From what I can tell:
When the headphone-only jack is plugged into, nothing happens with jack sensing When the headphone/mic jack is plugged into, both Pin 0x1a (Black Mic) and Pin 0x21 (Black HP Out) show present When the rear line out jack is plugged into, Pin 0x14 (Green Line Out) shows present When the rear line in jack is plugged into, nothing happens with jack sensing
did you use "-a" option for hda-jack-sense-test ?
That did give one more result: when plugging in the headphone-only jack, 0x18 (Not connected) reports present. I'm not sure if node 0x18 is actually related to the headphone for anything other than the jack sensing, though, as none of the settings for that node in hda_analyzer have any effect on the audio output on that jack (even the mute).
As I mentioned in the Bugzilla report, as it turns out, with default settings I can get audio to play out from the headphone jack with the "Analog Output" mode selected in PulseAudio. The big problem is that the audio is distorted with hiss and popping noises, which I haven't been able to figure out at all. Any suggestions?
2014-02-20 0:31 GMT+08:00 Robert Hancock hancockrwd@gmail.com:
On Tue, Feb 18, 2014 at 8:58 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
autoconfig: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line speaker_outs=1 (0x17/0x0/0x0/0x0/0x0) hp_outs=1 (0x21/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0x1a Line=0x1b
do you mean one of the front panel jacks support TRRS headset ?
I think that is what the labelling is indicating, yes.
http://h20566.www2.hp.com/portal/site/hpsc/public/psi/manualsResults/?sp4ts....
refer to the maintenance and service guide
When a device is plugged into the Microphone/Headph one Connector, a dialog box will pop up asking if you want to use the connector for a microphone Line-In device or a headphone. You can reconfigure the connector at any time by double-clicking the Audio Manager icon in the Windows
taskbar
the hardware reference guide and Illustrated Parts and Service map microphone jack and headphone jack
it seem not support TRRS headset
Do the icon really show a headset ( headphone with mic) ?
I suppose not, it just has a headphone and a microphone. I assume it's quite possible that it only supports one at a time.
headphone mic jack mode is supported for those computer with only one jack and alsa driver use special sequencer number to identify
the pinctl of a retasktable jack is changed from OUT to IN and vice/versa
the pin complex is retaskable when the pincap support both IN and OUT
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=ced4...
use hda-jack-sense-test to find the nodes of front panel jacks and rear panel jacks
From what I can tell:
When the headphone-only jack is plugged into, nothing happens with jack sensing When the headphone/mic jack is plugged into, both Pin 0x1a (Black Mic) and Pin 0x21 (Black HP Out) show present When the rear line out jack is plugged into, Pin 0x14 (Green Line Out) shows present When the rear line in jack is plugged into, nothing happens with jack sensing
did you use "-a" option for hda-jack-sense-test ?
That did give one more result: when plugging in the headphone-only
jack, 0x18 (Not connected) reports present. I'm not sure if node 0x18 is actually related to the headphone for anything other than the jack sensing, though, as none of the settings for that node in hda_analyzer have any effect on the audio output on that jack (even the mute).
did you set pin ctl to OUT HP of node 0x18 ?
As I mentioned in the Bugzilla report, as it turns out, with default settings I can get audio to play out from the headphone jack with the "Analog Output" mode selected in PulseAudio. The big problem is that the audio is distorted with hiss and popping noises, which I haven't been able to figure out at all. Any suggestions?
do pulseaudio log show any path is removed since you don't have headphone playback volume or front playback volume , front playback switch?
try hint jack_detect=0 to disable all jack detection of all jacks
and use hda-analyzer to mute /unmute the pin complex of line out and headphone
the other thing you can try is use hda-jack-retask to change internal speaker as [N/A] , this allow line out and headphone get it own volume control and audio output
On Wed, Feb 19, 2014 at 7:41 PM, Raymond Yau superquad.vortex2@gmail.com wrote:
That did give one more result: when plugging in the headphone-only jack, 0x18 (Not connected) reports present. I'm not sure if node 0x18 is actually related to the headphone for anything other than the jack sensing, though, as none of the settings for that node in hda_analyzer have any effect on the audio output on that jack (even the mute).
did you set pin ctl to OUT HP of node 0x18 ?
Setting OUT didn't seem to change anything. That node doesn't appear to support HP mode.
As I mentioned in the Bugzilla report, as it turns out, with default settings I can get audio to play out from the headphone jack with the "Analog Output" mode selected in PulseAudio. The big problem is that the audio is distorted with hiss and popping noises, which I haven't been able to figure out at all. Any suggestions?
do pulseaudio log show any path is removed since you don't have headphone playback volume or front playback volume , front playback switch?
Not sure quite what you mean. I've been doing most of my recent tests with PulseAudio not running, to eliminate that variable.
try hint jack_detect=0 to disable all jack detection of all jacks
and use hda-analyzer to mute /unmute the pin complex of line out and headphone
the other thing you can try is use hda-jack-retask to change internal speaker as [N/A] , this allow line out and headphone get it own volume control and audio output
I've tried all three of these now without any real success. Still that noise on the output. Think I might need to try some tests with Windows or other Linux versions to see if there is just some hardware problem on this machine.
participants (2)
-
Raymond Yau
-
Robert Hancock