Jump to content

OtaK

OtaK

Member Since 29 Nov 2008
Offline Last Active May 21 2014 10:40 AM
-----

Topics I've Started

[Driver Programming] C-Media CMI8788 (Xonar DX/D1/D2... family)

02 January 2012 - 12:57 PM

Hello,

Due to the lacking support of this sound card, I decided to write a driver, I have quite decent background in C and I/O management to think that I'm able to write one.

However, I'm not very familiar with how kexts are working, and the whole process of hooking the code to the kernel.

Does anyone have a reference to share about that, maybe some kext on GitHub or whatever, I'll understand by reading the code, it's not a problem. (Already looked at the Apple Reference on kext writing / using IOKit, it doesn't provide much... They don't really like when we have fun with kexts it seems...)

As for the technical sheets of the CMI8788, I guess I can get them myself on internet, that including the addresses of each input/output the card has.

And if Dogbert could pass by here, I'd be happy to have some help from an expert like him Posted Image

Feel free to help in any way, you're very welcome, because I'm quite a busy man, so the more help I get, the less time I take ;)
Here are my progresses so far :

I guess MacOS can at least see my device, and it seems to try loading AppleHDA for it :

| +-o PCI0@0  <class ioacpiplatformdevice,="" id="" 0x10000012a,="" registered,="" matched,="" active,="" busy="" 0="" (27444="" ms),="" retain="" 74="">
	| | +-o AppleACPIPCI  <class appleacpipci,="" id="" 0x1000001a2,="" registered,="" matched,="" active,="" busy="" 0="" (26989="" ms),="" retain="" 46="">
	| |   +-o pci8086,2e20@0  <class iopcidevice,="" id="" 0x1000001a4,="" registered,="" matched,="" active,="" busy="" 0="" (3="" ms),="" retain="" 27="">
	| |   +-o pci-bridge@1  <class iopcidevice,="" id="" 0x1000001a5,="" registered,="" matched,="" active,="" busy="" 0="" (10163="" ms),="" retain="" 31="">
	| |   | +-o IOPCI2PCIBridge  <class iopci2pcibridge,="" id="" 0x1000001e9,="" registered,="" matched,="" active,="" busy="" 0="" (9756="" ms),="" retain="" 9="">
	| |   |   +-o HDEF@0,1  <class iopcidevice,="" id="" 0x1000001a7,="" registered,="" matched,="" active,="" busy="" 0="" (8948="" ms),="" retain="" 29="">
	| |   |	 +-o AppleHDAController@0,1  <class applehdacontroller,="" id="" 0x1000002ad,="" registered,="" matched,="" active,="" busy="" 0="" (6435="" ms),="" retain="" 6="">
	| |   |	   +-o IOHDACodecDevice@0,1,0  <class iohdacodecdevice,="" id="" 0x1000002b7,="" registered,="" matched,="" active,="" busy="" 0="" (6435="" ms),="" retain="" 6="">
	| |   |		 +-o IOHDACodecDriver  <class iohdacodecdriver,="" id="" 0x1000002bc,="" !registered,="" !matched,="" active,="" busy="" 0="" (1677="" ms),="" retain="" 5="">
	| |   |		   +-o IOHDACodecFunction@0,1,0,1  <class iohdacodecfunction,="" id="" 0x1000002bd,="" registered,="" matched,="" active,="" busy="" 0="" (1677="" ms),="" retain="" 4="">

EDIT : In fact what I saw is my HD4870's HDMI Audio channel


Alright. Understood the major concepts behind generic kexts, and looked into most of how IOKit subclasses system works.

Gonna start writing the enabler for the card, then the audio engine.


Resources :

PID match table (source :http://www.alsa-proj..._EEPROM_Failure)


PCI\VEN_13F6&DEV_8788&SUBSYS_82691043 OK (Xonar D2)
PCI\VEN_13F6&DEV_8788&SUBSYS_82751043 OK (Xonar DX)
PCI\VEN_13F6&DEV_8788&SUBSYS_82B71043 OK (Xonar D2X)
PCI\VEN_13F6&DEV_8788&SUBSYS_83141043 OK (Xonar HDAV1.3)
PCI\VEN_13F6&DEV_8788&SUBSYS_83271043 OK (Xonar DX)
PCI\VEN_13F6&DEV_8788&SUBSYS_834F1043 OK (Xonar D1)
PCI\VEN_13F6&DEV_8788&SUBSYS_835C1043 OK (Xonar Essence STX)
PCI\VEN_13F6&DEV_8788&SUBSYS_835D1043 OK (Xonar Essence ST)
PCI\VEN_13F6&DEV_8788&SUBSYS_835E1043 OK (Xonar HDAV1.3 Slim)
PCI\VEN_13F6&DEV_8788&SUBSYS_838E1043 OK (Xonar DS)
PCI\VEN_13F6&DEV_8788&SUBSYS_84281043 OK (Xonar Xense)
PCI\VEN_13F6&DEV_8788&SUBSYS_84671043 OK (Xonar DG)
PCI\VEN_13F6&DEV_8788&SUBSYS_878813F6 overwritten EEPROM
© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy