5t33z0 / applealc-guides Goto Github PK
View Code? Open in Web Editor NEWGuides for working with the AppleALC source code to get audio working on Wintel machines running macOS.
License: BSD 3-Clause "New" or "Revised" License
Guides for working with the AppleALC source code to get audio working on Wintel machines running macOS.
License: BSD 3-Clause "New" or "Revised" License
I extracted codec dumps from linux with external mic connector (jack) connected and disconnected and this is the result:
As you can see, the dump highlights the connection nodes of the internal\external Mic, furthermore it is visible on connector 27 (0x1b) something changes when connecting the Jack, but at the moment the 27 OUT node is unused
From this thread: https://bbs.pcbeta.com/viewthread-1847616-1-1.html and this video: https://www.bilibili.com/video/av50809670
I'm trying to create a layout with full functions for my X1 Tablet 3rd Gen, after several tests this is what I understood:
Dump info Node 2 :
[Audio Output] wcaps 0x41d: Stereo Amp-Out
Control: name="Front Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Device: name="ALC295 Analog", type="Audio", device=0
Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
Amp-Out vals: [0x57 0x57]
Converter: stream=0, channel=0
PCM:
rates [0x40]: 48000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
How I set the Platforms69.xml since the node is OUT only
Dump info Node 8:
[Audio Input] wcaps 0x10051b: Stereo Amp-In
Control: name="Capture Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Capture Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Device: name="ALC295 Analog", type="Audio", device=0
Amp-In caps: ofs=0x17, nsteps=0x3f, stepsize=0x02, mute=1
Amp-In vals: [0x3f 0x3f]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 1
0x23
Dump info Node 27:
[Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
Control: name="Bass Speaker Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x00013734: IN OUT EAPD Detect
Vref caps: HIZ 50 GRD 80 100
EAPD 0x2: EAPD
Pin Default 0x90170150: [Fixed] Speaker at Int N/A
Conn = Analog, Color = Unknown
DefAssociation = 0x5, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT VREF_HIZ
Unsolicited: tag=00, enabled=0
Power states: D0 D1 D2 D3 EPSS
Power: setting=D0, actual=D0
Connection: 2
0x02 0x03*
This node 27 being IN\OUT instead I set it like this
Can we define this configuration as correct???
The result of my tests is fully functional, I improved the quality of the sounds in Output\Input and reduced noises\background disturbances.
But the work is still very long.........
Hi, I'm kinda interested in slimming AppleALC kext for smaller file size. On reading your tutorial, I've got some questions:
The guide should mention that you should check first whether audio works under linux before proceeding with dumping the codec etc.. Users can check here whether others have been able to get audio working under linux on their device (I recommend running a probe to ensure you get the exact right model). I don't imagine it's possible to get AppleALC working if you can't get linux working first.
@5T33Z0, in Tracing Possible Paths section, you say that "After a many, many trials, I settled with the following routing". Here I managed to create a list with all possible paths for my platform. However its unclear how to reduce that to a list of "valid" paths.
Could you, please, explain what tries you did? How do you check if they are valid or not?
I'm trying to create a new layout-id for ALC897. Existing ones does not work (I don't see my onboarding audio card as an output). I suppose there are 3 steps: 1) seen onboarding card as an audio output; 2) making sound play from it; 3) adding extra audio jacks to may config. Does it make sense? If so, focusing only on speaker/line out Pin Complex should be enough to achieve (1) and (2)?
Thanks!
first of all, thank you so much for your guide! it is very helpful and comprehensive. however, some bits are ambiguous in the guide:
If the Node 24 is the combojack that exists on the laptop itself, shouldn't it be placed with the Node 18 (internal mic) in order to get automatic switching working (in the Part VII, on the "finished Platforms39.xml" screenshot)? I didn't understand why you put the Line In of the dock (25) under the Node 18 since you stated that you need to switch manually in order to get microphones working without sending the sound through the input jack.
I'm sorry if i got this wrong but labeling the jacks according to their physical locations would be nice in the Part IV in order to clear any confusions down the guide.
now, i want to suggest a tip for what to do when the codec dump does not have clear labels on the nodes. i struggled to figure out what node is the Line-In for the combojack because nearly half of the nodes are labeled as "Speaker" and they have the Pin-configs of "0x411111f0".
microphone of my EarPods work without a problem in linux, so i installed "alsa-tools" and used hdajacksensetest to see which nodes change when i plug in my headset. as you can see, Node 19 is the Line-In for the combojack, but it has specific properties attached to it (Pink Mic, Right Side), unlike "Black Speaker" in my codec-dump. i found out that it was patched in the linux kernel.
to confirm that, i did navigate to "/sys/class/sound/hwC0D0. in here, a specific text file took my interest named driver_pin_configs. sure enough, it was the pin-config that was applied when i boot into linux. i used that pin-config to correct my Line-In node and it is now working properly.
in the case that the microphones / speakers / etc. do not work in the linux, you can get the codec dump from windows with this tool to see the replaced pin-configs.
inclusion of this information might be useful for the people who have the same problem as mine.
this guide was very helpful and the credits goes to them.
Hello, may I ask a question about how to edit the Platforms.XML, layout.xml, and info.plist files to make the built-in speaker sound. Especially when dealing with data under PathMap child nodes in the fixed format of Platforms.XML. For example, the ALC287 of the Yoga Duet IML 2020 laptop currently cannot drive the built-in speaker using Alcid: 21. Can we solve this problem by first resolving the built-in speaker and then processing other nodes.
Thank you for the informative tutorial.
Do you happen to know if there is a way to setup the layout/platform in such a way that macOS would see an audio device with 6 output channels (5.1 audio) rather than 2 output channels (Left/Right Stereo)
Dump Linux ALC 295 X1 Tablet.zip
Reposity:
https://github.com/Baio1977/Lenovo-ThinkPad-X1-Tablet-Gen3-Kabylake-r
I extracted files, for me it's a bit difficult.
I hope you can help me improve the audio setup.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.