Page 3 of 3

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Tue Jun 30, 2020 11:23 pm
by iancmx

Code: Select all

➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x0f

[sudo] password for iancmx: 
nid = 0x20, verb = 0x500, param = 0xf
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x20 0x477 0x74

nid = 0x20, verb = 0x477, param = 0x74
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01

nid = 0x1, verb = 0x716, param = 0x1
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01

nid = 0x1, verb = 0x717, param = 0x1
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01

nid = 0x1, verb = 0x715, param = 0x1
value = 0x0
➜  ~ 
Still no audio from headphones..speakers still work after those lines tho.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Tue Jun 30, 2020 11:29 pm
by MrEen
Okay, now try this:

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x02
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x02
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02
And if that doesn't work, try this:

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04
sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 1:09 am
by iancmx

Code: Select all

➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x02

[sudo] password for iancmx: 
nid = 0x1, verb = 0x716, param = 0x2
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x02

nid = 0x1, verb = 0x717, param = 0x2
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02

nid = 0x1, verb = 0x715, param = 0x2
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04

nid = 0x1, verb = 0x716, param = 0x4
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04

nid = 0x1, verb = 0x717, param = 0x4
value = 0x0
➜  ~ sudo hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04

nid = 0x1, verb = 0x715, param = 0x4
value = 0x0
Still nothing :( Really appreciate the effort youre putting in though

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 1:13 am
by MrEen
Okay, I had another idea, but I need to look things up first. You can reboot whenever you need to, as this one should probably be tried fresh. Shouldn't be more than 10 minutes.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 1:19 am
by MrEen
Oh darn. What I was going to suggest was already done by HDAJackRetask.

Try this instead. Run HDAJackRetask, and tell me what the 8 boxes have for 0x21. The last box, Channel (in group), might need to be set to something else. Front might be a good one if it's not already that. The number pairs might also work. Mine is set to Channel 30 & 31, not that means anything for yours. Try changing those, and hitting Apply now before each sound test. As you're making changes, it might mute the headphones when it makes them active, so watch for that.

EDIT: Oops, you have to check the box for Advanced override to see the 8 boxes.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 1:24 am
by MrEen
Gotta head to bed. Will check back in the AM to see where we stand.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 1:31 am
by iancmx
Currenttly for hdajackretask for 0x21, it is set to:
Connectivity: Jack
Location: Left
Device: Headphone
Jack: 3.5mm
Color: Green
Jack Detection: Present
Channel group: 3
Channel (in group): 30 & 31

So I tried changing it to front and pressed apply. However I got an error saying that tee:/sys/class/sound/hwC0D0/reconfig: Device or resource busy
I searched online and found out that its because pulseaudio is running. So I disabled it using commands

Code: Select all

systemctl --user stop pulseaudio.socket
systemctl --user stop pulseaudio.service
and apply and started pulseaudio. However, jack detection and speakers were not working. I did a install boot overide instead of apply and now jack detection is working but still no audio. Im not sure if the apply button works....

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 11:21 am
by MrEen
Some get that stupid "Device or resource busy" thing and I've never figured out why. For Mint users, PulseAudio is always running but most users I've tried to help don't get that error. You didn't have that issue earlier when applying the changes to 0x21 and 0x19 originally. You did good trying to work around it!

Silly question; Is the Headphone port on the Left side of the machine? That's one thing I'd change if not. You could also try Channel 2 or 1 instead of 3.

This thread is very reminiscent of another one with mostly the same issue, but different hardware. This post shows what fixed most of it, not that that will necessarily help much here. Sort of just trying to spur some inspiration.

I'm rather strongly thinking this part of 0x21 is what is still an issue:

Code: Select all

  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
I'm pretty sure the name doesn't matter, but that pin default should have changed to the pincfg from the hdajackretask patch.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 11:37 am
by MrEen
And I just realized something else that is probably quite pertinent. You have no Microphone (external) control, other than the headset mic that you created on 0x19. I'm guessing you have a combo port, for headphone and/or microphone? And for whatever reason, the system completely ignored it.

If we can't get HDAJackRetask to make it work, you might want to post in the bug report showing the 0x21 output along with the pincfg section of the hdajackretask patch. That might give a hint to Takashi. I may be chasing a dead horse here, but if you look at this section of the alsa-info output, you'll see it should have changed:

Code: Select all

/sys/class/sound/hwC0D0/init_pin_configs:
0x12 0x90a60120
0x13 0x40000000
0x14 0x411111f0
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40600001
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x411111f0

/sys/class/sound/hwC0D0/driver_pin_configs:
0x19 0x01a1103c

/sys/class/sound/hwC0D0/user_pin_configs:
0x12 0x90a60120
0x13 0x40000000
0x14 0x411111f0
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x01a1103c
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40600001
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x0321403f
Yet 0x21 still shows 0x411111f0.

Come to think of it, you had to change 0x19 yourself, yet the driver_pin_config section shows it being changed to the same thing, as if the driver_pin_config never worked. I'm starting to think we're on to something here. This stuff is still a bit over my head, but Takashi should understand it all, and hopefully know what to do with that info.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 8:20 pm
by iancmx
Previously when I applied 0x19 and 0x21, I did the same thing of installing boot overide for it to work. The apply button never worked for me. Before I applied Takashi Iwai patch, i needed to patch 0x19 to get microphone from the headset to work, but after the patch i didnt need to patch 0x19. but i needed to patch 0x21 to get the microphone and headphone detection to work. You are right, the jack is indeed a combo jack and its on the left side of the machine. There is another jack which is just a microphone jack, and it too doesnt work, but im more focused on getting the combo jack to work first.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 9:09 pm
by MrEen
Oh sure. Shoot down all my ideas! :D

I just realized I never actually looked at his patch to see what it was doing. Gonna take a peek now.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Wed Jul 01, 2020 9:13 pm
by MrEen
Damn, I forgot already that I did look at it, and that's why I suggested this way back when:

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x0f
sudo hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x7774
As far as I could tell, that's all that quirk really does, although it's chained to others that may or may not do more.

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Thu Jul 02, 2020 8:56 pm
by iancmx
I guess I can only wait for Takashi Iwai 's response. Really want to thank you for trying to help me out the past few dasy tho! Really appreciate it! :D

Re: No headphone jack detection (ASUS Zephyrus)

Posted: Sat Jul 04, 2020 7:29 pm
by MrEen
iancmx wrote:
Thu Jul 02, 2020 8:56 pm
I guess I can only wait for Takashi Iwai 's response. Really want to thank you for trying to help me out the past few dasy tho! Really appreciate it! :D
Please add this to your bug report; Even though you have that pincfg, the default for 0x21 isn't changing to what the pincfg has:

Code: Select all

Node 0x21 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone 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]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 2
     0x02* 0x03
This line is the offender:

Code: Select all

  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
That Pin Default should have changed, but didn't, and that's what I'm hoping someone like Takashi might know what to do about.