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

Updated Pin Config for layout 16 ALC1220 #758

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

narcyzzo
Copy link
Contributor

-Fixed sound not working after reboot from Windows with Realtek Driver installed

-Fixed sound not working after reboot from Windows with Realtek Driver installed
- Huge Thanks to @mikebeaton
@hla63
Copy link
Contributor

hla63 commented Jan 29, 2022

Hello i see you use verbs
02050007
0205001a
020401c1

what 500 & 401 are supposed to do ?

@narcyzzo
Copy link
Contributor Author

narcyzzo commented Jan 29, 2022

Hi
Those are per-machine specific, actaully i send SET_COEF_INDEX and
SET_PROC_COEF to coeffs from sound-working-state to node 0x20. See this why commands looks like this (acidanthera/bugtracker#1644). U need dump coeffs from not working state, compare them to working state and set correct ones. Write up will come soon.

@hla63
Copy link
Contributor

hla63 commented Jan 29, 2022

thanx for explanation !

@mikebeaton
Copy link
Contributor

mikebeaton commented Jan 29, 2022

Hi Those are per-machine specific, actaully i send SET_COEF_INDEX and SET_PROC_COEF to coeffs from sound-working-state to node 0x20. See this why commands looks like this (acidanthera/bugtracker#1644). U need dump coeffs from not working state, compare them to working state and set correct ones. Write up will come soon.

Actually the normal verb/argument packing is not because alc-verb has that quirk, compared to hda-verb, it's how you always pack the argument for 4 bit verbs (which iirc is all verbs that don't start with 7 or F).

@Core-i99
Copy link
Contributor

Hi Those are per-machine specific, actaully i send SET_COEF_INDEX and SET_PROC_COEF to coeffs from sound-working-state to node 0x20. See this why commands looks like this (acidanthera/bugtracker#1644). U need dump coeffs from not working state, compare them to working state and set correct ones. Write up will come soon.

Actually the normal verb/argument packing is not because alc-verb has that bug (or quirk, compared to hda-verb), it's just how you pack the argument for 4 bit verbs (which iirc is all verbs that don't start with 7 or F).

Can you show an example of that? I never actually experimented with those verbs. But I don't understand what the issue is exactly when sending those verbs, why they shouldn't work in alc-verb tool but as well in the pinconfigs.

@mikebeaton
Copy link
Contributor

mikebeaton commented Jan 29, 2022

There isn't a problem, the verbs are laid out fine.

I was just pointing out that the compressed verbs in the pinconfigs don't need to be in that format because anything about alc-verb.

Just as an example 020401c1 is pin 0x20 verb 0x400 value 0x01c1. Or if it was 02071534 it would be pin 0x20, verb 0x715, value 0x34. That's just the compressed format used by Intel HDA compliant chips.

If you want to do the first example with hda-verb, it's hda-verb {devpath} 0x20 0x400 0x01c1, with alc-verb to get the same result you have to do alc-verb [-d {devnum}] 0x20 0x401 0xc1.

@mikebeaton
Copy link
Contributor

@vandroiy2013 @MacPeet Are you able to review this? The changes make sense to me, I worked with @narcyzzo to discover them.

The added verbs are:

02050007
020403c0
0205001a
020401c1

= set processing coefficient 0x07 on node 0x20 to 0x03c0 and set processing coefficient 0x1a on node 0x20 to 0x01c1.

They fix sound not working after Realtek driver for this card in Windows. They were derived by reading the working values of all the processing coefficients when booting direct, and comparing them to the non-working values when warm booting from Windows with Realtek. If you manually apply them in Linux with hda-verb, they also fix the sound in the same situation in Linux. We believe they are the minimal set of changes (only the 0x1a coeff change is needed on Linux, but both are needed in macOS; i.e. Linux half fixes the problem already).

@hla63
Copy link
Contributor

hla63 commented Feb 1, 2022

Excuse me, how are you doing to dump coeffs ?

@mikebeaton
Copy link
Contributor

In Linux you can dump them https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1850439/comments/153. For macOS I wrote a script to dump using alc-verb. Planning to do a write-up.

@hla63
Copy link
Contributor

hla63 commented Feb 2, 2022

Thanks you very much !!!!!

I use another method to find these values.
I found RtHDDump (windows app) on Asus blog
with these tool I can compare values on Node x20
Microsoft audio Driver versus Realtek audio driver.

& I found
alc-verb 0x20 0x500 0x10
alc-verb 0x20 0x400 0x20
alc-verb 0x20 0x500 0x1a
alc-verb 0x20 0x480 0x0b

sound works like a charm with these commands on my msi laptop.

@MacPeet
Copy link
Contributor

MacPeet commented Feb 2, 2022

I hope the changes don't break the audio for users with the current layoutID16. Otherwise develop your own new ID!

@mikebeaton
Copy link
Contributor

We believe it would actually fix for others, e.g. if you have Win with Realtek driver on your machine, this would probably fix the same issue of no sound after warm reboot into macOS from that.

If you're interested and able to test that'd be really great. If not, it is your layout, so if you prefer could definitely be a different very similar layout on an alternative number.

@MacPeet
Copy link
Contributor

MacPeet commented Feb 2, 2022

I don't have a Z390 myself.
I developed the codec for other users, so I can't try it myself.
I don't mind if the codec is changed if it's a win for all users.

@mikebeaton
Copy link
Contributor

mikebeaton commented Feb 3, 2022

We used the same approach to generate final fixes for #759, and that is giving sound to other users who did not have it before. (On that card it was a case of no sound ever, except using Realtek driver in Windows.) So we think this approach is good. Very happy to rethink and separate the ids if any reports of any problems.

So I guess go ahead? Thanks!

@mikebeaton
Copy link
Contributor

mikebeaton commented Mar 6, 2022

Script and write-up now available.

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

Successfully merging this pull request may close these issues.

6 participants