Jump to content

AppleALC — dynamic AppleHDA patching


vit9696
5,371 posts in this topic

Recommended Posts

On 5/2/2021 at 7:31 AM, matgeo said:

Can someone help me  to remove linein of alc256 layout ID 21 on latest applealc release?

Have you tried the other IDs? there are a few. Layout 11 could work and has no LineIn.

Link to comment
Share on other sites

3 hours ago, wern apfel said:

Have you tried the other IDs? there are a few. Layout 11 could work and has no LineIn.

Layout 11  is working only with ssdt and codeccommander.

Layout 21 is best for my laptop but when there is sometimes a high pitch noise, which I think is because of line in.

Link to comment
Share on other sites

On 5/3/2021 at 6:56 PM, matgeo said:

Layout 11  is working only with ssdt and codeccommander.

Layout 21 is best for my laptop but when there is sometimes a high pitch noise, which I think is because of line in.

Were you able to mute the speakers and headphone while using layout 11? Not this one.

Try this kext where LineIN has been removed from layout 21, there are also some changes to layout 11, can you please try again?

AppleALC.kext_1.6.0.zip

Link to comment
Share on other sites

11 hours ago, wern apfel said:

Were you able to mute the speakers and headphone while using layout 11? Not this one.

Try this kext where LineIN has been removed from layout 21, there are also some changes to layout 11, can you please try again?

AppleALC.kext_1.6.0.zip 1.21 MB · 1 download

Thanks for your help.

Yes , I was able to mute them woth layout 11.

 

Unfortunately with both layout 21 and 11 :

 

internal speakers: OK

internal mic : OK

external speakers : no sound

 

Attaching my linux dump if it helps.

codec_dump linux.txt

Edited by matgeo
Link to comment
Share on other sites

Update 1

 

With layout 21 initially after boot I don't have sound from external speakers/heaphones.

But after waking from sleep sound is fine.

Maybe we can fix it?

 

Update 2

With layout 21 initially after boot I don't have sound from external speakers/heaphones.

If I execute "alc-verb 0x19 0x707 0x20" sound from headphones is back

Edited by matgeo
Link to comment
Share on other sites

7 hours ago, matgeo said:

Update 1

 

With layout 21 initially after boot I don't have sound from external speakers/heaphones.

But after waking from sleep sound is fine.

Maybe we can fix it?

 

Update 2

With layout 21 initially after boot I don't have sound from external speakers/heaphones.

If I execute "alc-verb 0x19 0x707 0x20" sound from headphones is back

This is a known behaviour on Headset jacks(TRRS). What value do you have after a restart "hda-verb 0x19 0xf07 0x0"? Does it also work with "hda-verb 0x1a 0x707 0x20"?

I'll upload later a new ALC for testing.

Link to comment
Share on other sites

24 minutes ago, wern apfel said:

This is a known behaviour on Headset jacks(TRRS).

What value do you have after a restart "hda-verb 0x19 0xf07 0x0"? Does it also work with "hda-verb 0x1a 0x707 0x20"?

I'll upload later a new ALC for testing.

I used to have the opposite problem. Sound from headphones working on boot and lost after sleep.

I prefer your version of ALC , having sound after sleep is great.

If only you can fix the boot sound.

 

"hda-verb 0x19 0xf07 0x0" returns 

nid = 0x0, verb = 0x19, param = 0xf07
0x00000000

 

"hda-verb 0x1a 0x707 0x20" doesn't do anything.

Link to comment
Share on other sites

3 hours ago, matgeo said:

I used to have the opposite problem. Sound from headphones working on boot and lost after sleep.

I prefer your version of ALC , having sound after sleep is great.

If only you can fix the boot sound.

 

"hda-verb 0x19 0xf07 0x0" returns 

nid = 0x0, verb = 0x19, param = 0xf07
0x00000000

 

"hda-verb 0x1a 0x707 0x20" doesn't do anything.

CodecCommander can run that command on startup.

 

Here is the kext, try both 11, 21

AppleALC.kext.zip

Link to comment
Share on other sites

1 hour ago, wern apfel said:

CodecCommander can run that command on startup.

 

Here is the kext, try both 11, 21

AppleALC.kext.zip 1.21 MB · 1 download

Same problem for layout 21 , worse on 11.

 

layout 21

internal speakers: OK

internal mic : OK

external speakers/headphones : sound only after sleep

 

layout 11

 

layout 21

internal speakers: OK

internal mic : OK

external speakers/headphones : no sound at all.

 

Added CodecCommander but nothing changed.

 

You are very close with layout 21. Just a minor problem is left , having sound from headphones right after boot.

Wish you can solve it.

 

Thank you again for your help.

Link to comment
Share on other sites

21 hours ago, matgeo said:

Same problem for layout 21 , worse on 11.

 

layout 21

internal speakers: OK

internal mic : OK

external speakers/headphones : sound only after sleep

 

layout 11

 

layout 21

internal speakers: OK

internal mic : OK

external speakers/headphones : no sound at all.

 

Added CodecCommander but nothing changed.

 

You are very close with layout 21. Just a minor problem is left , having sound from headphones right after boot.

Wish you can solve it.

 

Thank you again for your help.

CodecCommander needs a profile for your codec to work, try this one. I'll upload another ALC for testing.

CodecCommander.kext.zip

Link to comment
Share on other sites

20 minutes ago, wern apfel said:

Have you tried it with the new CC?

 

If you have an headset, can you make a dump with  Linux while the headset is connected?

 

Here is a new sample, try both layouts.

AppleALC.kext.zip 1.2 MB · 0 downloads

I tried CC but still no sound after boot. 

Attached the dump with external speakers connected.

I will try the new ALC and let you know.

codec_dump linux.txt

 

Update...

Something is broken with the new ALC. On both 11 and 21 there is sound from both internal and external speakers even after waking from sleep.

 

Screen Shot 2021-05-08 at 22.48.29.pdf Screen Shot 2021-05-08 at 22.50.39.pdf

Edited by matgeo
Link to comment
Share on other sites

48 minutes ago, wern apfel said:

You're right this happens when you build a debug kext, here's the release kext.

AppleALC.kext.zip 1.21 MB · 1 download

Getting close..

 

Layout 21

internal speakers: OK

internal mic : Not working , no option for internal mic , identifying as line in.

external speakers/headphones : Working fine , both on boot and after sleep.

 

Layout 11

internal speakers: OK

internal mic : Not working , identifying as internal mic

external speakers/headphones : Sound working on boot but lost after sleep.

 

I think we are getting very close to layout 21 , sound from speraker is great , left only the mic.

52 minutes ago, wern apfel said:

Does the microphone from the headset work?

 

If you mean on Linux , I will have to check it out and let you know.

Link to comment
Share on other sites

7 hours ago, matgeo said:

Getting close..

 

Layout 21

 

internal speakers: OK

internal mic : Not working , no option for internal mic , identifying as line in.

external speakers/headphones : Working fine , both on boot and after sleep.

 

Layout 11

internal speakers: OK

internal mic : Not working , identifying as internal mic

external speakers/headphones : Sound working on boot but lost after sleep.

 

I think we are getting very close to layout 21 , sound from speraker is great , left only the mic.

If you mean on Linux , I will have to check it out and let you know.

I was wrong. I forgot codeccommander.kext anabled.

Without it sound from external speakers is not enabled after boot.

So new alc is a step backwards.

Sorry about that.

 

As far as microphone from headset , I cannot test it. I use a wifislax live version and I don't know how to test microphone.

Link to comment
Share on other sites

@vit9696

 

Hi all

 

On a Laptop IVy Bridge with BS 11.3.1 (20E241) and Xcode Version 12.5 (12E262)

AppleALC (v1.6.1) can't be compiled with OCBuilder (app) nor with Xcode  (MACOSX_DEPLOYMENT_TARGET = 10.6; or MACOSX_DEPLOYMENT_TARGET = 10.8; in project.pbxproj)

 

Regards

Capture d’écran 2021-05-10 à 14.11.16.png

Capture d’écran 2021-05-10 à 12.41.00.png

Edited by matxpa
Link to comment
Share on other sites

Hi

I have 2 outputs, Internal speaker & headphones on my ALC662 ID 16.

If select internal speaker to be the default, it goes back to headphone  everytime I restart, or even shutdown.

Im currently using a launchagent script so it would go back to internal speaker.

I have a working NVRAM. Is there a proper fix for this?

 

 

1 hour ago, matxpa said:

@vit9696

 

Hi all

 

On a Laptop IVy Bridge with BS 11.3.1 (20E241) and Xcode Version 12.5 (12E262)

AppleALC (v1.6.1) can't be compiled with OCBuilder (app) nor with Xcode  (MACOSX_DEPLOYMENT_TARGET = 10.6; or MACOSX_DEPLOYMENT_TARGET = 10.8; in project.pbxproj)

 

Regards

Capture d’écran 2021-05-10 à 14.11.16.png

Capture d’écran 2021-05-10 à 12.41.00.png

Warnings can be ignored

Edited by ellaosx
Link to comment
Share on other sites

30 minutes ago, ellaosx said:

Hi

I have 2 outputs, Internal speaker & headphones on my ALC662 ID 16.

If select internal speaker to be the default, it goes back to headphone  everytime I restart, or even shutdown.

Im currently using a launchagent script so it would go back to internal speaker.

I have a working NVRAM. Is there a proper fix for this?

 

 

Warnings can be ignored

 

Warnings sure but an infinite compilation process of AppleALC. Does the compilation need always "Lilu.kext" and MacKernelSDK ?

 

PS: Console commande line "xcodebuild -arch x86_64 -configuration Release " works fine on local AppleALC project Directory.

Edited by matxpa
Link to comment
Share on other sites

×
×
  • Create New...