Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALC1220 DualCodec - changing to headphone (front panel) port doesn't work without toggling pro audio profile #299

Open
metronidazole opened this issue Mar 29, 2023 · 10 comments

Comments

@metronidazole
Copy link

metronidazole commented Mar 29, 2023

I have a Gigabyte x570 aorus pro motherboard with the ALC1220 audio device using the dualcodec model. I have two issues:

A. jack sense doesnt work. I'm not sure if this is a UCM thing, but in my desktop environment (KDE Plasma 5.27) the headphones port shows as "unplugged" in system settings, and hdajacksensetest shows it as not detected "Pin 0x1b (Green Headphone, Front side): present = No". this is a minor issue

B. more importantly, when i want to use my frontpanel headphones input, i have to do the following work around otherwise no sound comes out:

  1. Start with Profile set to 'analog stereo output' and port 'line out'

  2. Plug in headphones and set port to 'headphones (unplugged)'
    -> sound stops from speakers (rear line out port) and there is no output from the headphoens

  3. Set profile to pro audio
    -> audio comes through headphones (front port).

to return back to speakers (rear out)
4. Set profile to analog stereo output) and change the port to 'headphones (unplugged)' and then back to 'line out'
-> sound comes out of speakers

I have attached some debug info below:

alsa-info.txt
alsaucm.txt

Any help would be appreciated

@perexg
Copy link
Member

perexg commented Mar 29, 2023

You don't have dual codecs. Why you are using model=dual-codecs option ?

@metronidazole
Copy link
Author

It seemed the best choice. If no model is set, no UCM profile is used and I can't get any headphone output regardless of what I do.

@perexg
Copy link
Member

perexg commented Mar 29, 2023

Could you show output from alsa-info without any model specification ?

@metronidazole
Copy link
Author

Sure, attached
alsa-info2.txt

@perexg
Copy link
Member

perexg commented Mar 29, 2023

I don't see any problem at the first glance. Could you test output from native ALSA app? Like aplay -D plughw:0 <some_wav> or speaker-test -D plughw:0 -t sine ? Try to set the HP volume and Master volume in the alsamixer. The sound server should be suspended (if you get busy error).

@metronidazole
Copy link
Author

I don't get any output with those (even if I adjust via alsamixer), unless I first change the port to headphones in KDE system settings. If I do, I get output through my headphones. However I still don't get any output via pipewire apps.

@perexg
Copy link
Member

perexg commented Mar 29, 2023

Could you show output from /proc/asound/card0/codec#0 for working / non-working case ?

@metronidazole
Copy link
Author

Sure, here they are (this is with no kernel model option set), and me toggling the port from line out (no headphone output) to headphones (headphone output via alsa only)

no-sound.txt
sound.txt

@perexg
Copy link
Member

perexg commented Mar 30, 2023

It seems that you have the output muted:

$ diff -u8 no-sound.txt sound.txt 
--- no-sound.txt	2023-03-30 20:05:11.613093802 +0200
+++ sound.txt	2023-03-30 20:05:08.621078288 +0200
@@ -23,55 +23,55 @@
   IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
   IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
   IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
 Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Front Playback Volume", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Device: name="ALC1220 Analog", type="Audio", device=0
   Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
-  Amp-Out vals:  [0x24 0x24]
+  Amp-Out vals:  [0x50 0x50]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Surround 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:  [0x24 0x24]
+  Amp-Out vals:  [0x00 0x00]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Center Playback Volume", index=0, device=0
     ControlAmp: chs=1, dir=Out, idx=0, ofs=0
   Control: name="LFE Playback Volume", index=0, device=0
     ControlAmp: chs=2, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
-  Amp-Out vals:  [0x24 0x24]
+  Amp-Out vals:  [0x00 0x00]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x05 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Headphone 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]
+  Amp-Out vals:  [0x50 0x50]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
@@ -179,50 +179,50 @@
   Pin-ctls: 0x00:
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
 Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Front Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x0001001c: OUT HP EAPD Detect
   EAPD 0x2: EAPD
   Pin Default 0x01014010: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Green
     DefAssociation = 0x1, Sequence = 0x0
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=05, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
   Connection: 1
      0x0c
 Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Surround Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x00000034: IN OUT Detect
   Pin Default 0x01011012: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Black
     DefAssociation = 0x1, Sequence = 0x2
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=06, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
   Connection: 1
      0x0d
 Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Center Playback Switch", index=0, device=0
     ControlAmp: chs=1, dir=Out, idx=0, ofs=0
   Control: name="LFE Playback Switch", index=0, device=0
     ControlAmp: chs=2, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x00000034: IN OUT Detect
   Pin Default 0x01016011: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Orange
     DefAssociation = 0x1, Sequence = 0x1
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=07, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
@@ -297,17 +297,17 @@
   Connection: 5
      0x0c* 0x0d 0x0e 0x0f 0x26
 Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
   Control: name="Headphone Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
   Amp-In vals:  [0x00 0x00]
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x80 0x80]
+  Amp-Out vals:  [0x00 0x00]
   Pincap 0x0001373c: IN OUT HP EAPD Detect
     Vref caps: HIZ 50 GRD 80 100
   EAPD 0x2: EAPD
   Pin Default 0x02214020: [Jack] HP Out at Ext Front
     Conn = 1/8, Color = Green
     DefAssociation = 0x2, Sequence = 0x0
   Pin-ctls: 0xc0: OUT HP VREF_HIZ
   Unsolicited: tag=01, enabled=1
[perex@p1gen2 Download]$ diff -u8 no-sound.txt sound.txt 
--- no-sound.txt	2023-03-30 20:05:11.613093802 +0200
+++ sound.txt	2023-03-30 20:05:08.621078288 +0200
@@ -23,55 +23,55 @@
   IO[5]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
   IO[6]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
   IO[7]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
 Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Front Playback Volume", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Device: name="ALC1220 Analog", type="Audio", device=0
   Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
-  Amp-Out vals:  [0x24 0x24]
+  Amp-Out vals:  [0x50 0x50]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Surround 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:  [0x24 0x24]
+  Amp-Out vals:  [0x00 0x00]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Center Playback Volume", index=0, device=0
     ControlAmp: chs=1, dir=Out, idx=0, ofs=0
   Control: name="LFE Playback Volume", index=0, device=0
     ControlAmp: chs=2, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
-  Amp-Out vals:  [0x24 0x24]
+  Amp-Out vals:  [0x00 0x00]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x05 [Audio Output] wcaps 0x41d: Stereo Amp-Out
   Control: name="Headphone 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]
+  Amp-Out vals:  [0x50 0x50]
   Converter: stream=0, channel=0
   PCM:
     rates [0x7e0]: 44100 48000 88200 96000 176400 192000
     bits [0x1e]: 16 20 24 32
     formats [0x1]: PCM
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x06 [Audio Output] wcaps 0x611: Stereo Digital
@@ -179,50 +179,50 @@
   Pin-ctls: 0x00:
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
 Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono
 Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Front Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x0001001c: OUT HP EAPD Detect
   EAPD 0x2: EAPD
   Pin Default 0x01014010: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Green
     DefAssociation = 0x1, Sequence = 0x0
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=05, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
   Connection: 1
      0x0c
 Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Surround Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x00000034: IN OUT Detect
   Pin Default 0x01011012: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Black
     DefAssociation = 0x1, Sequence = 0x2
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=06, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
   Connection: 1
      0x0d
 Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
   Control: name="Center Playback Switch", index=0, device=0
     ControlAmp: chs=1, dir=Out, idx=0, ofs=0
   Control: name="LFE Playback Switch", index=0, device=0
     ControlAmp: chs=2, dir=Out, idx=0, ofs=0
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x00 0x00]
+  Amp-Out vals:  [0x80 0x80]
   Pincap 0x00000034: IN OUT Detect
   Pin Default 0x01016011: [Jack] Line Out at Ext Rear
     Conn = 1/8, Color = Orange
     DefAssociation = 0x1, Sequence = 0x1
   Pin-ctls: 0x40: OUT
   Unsolicited: tag=07, enabled=1
   Power states:  D0 D1 D2 D3 EPSS
   Power: setting=D0, actual=D0
@@ -297,17 +297,17 @@
   Connection: 5
      0x0c* 0x0d 0x0e 0x0f 0x26
 Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
   Control: name="Headphone Playback Switch", index=0, device=0
     ControlAmp: chs=3, dir=Out, idx=0, ofs=0
   Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
   Amp-In vals:  [0x00 0x00]
   Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
-  Amp-Out vals:  [0x80 0x80]
+  Amp-Out vals:  [0x00 0x00]
   Pincap 0x0001373c: IN OUT HP EAPD Detect
     Vref caps: HIZ 50 GRD 80 100
   EAPD 0x2: EAPD
   Pin Default 0x02214020: [Jack] HP Out at Ext Front
     Conn = 1/8, Color = Green
     DefAssociation = 0x2, Sequence = 0x0
   Pin-ctls: 0xc0: OUT HP VREF_HIZ
   Unsolicited: tag=01, enabled=1

Try to unmute everything in alsamixer ('M' key / playback) for tests. Also, do not use any sound server - just the plain ALSA tools.

@metronidazole
Copy link
Author

Ok running everything through ALSA and unmuting all channels results in no output via headphones, just speakers. See attached.

alsa-info.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants