Contribute
Register

XPS 9700 audio - Comet Lake PCH cAVS, any chances?

Status
Not open for further replies.
Joined
Mar 8, 2017
Messages
758
Motherboard
Dell XPS 9700 4K (OpenCore)
CPU
i7-10875H
Graphics
UHD 630, 3840x2400
Mobile Phone
  1. Android
Hey there!

I'm kind of feeling like I'm out of luck... Working on my XPS 9700 4K and I'm dead stuck on sound. After fiddling around with Ubuntu, I figured out that this seems to be my non-nvidia soundcard:

Code:
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Comet Lake PCH cAVS [8086:06c8]
        Subsystem: Dell Comet Lake PCH cAVS [1028:098f]

Is there any chance of getting this to work? Is AppleALC even geared at those soundcards? I just need a starting-point, somewhere, :/.
Attached my alsa info dump. I cannot seem to disable the nvidia gpu in my BIOS, which is why I can't just dump /proc/asound/xxx, since there's only nvidia and sofsoundwire. Doesn't seem to be a Realtek codec anyways, I guess?
 

Attachments

  • alsa-info.txt
    50.6 KB · Views: 103
Seems like it *is* possible, since this repo talks about fully working sound, and the 9500 is based on the same CPU generation, thus the same sound codec.

Code:
Bus info          Device          Class          Description
============================================================
pci@0000:01:00.1                  multimedia     TU106 High Definition Audio Controller
usb@1:5                           multimedia     Integrated_Webcam_HD
pci@0000:00:1f.3                  multimedia     Comet Lake PCH cAVS

Looking at lshw's businfo of sound devices/multimedia devices, Pci(0x1F, 0x3) also makes sense, as that repo used. Maybe I just need to further learn about why it uses the device-id it does, and what layouts are available. Just very hard to quickly debug rn, since I'm booting of a slow usb stick. NVMe is arriving on Monday, then I'll be a lot faster.
 
20211212_105645.jpg


Okay, it's an ALC711, which is not yet supported in AppleALC. I would try to learn about creating custom layouts, but I can't seem to dump this codec on Ubuntu, because stupid nvidia gets in the way (at least that's what I think...).
 
Alright, small progress (at least I understand more now)!

Having a look at my alsa info, it states that I have a [8086:06c8] Intel Sound Controller. Looking at AppleALC's already existing controller patches, I find my 06C8 right at the bottom! Their controllers plist is an array of dicts, where each dict is a controller. The Integer "Device" corresponds to "device-id". 0x06C8 is 1736 in DEC, and that can be found inside the plist:

XML:
<dict>
  <key>Device</key>
  <integer>1736</integer>
  <key>Name</key>
  <string>400 Series PCH HD Audio</string>
  <key>Patches</key>
  <array>
    <dict>
      <key>Count</key>
      <integer>1</integer>
      <key>Find</key>
      <data>DgAAvgIAAABIid8=</data>
      <key>MinKernel</key>
      <integer>19</integer>
      <key>Name</key>
      <string>AppleHDAController</string>
      <key>Replace</key>
      <data>DgAAuHCdAADrBpA=</data>
    </dict>
  </array>
  <key>Vendor</key>
  <string>Intel</string>
</dict>

So I set my PciRoot(0x0)/Pci(0x1F,0x3)'s device-id to C8060000 (big endian). After booting and dumping IOReg, this is what I got:

Code:
HDAS@1F,3  <class IOPCIDevice, id 0x100000255, registered, matched, active, busy 0 (311 ms), retain 9>
{
  "assigned-addresses" = <10fb00824000000000801111000000000040000020fb008240000000000000110000000000001000>
  "class-code" = <00010400>
  "IODeviceMemory" = (({"address"=275164266496,"length"=16384}),({"address"=275163119616,"length"=1048576}))
  "IOPowerManagement" = {"CurrentPowerState"=2,"CapabilityFlags"=258,"ChildProxyPowerState"=2,"MaxPowerState"=3}
  "subsystem-vendor-id" = <28100000>
  "built-in" = <00>
  "acpi-device" = "IOACPIPlatformDevice is not serializable"
  "vendor-id" = <86800000>
  "name" = <"pci8086,6c8">
  "device-id" = <c8060000>
  "acpi-pmcap-offset" = 80
  "layout-id" = <5d000000>
  "IOPCIResourced" = Yes
  "compatible" = <"pci1028,98f","pci8086,6c8","pciclass,040100","HDAS">
  "IOServiceDEXTEntitlements" = (("com.apple.developer.driverkit.transport.pci"))
  "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDAS@1f0003"
  "model" = <"400 Series PCH HD Audio">
  "subsystem-id" = <8f090000>
  "revision-id" = <00000000>
  "AAPL,slot-name" = <"Internal@0,31,3">
  "device_type" = <"Audio device">
  "pcidebug" = "0:31:3"
  "reg" = <00fb00000000000000000000000000000000000010fb00020000000000000000000000000040000020fb000200000000000000000000000000001000>
  "IOName" = "pci8086,6c8"
}

So I *think* that the controller is recognized by macOS, just the codec would need patching. And I still can't dump ALC711 under Linux... :/

// Edit: As this device still has the name HDAS and not HDEF, I think AppleALC didn't recognize it...
 
Last edited:
Alright, I think I’m about half way there. I now learned that device-id is used for AppleALC to apply search/replace patches in the com.apple.driver.AppleHDAController kext, where my [8086:06c8] is supported. But this doesn’t make macOS accept [8086:06c8], which is why I need to fake the PCI-ID of 06c8, but keep the vendor-id of 8086. Did that using FakePCIID_Intel_HDMI_Audio.kext, editing it's plist to only have this one entry:

Code:
    <key>IOKitPersonalities</key>
    <dict>
        <key>Intel CML PCH (device-id c8060000)</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>org.rehabman.driver.FakePCIID</string>
            <key>IOClass</key>
            <string>FakePCIID</string>
            <key>IOMatchCategory</key>
            <string>FakePCIID</string>
            <key>IOPCIPrimaryMatch</key>
            <string>0x06c88086</string>
            <key>IOProviderClass</key>
            <string>IOPCIDevice</string>
            <key>FakeProperties</key>
            <dict>
                <key>RM,device-id</key>
                <data>cJ0AAA==</data>
            </dict>
        </dict>
    </dict>

It matches on 0x06c88086 (IOPCIPrimaryMatch), which is my [8086:06c8], and it sets a fake ID of 709D0000, which is a Sunrise Point-LP HD Audio Controller (supported in macOS).

Now, with this, I finally have HDEF and no longer HDAS, which means AppleALC picked up on it.

Code:
+-o HDEF@1F,3  <class IOPCIDevice, id 0x100000255, registered, matched, active, busy 0 (293 ms), retain 13>
| | {
| |   "acpi-device" = "IOACPIPlatformDevice is not serializable"
| |   "IOPCIMSIMode" = Yes
| |   "assigned-addresses" = <10fb00824000000000801111000000000040000020fb008240000000000000110000000000001000>
| |   "vendor-id" = <86800000>
| |   "class-code" = <00010400>
| |   "subsystem-vendor-id" = <28100000>
| |   "hda-gfx" = <"onboard-1">
| |   "IOName" = "pci8086,6c8"
| |   "IOPCIUseDeviceMapper" = Yes
| |   "pcidebug" = "0:31:3"
| |   "layout-id" = <07000000>
| |   "IOServiceDEXTEntitlements" = (("com.apple.developer.driverkit.transport.pci"))
| |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| |   "built-in" = <00>
| |   "IOPCIResourced" = Yes
| |   "AAPL,slot-name" = <"Internal@0,31,3">
| |   "alc-layout-id" = <5d000000>
| |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2,"CapabilityFlags"=258,"ChildProxyPowerState"=2,"MaxPowerState"=3}
| |   "PinConfigurations" = <00>
| |   "name" = <"pci8086,6c8">
| |   "subsystem-id" = <8f090000>
| |   "acpi-pmcap-offset" = 80
| |   "model" = <"400 Series PCH HD Audio">
| |   "IODeviceMemory" = (({"address"=275164266496,"length"=16384}),({"address"=275163119616,"length"=1048576}))
| |   "MaximumBootBeepVolumeAlt" = <7f>
| |   "device_type" = <"Audio device">
| |   "compatible" = <"pci1028,98f","pci8086,6c8","pciclass,040100","HDAS","HDEF">
| |   "RM,device-id" = <709d0000>
| |   "IOReportLegendPublic" = Yes
| |   "reg" = <00fb00000000000000000000000000000000000010fb00020000000000000000000000000040000020fb000200000000000000000000000000001000>
| |   "driver-child-bundle" = "com.apple.driver.AppleHDAController"
| |   "MaximumBootBeepVolume" = <7f>
| |   "IOReportLegend" = ({"IOReportGroupName"="Interrupt Statistics (by index)","IOReportChannels"=((5291294645182070784,4295098369,"               First Level Interrupt Handler Count"),(5291294645182070785,4295098369,"              Second Level Interrupt Handler Count"),(5291294645182070786,4295098369,"        First Level Interrupt Handler Time (MATUs)"),(5291294645182070787,4295098369,"   Second Level Interrupt Handler CPU Time (MATUs)"),(5291294645182070788,4295098369,"Second Level Interrupt Handler System Time (MATUs)")),"IOReportChannelInfo"={"IOReportChannelUnit"=0},"IOReportSubGroupName"="HDEF 1"})
| |   "device-id" = <c8060000>
| |   "revision-id" = <00000000>
| |   "IOInterruptSpecifiers" = (<1000000007000000>,<0900000000000100>)
| |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDAS@1f0003"
| | }

Last thing remaining: Somehow dump my ALC711 codec, and generating a layout for it. But for me, that's actually the hardest part.

// Edit:

Nevermind, it works without FakePCIID too, since AppleALC does it all for this controller...
 
Last edited:
Hi,
Any luck?
 
Would love to hear any suggestions for my 9700 EFI. Pretty happy as-is but getting sleep to work, better battery, or audio would be amazing! Here's mine:
 
@thewhoareyou

Funny, I'm working on a repo too rn, :D. Mine is private still, but I'm going to release it soo. I'm patching the brightness keys right now, and as this thread shows I'm also working on audio. But right now, I'm dead stuck, but I still try to research further every day.

Seems like the Realtek Codecs are on the Intel SoundWire-Bus, and I don't know how to reach them. I don't know whether or not this is some very modern sh**, or if it's default stuff and I just didn't ever think about it. Would help very much to have a person with a working audio 9500 10th gen, who could provide further infos.

// Edit: BTW, what do you mean with better battery? Better duration or better support? Mine works pretty good.

@atrslb

Not yet, but I'm not giving up! :)
 
@thewhoareyou

Funny, I'm working on a repo too rn, :D. Mine is private still, but I'm going to release it soo. I'm patching the brightness keys right now, and as this thread shows I'm also working on audio. But right now, I'm dead stuck, but I still try to research further every day.

Seems like the Realtek Codecs are on the Intel SoundWire-Bus, and I don't know how to reach them. I don't know whether or not this is some very modern sh**, or if it's default stuff and I just didn't ever think about it. Would help very much to have a person with a working audio 9500 10th gen, who could provide further infos.

// Edit: BTW, what do you mean with better battery? Better duration or better support? Mine works pretty good.

@atrslb

Not yet, but I'm not giving up! :)
Duration. Looking forward to seeing your repo!
 
@thewhoareyou

Are you undervolting? That yields some extra battery life.
 
Status
Not open for further replies.
Back
Top