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

[AppleALC] alc-verb doesn't work correctly #1644

Closed
WingLim opened this issue May 17, 2021 · 2 comments
Closed

[AppleALC] alc-verb doesn't work correctly #1644

WingLim opened this issue May 17, 2021 · 2 comments

Comments

@WingLim
Copy link

WingLim commented May 17, 2021

Since 61e2bbf is applied to AppleALC, we could send hda-verb command through AppleALC by adding alcverbs=1.

But there has a weird problem, my computer using ALC255 and I use the layout-id 66, then everything work except the headset micphone.

The I find a patch in patch_realtek.c#L5026 which can make micphone work with VerbStunb.kext something like CodecCommander.

Use hda-verb execute the patch I mention above.

0x500 is SET_COEF_INDEX
0x400 is SET_PROC_COEF

hda-verb 0x20 0x500 0x45
hda-verb 0x20 0x400 0xd489

hda-verb 0x20 0x500 0x1b
hda-verb 0x20 0x400 0x0c2b

hda-verb 0x57 0x500 0x03
hda-verb 0x57 0x400 0x8ea6

But I can not use alc-verb to execute above patch, It only work by remove the verb 00 like this:

alc-verb 0x20 0x500 0x45
alc-verb 0x20 0x4d4 0x89 # here

alc-verb 0x20 0x500 0x1b
alc-verb 0x20 0x40c 0x2b # here

alc-verb 0x57 0x500 0x03
alc-verb 0x57 0x48e 0xa6 # and here

I try to read the AppleALC source code, but stop at kern_alc.cpp#L332:22

IOReturn AlcEnabler::IOHDACodecDevice_executeVerb(void *hdaCodecDevice, uint16_t nid, uint16_t verb, uint16_t param, unsigned int *output, bool waitForSuccess){
	DBGLOG("alc", "IOHDACodecDevice::executeVerb with parameters nid = %u, verb = %u, param = %u", nid, verb, param);
	return FunctionCast(IOHDACodecDevice_executeVerb, callbackAlc->orgIOHDACodecDevice_executeVerb)(hdaCodecDevice, nid, verb, param, output, waitForSuccess);
}

Don't know how AppleALC execute verb command, and why the problems arise.

@vit9696
Copy link
Contributor

vit9696 commented May 18, 2021

The code is provided to us by AppleHDA, so it is not open-source. We are not sure either, perhaps there is a difference in argument format or Apple implementation is more limited. As long as you have a workaround, this will probably be it.

cc @black-dragon74

@mikebeaton
Copy link
Contributor

This was resolved by the commit above, and alc-verb now accepts exactly the Linux format without any parameter edits needed.

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

No branches or pull requests

3 participants