Contribute
Register

[solved]AppleHDA problem; audio level not changing in menubar

Status
Not open for further replies.
I can confirm that this problem is "finally" fixed.
I asked Mirone about the problem and he gave me the needed binary patch, originally found by "wern apfel", people having the same problem can add it to KextsToPatch:

Comment: Conexant menubar fix (credit wern apfel)
Find: <6b707369eb>
Name: AppleHDA
Replace: <63696d69eb>

And I hope someone can explain what it actually does, because until this point, I still have no idea what the cause of the problem is and why this patch fixes it...
 
I can confirm that this problem is "finally" fixed.
I asked Mirone about the problem and he gave me the needed binary patch, originally found by "wern apfel", people having the same problem can add it to KextsToPatch:

Comment: Conexant menubar fix (credit wern apfel)
Find: <6b707369eb>
Name: AppleHDA
Replace: <63696d69eb>

And I hope someone can explain what it actually does, because until this point, I still have no idea what the cause of the problem is and why this patch fixes it...

Disassemble both native AppleHDA and AppleHDA with the patch. Then use diff and analyze the difference.
 
Disassemble both native AppleHDA and AppleHDA with the patch. Then use diff and analyze the difference.
Can you please explain how I can disassemble a kext?
 
Code:
Zaids-Mac:Desktop Zaid$ cp /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA .
Zaids-Mac:Desktop Zaid$ cp /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA ./Patched
Zaids-Mac:Desktop Zaid$ otool -tVj AppleHDA >AppleHDA.s
Zaids-Mac:Desktop Zaid$ open AppleHDA.s
Zaids-Mac:Desktop Zaid$ otool -tVj Patched >Patched.s
Zaids-Mac:Desktop Zaid$ diff AppleHDA.s Patched.s
1c1
< AppleHDA:
---
> Patched:
75372c75372
< 0000000000047ad5    41 be 6b 70 73 69     movl    $0x6973706b, %r14d
---
> 0000000000047ad5    41 be 63 69 6d 69     movl    $0x696d6963, %r14d

I ended up having this output, still doesnt make sense to me :\
Any ideas?
 
Code:
Zaids-Mac:Desktop Zaid$ cp /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA .
Zaids-Mac:Desktop Zaid$ cp /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA ./Patched
Zaids-Mac:Desktop Zaid$ otool -tVj AppleHDA >AppleHDA.s
Zaids-Mac:Desktop Zaid$ open AppleHDA.s
Zaids-Mac:Desktop Zaid$ otool -tVj Patched >Patched.s
Zaids-Mac:Desktop Zaid$ diff AppleHDA.s Patched.s
1c1
< AppleHDA:
---
> Patched:
75372c75372
< 0000000000047ad5    41 be 6b 70 73 69     movl    $0x6973706b, %r14d
---
> 0000000000047ad5    41 be 63 69 6d 69     movl    $0x696d6963, %r14d

I ended up having this output, still doesnt make sense to me :\
Any ideas?

You need to read the code...
You will see a ton of comparisons against 0x696d6963 after calling __ZNK15AppleHDAPathSet31getCharCodeForDefaultDeviceTypeEv.
And you will see that the change is in __ZNK15AppleHDAPathSet31getCharCodeForDefaultDeviceTypeEv.

Also note the what the hex is in ASCII:
Code:
u430:Projects Admin$ echo 6973706b|xxd -r -p|xxd
0000000: 6973 706b                                ispk
u430:Projects Admin$ echo 696d6963|xxd -r -p|xxd
0000000: 696d 6963                                imic

So, returning imic (internal mic) instead of ispk (internal speaker). ???
Maybe some pinconfigs are wrong and hence the patch is needed?

Perhaps there is an explanation that the patch developer provided?
 
You need to read the code...
You will see a ton of comparisons against 0x696d6963 after calling __ZNK15AppleHDAPathSet31getCharCodeForDefaultDeviceTypeEv.
And you will see that the change is in __ZNK15AppleHDAPathSet31getCharCodeForDefaultDeviceTypeEv.

Also note the what the hex is in ASCII:
Code:
u430:Projects Admin$ echo 6973706b|xxd -r -p|xxd
0000000: 6973 706b                                ispk
u430:Projects Admin$ echo 696d6963|xxd -r -p|xxd
0000000: 696d 6963                                imic

So, returning imic (internal mic) instead of ispk (internal speaker). ???
Maybe some pinconfigs are wrong and hence the patch is needed?

Perhaps there is an explanation that the patch developer provided?

I patched AppleHDA myself and configured the PinConfigs like they're supposed to be according to the existing AppleHDA patching guides. I don't really know though... I had problems with different versions of patched AppleHDA files for my codec until I decided to patch them myself and ended up having better results. But in all the versions, the same problem existed...
So you're suggesting that the problem is in the PinConfigs and not in the PathMaps?
 
I patched AppleHDA myself and configured the PinConfigs like they're supposed to be according to the existing AppleHDA patching guides. I don't really know though... I had problems with different versions of patched AppleHDA files for my codec until I decided to patch them myself and ended up having better results. But in all the versions, the same problem existed...
So you're suggesting that the problem is in the PinConfigs and not in the PathMaps?

I'm not really sure why the patch is needed. Just throwing out ideas... You might ask the author of the patch.
 
I did ask him, he just doesn't want to explain... I can fell him telling me "just live with the patch"... :(
 
I did ask him, he just doesn't want to explain... I can fell him telling me "just live with the patch"... :(

Then you need to analyze the code more fully if you wish to understand...
 
Status
Not open for further replies.
Back
Top