OtaK Posted January 2, 2012 Share Posted January 2, 2012 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 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 Link to comment Share on other sites More sharing options...
OtaK Posted January 5, 2012 Author Share Posted January 5, 2012 Got Dogbert's source, very helpful, I won't pass on mentionning him in the credits ! I'm currently writing enabler/audio engine, and for the technical reference, I'll have to look into Linux ALSA drivers. 2 Link to comment Share on other sites More sharing options...
OtaK Posted January 16, 2012 Author Share Posted January 16, 2012 Some parts of the driver are done, only writing/reading on/from the chip registers is left, and for that, I'm constantly examining the ALSA driver. I am, in fact, doing a port of Clemens Ladisch's CMI8788 drivers, for now only for Xonar D1, for the rest I'll integrate once I'll have a working one for my own card. Link to comment Share on other sites More sharing options...
Trex20xx Posted January 16, 2012 Share Posted January 16, 2012 what is more exactly the linux ALSA driver ? is the linux version of the driver for these cards ? Link to comment Share on other sites More sharing options...
OtaK Posted January 18, 2012 Author Share Posted January 18, 2012 Yep exactly, ALSA = Advanced Linux Sound Architecture. Link to comment Share on other sites More sharing options...
Riley Freeman Posted January 21, 2012 Share Posted January 21, 2012 It's great to finally see someone working on a driver for this. Maybe I'll finally be able to get my D2 working! Link to comment Share on other sites More sharing options...
OtaK Posted January 26, 2012 Author Share Posted January 26, 2012 D2, D2X support will come once I'll get my D1 to work. And also, I'm quite busy atm, so the project is on hold for the week to come. Link to comment Share on other sites More sharing options...
Riley Freeman Posted January 27, 2012 Share Posted January 27, 2012 Any sign of progress is welcome. If you want a tester for D2 when the time comes, just let me know. Link to comment Share on other sites More sharing options...
Trex20xx Posted February 13, 2012 Share Posted February 13, 2012 hello otak. how's it going? did you manage to make your soundcard work ? how is interacting with mac os ? any quality and frequency response tests ? Link to comment Share on other sites More sharing options...
OtaK Posted February 15, 2012 Author Share Posted February 15, 2012 As I said before, I got very busy, and unfortunately, it kept going till I got a burn-out syndrome... So at that very moment, I'm resting. maybe I'll catch up with the driver, interesting and relaxing stuff So for now, if I recall correctly, I wrote the power-on code, the rest is just about writing physically on the chip, just small parts of code to insert, the rest should be OK. I planned to support many frequencies / bitrates since the very start. (44,1/48/96/192KHz at both 16/24bits) That's it for now I'm really sorry for the delay, but my body told me to stop working ^^' Link to comment Share on other sites More sharing options...
Trex20xx Posted February 16, 2012 Share Posted February 16, 2012 i'm very sorry to hear that. i wish you get healthy (and i think all of insanelymac comunity wishes the same). that are very good news . can i ask you what this coding is about ? how does a code part looks like ? Link to comment Share on other sites More sharing options...
OtaK Posted February 16, 2012 Author Share Posted February 16, 2012 It's about writing some special binary flags at some physical places on the chip to enable/disable/control functionalities. For example (random example), I'll write a binary addition of GET_POWER and TURN_ON (GET_POWER | TURN_ON) constants to the physical address of the power controller, which will result in the card turning on. As simple as that, but the real problem is making the sort in the hundreds of constants and addresses that are written in the ALSA drivers, as those support a very wide range of CMI cards. I already extracted a bunch of them, just need to make a code that works for my card, public testing for D1 users, then when it's stable, adaptable code for every card I plan to support Anyway, if any of you want to help, I'll be happy to let you use my SVN repo (Just beware, the actual part of the coding is very architecture-low level code and needs a deep understanding of I/O and almost some electronics knowledge) (Anyway, gonna maybe break my OSX install cause of the Messages Beta that got out today, NEED to update to 10.7.3 for this... http://www.apple.com.../messages-beta/ EDIT : didn't break anything, awesome, and Messages is even more awesome.) Link to comment Share on other sites More sharing options...
OtaK Posted February 25, 2012 Author Share Posted February 25, 2012 Slight update : A member of the forums (I guess he/she wants to remain anonymous) gave me the technical sheet about registers, addresses and such. The great thing is that I don't have any idea of how he got that document, as it's confidential and under NDA... Let's not ask too much questions ! And of course, I won't attach it here, as it'd be illegal. Link to comment Share on other sites More sharing options...
Trex20xx Posted February 26, 2012 Share Posted February 26, 2012 well done, anonymous .. well done otak Link to comment Share on other sites More sharing options...
toxicfusion Posted February 28, 2012 Share Posted February 28, 2012 Hi there, I to own a card with the C-Media C8788 chip.. The HT Omega Claro Plus, Love this card. I've recently moved to OSX 10.7.3 Lion, and want to use this card... I'm willing to donate to this project after release of a working driver / kext file. If 2.1 audio and mic-in works - thats OK with me! Link to comment Share on other sites More sharing options...
OtaK Posted February 29, 2012 Author Share Posted February 29, 2012 No worries, we talked about it in private Update : I'm soon ending up my freelance project, when it'll be done, be sure that I'd dedicate my free time to both my gf and this driver Link to comment Share on other sites More sharing options...
Gringo Vermelho Posted March 1, 2012 Share Posted March 1, 2012 Just popping in to thank you OtaK, this doesn't happen very often, someone appearing out of nowhere writing a driver for unsupported hardware. And it's nice to hear about the valuable anonymous contribution, so another thank you to whoever provided that. You rock! Good luck, and keep up the good work. 1 Link to comment Share on other sites More sharing options...
OtaK Posted March 2, 2012 Author Share Posted March 2, 2012 Thank you! Great to be considered as such from an InsanelyMac mod Be sure that I'll keep this topic updated as soon as I will have updates for you 1 Link to comment Share on other sites More sharing options...
Subliminal Aura Posted March 8, 2012 Share Posted March 8, 2012 Subscribed and Good luck. I too write Linux Kernel modules but am a complete OS X noob - would love to get involved with porting Link to comment Share on other sites More sharing options...
OtaK Posted March 10, 2012 Author Share Posted March 10, 2012 Hmm why not, I'll get in touch with you when I'll get back on the project, maybe. The only part left is the one common with all the Kernel modules, I/O with the physical device. The rest (IOKit Classes / methods) is done already I'll see if I can do myself, and why not getting your help with porting more cards (Anyway the project needs a massive refactoring, in the current state, it'd be quite awful to port more cards, but it's in my plans.) Link to comment Share on other sites More sharing options...
ollysharp Posted March 13, 2012 Share Posted March 13, 2012 Mate if you do this I will love you forever. I have a d2x if you want any testing. p.s. I had to pass two quizes just to post this! Link to comment Share on other sites More sharing options...
simply.mots Posted March 25, 2012 Share Posted March 25, 2012 Hey OtaK, any progress on this? Link to comment Share on other sites More sharing options...
OtaK Posted March 25, 2012 Author Share Posted March 25, 2012 Still not, being really busy atm... :/ Link to comment Share on other sites More sharing options...
Trex20xx Posted April 27, 2012 Share Posted April 27, 2012 ; so .. what's the deal ? is it working ? Link to comment Share on other sites More sharing options...
littleclaz Posted May 25, 2012 Share Posted May 25, 2012 Hey just posting to ask what is the progress of this?? as I really cannot keep using my Razer Megalodon for sound (as my onboard sound chip blew on my Asus Sabertooth X58) and i really miss listening to music and playing games :L if you need testers for Xonar DS pass it my way and ill help test driver Thankies.. -Stephen- Link to comment Share on other sites More sharing options...
Recommended Posts