Jump to content

Kernel Extension for CS46xx Sound


wmarsh
 Share

15 posts in this topic

Recommended Posts

Is anyone interested in working on an audio driver for CS46xx (Turtle Beach Santa Cruz).

 

To date I have:

1) Examined Apple document re: audio drivers

2) Discovered CS46xx is register compatible with CMI8738, for which dogbert posted a driver including source, except for Command Register bit 0 (I/O space enable) which is r/o on 46xx

3) Found technical documents for CS46xx and CMI8738

4) Examined ALSA code for CS46xx and CMI8738

5) Examined FreeBSD and Linux code for CS46xx

6) Modified dogbert's code to create a driver which will compile cleanly and load successfully in native mode.

 

Unfortunately, the kernel crashes as soon as you output sound.

 

I have either reached the end of my abilities or looked at this too many times. I am not seeing the problem.

 

BTW, you can unload the test driver after the kernel crashes either by accessing OS X from another partition (very slow) or by just booting native and typing in terminal (without using tab to complete path):

sudo rm -R /System/Library/Extensions/<name>.kext

 

BACKGROUND MATERIALS:

 

 

 

SOURCE CODE:

 

 

 

Edit: I was reading dogbert's posts on win2osx.net. Sounds like he made reference to ALSA driver in writing his. So I'm going to look over that code more closely.

Link to comment
Share on other sites

2) Discovered CS46xx is register compatible with CMI8738, for which dogbert posted a driver including source, except for Command Register bit 0 (I/O space enable) which is r/o on 46xx

 

mmh.. no. In fact, the CS46xx family is somewhat different. for instance, the chips support memory mapped i/o transfers over direct i/o, and I haven't seen a good description about the registers in your files.

 

I haven't got much time atm, and I don't have a working x86 installation cause the pci controller of my current machine is beyond good and evil and the replacement is due in 10 days at best.

 

my advise is that u should start from the xcode pci audio sample and port the most simple things from the alsa or freebsd drivers, e.g. the basic chip initialization, resource allocation and so on. the apple documentation lacks some important stuff, but it's pretty good overall, and with the help of my driver's source chances are good that you'll vivify your turtle beach. good luck!

Link to comment
Share on other sites

mmh.. no. In fact, the CS46xx family is somewhat different. for instance, the chips support memory mapped i/o transfers over direct i/o, and I haven't seen a good description about the registers in your files.

 

I haven't got much time atm, and I don't have a working x86 installation cause the pci controller of my current machine is beyond good and evil and the replacement is due in 10 days at best.

 

my advise is that u should start from the xcode pci audio sample and port the most simple things from the alsa or freebsd drivers, e.g. the basic chip initialization, resource allocation and so on. the apple documentation lacks some important stuff, but it's pretty good overall, and with the help of my driver's source chances are good that you'll vivify your turtle beach. good luck!

 

Thanks dogbert, thats a big help.

Maxxuss thinks that a kernel problem might be an issue too.

http://www.win2osx.net/forum/showthread.php?t=2122&page=56

 

I'm going to try to get the debug screen as he suggested booting with debug=0x100

Then I'll try the same thing with the new kernel he just posted (4.1)

 

Once I know its not a kernel problem, then I'll go the porting route. The ALSA driver looks better documented.

Link to comment
Share on other sites

Porting FreeBSD Driver:

 

I have been taking dogbert's advice and have begun porting the FreeBSD driver.

 

There is an issue with the timer which is handled differently in OS X.

This document addresses that and may be of interest to others porting drivers.

 

 

Link to comment
Share on other sites

  • 1 month later...
hi, I'm wondering is there any progress atm? I'm using a soundcard with cs4630. Can I help?

 

I gave up and replaced my soundcard with cmi8738 -- found one on net for $5.

 

The timer issue was complex and it wasn't worth further effort.

Link to comment
Share on other sites

I agree with you that CS46 gives great sound.

 

The problem is that its a two chip card. The chip that interfaces with the PCI bus has to wake up the second chip, and doing so in the DOS example driver (upon which the BSD, Linux, and Windows drivers were based) involved waiting a set number of millisecs before taking the next initialization step.

 

Making OS X wait turns out to be a rather significant problem. See this download I found at Apple.

http://forum.osx86project.org/index.php?sh...st=entry39076

 

I'm not a C programmer either, but I can program C well enough to translate drivers. But this timer problem has to be solved in a different way under OS X. Or at least I couldn't figure out how to do it.

 

I am happy enough with the CMI8738 sound quality. In fact the OS/2 and BSD CS46xx drivers never worked that well, and in these OSs, the CMI sound is superior.

 

Considering how much time I put into this without success, $5 plus shipping for a CMI card is money well spent.

Link to comment
Share on other sites

  • 2 weeks later...
I gave up and replaced my soundcard with cmi8738 -- found one on net for $5.

 

The timer issue was complex and it wasn't worth further effort.

 

odd, I just picked up the card and plugged it in... OS X doesn't even see it...

Link to comment
Share on other sites

  • 8 months later...
Mostly to try to "re-activate" interest in it. Why does anyone do anything? To get something accomplished!

cost of a usb sound device: 15 usd

cost of developing a device driver: ~50 hrs * 60 usd/hr + taxes + testing

 

have fun "re-activating" people.

Link to comment
Share on other sites

 Share

×
×
  • Create New...