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

Add patch for AMD ZEN to fix microphone issue #882

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

qhuyduong
Copy link
Contributor

In the function AppleHDAController::getAudioStreamLinkPositionInDMABuffer(IOHDAStream*, uint64_t*), it expects bit 0 of register 0x70 to be cleared before reading DMA position. However, for AMD, it somehow is not cleared, hence DMA position is incorrect. For now the workround is to skip that bit check.

This patch has been veried to work up to macOS Sonoma.

In the function AppleHDAController::getAudioStreamLinkPositionInDMABuffer(IOHDAStream*, uint64_t*),
it expects bit 0 of register 0x70 to be cleared before reading DMA position.
However, for AMD, it somehow is not cleared, hence DMA position is incorrect.
For now the workround is to skip that bit check.

This patch has been veried to work up to macOS Sonoma.
qhuyduong referenced this pull request in qhuyduong/AppleALC Dec 5, 2023
Previously the workround is to disable DMA Position Buffer Enable bit
completely, which can be dangerous.
This new patch just skips that bit check in
getAudioStreamLinkPositionInDMABuffer method, which can be "safer".
@radianttap
Copy link

I can confirm this fully enabled the microphone port on back I/O. Tested on two different B550 ITX motherboards (Asus and Gigabyte).

@herrnst
Copy link

herrnst commented Dec 6, 2023

Confirmed fully working built-in microphone on the Huawei Matebook D14 AMD (2020) (ALC256) with this change.

@CaseySJ
Copy link
Contributor

CaseySJ commented Dec 6, 2023

Confirmed to work on my Gigabyte B550 Vision D.

Mic input on Ryzentosh has never worked until now.

Thanks to the submitter for finding a solution, and looking forward to getting this added to AppleALC.

@vandroiy2013 vandroiy2013 merged commit 5fa5084 into acidanthera:master Dec 11, 2023
3 checks passed
herrnst added a commit to herrnst/HuaweiMatebookD14AMD-OpenCore that referenced this pull request Dec 11, 2023
The required AMD ZEN patches were merged into upstream AppleALC via [1], so
AppleALC can be updated through upstream from now on.

Thanks to qhuyduong for bringing the changes upstream!

[1] acidanthera/AppleALC#882
@ChgygLin
Copy link

ChgygLin commented Dec 14, 2023

Tested on ThinkBook16p-2021-5800H with ALC287 and layout id 11 in macOS 13.6.1, In "System Setting" the audio input device is still not available, and microphone can't be used. Maybe somethins was wrong with me?

@araca
Copy link

araca commented Dec 14, 2023

Tested on ThinkBook16p-2021-5800H with ALC287 and layout id 11 in macOS 13.6.1, In "System Setting" the audio input device is still not available, and microphone can't be used. Maybe somethins was wrong with me?

Same for me, with ThinkPad P14s ALC287 and Layout ID 11 on 12.7.1

@qhuyduong
Copy link
Contributor Author

Tested on ThinkBook16p-2021-5800H with ALC287 and layout id 11 in macOS 13.6.1, In "System Setting" the audio input device is still not available, and microphone can't be used. Maybe somethins was wrong with me?

Some AMD laptops have a dedicated hardware for controlling microphones.

You can try my other kext https://github.com/qhuyduong/AMDMicrophone

@martinnnnnnnnnnnnnnnnnnn

I'm using an MSI b450 Tomahawk with ALC892, and microphone does not work even with this new patch, back IO and USB mic out don't work :( Using layout ID 1

@Sayor0630
Copy link

1220-VB workis with the latest kext but there is some chir chir sound in the background. I mean its not producing completely clear sound

@pokewizardSAM
Copy link

1220-VB workis with the latest kext but there is some chir chir sound in the background. I mean its not producing completely clear sound

Same Here i have tried this on LENOVO 82K2 Ryzen 5500H variant. Audio works flawlessy but there is a annoying static noise on every layout id. Even post noise suppression doesn't fix it properly

herrnst added a commit to herrnst/HuaweiMatebookD14AMD-OpenCore that referenced this pull request Sep 17, 2024
The required AMD ZEN patches were merged into upstream AppleALC via [1], so
AppleALC can be updated through upstream from now on.

Thanks to qhuyduong for bringing the changes upstream!

[1] acidanthera/AppleALC#882
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.

10 participants