IPB

Welcome Guest ( Log In | Register )

17 Pages V   1 2 3 > »   
Reply to this topicStart new topic
Homebrew CMI 8738 drivers
d0gbert
post Oct 16 2006, 16:50
Post #1





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



Hi everyone!

I'm currently working on WDM drivers for soundcards based on the C-Media 8738/8768 chip. I plan to release the entire source code under a BSD-like license sometime in the future. I'm mainly interested in the S/PDIF connectivity because the DAC of the card sucks.

For testing, you need:
- a CMI 8738-MX/8768 based soundcard with S/PDIF (which are available for around 10-15 USD)
- Windows 2000/XP

Some of the features are:
- bitperfect S/PDIF output for 16bit 44.1/48/88.2/96kHz stereo signals through kernel streaming / dsound / waveout
- bitperfect AC3/DTS passthrough
- multi-channel output (that disables the S/PDIF output port unfortunately)
- recording support
- basic mixer support
- UART support (but disabled for now)

Apparently, the C-Media chip supports only 16 bit contrary to the claims in their specs. I haven't been able to get 24bit output even with the official drivers. But 96kHz output seems to work fine on the newer 8738 chips.

You can help me by posting your chip version and configuration, and testing whether 16bit/96kHz and 24bit/48kHz output through kernel streaming works (foobar2000, winamp have the necessary plugins). I'm specifically looking for people who have means to tell a 16bit S/PDIF stream from a 24bit stream.
When the driver loads, it prints the version of your chip to the kernel debugger. You need a running instance of DebugView (http://www.sysinternals.com/Utilities/DebugView.html) to catch the strings. In other words: open DebugView before updating the drivers.

Note that the drivers aren't signed, so you have to install them manually (Update Driver => Install from a list or specific location => Don't search. I will choose the driver to install => Continue anyway).
A 64-bit build has been successfully tested, and I'll probably release a build sometime soon.

Here are the download links for the latest version:


So long,

dogbert

This post has been edited by d0gbert: Mar 14 2008, 20:30
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 17 2006, 02:25
Post #2





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



Awesome! beer.gif

I'll try these drivers out today. I tried some M Audio DIO drivers before which gave bit -perfect wav output as long as you manually selected the right # of bits and frequency, but couldn't automatically change to what was needed when playing DTS or AC3.
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 17 2006, 02:59
Post #3





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



The only thing debugview shows is:
[2692] Exiting because c:\windows\system32\runonce.exe is in the Windows directory.
then
[XXXX] Exiting because c:\windows\system32\rundll32.exe is in the Windows directory.

a bunch of times, where XXXX is a 4 digit number.

This is Windows XP Pro, sp2.

This post has been edited by Leto Atreides II: Oct 17 2006, 03:00
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 17 2006, 03:38
Post #4





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



My system is a Soltek QBic 3801 with a built-in CMI 8768.

Bit perfect worked great, able to automatically switch to the correct freq unlike the DIO drivers I tried.

My stereo showed 44.1, 48, 96khz all worked great. 88.2 I think also worked but my stereo didn't know what to display when it was playing it, the display got a bit confused.

24-bit also didn't seem to work for me. It would continue to come out 16 bit with directsound selected. With kernel-streaming used in FB2K 24-bit wouldn't do anything at all, nothing would come out.

The major problem for me is that it seems to have disabled all the headphone outputs. sad.gif

This post has been edited by Leto Atreides II: Oct 17 2006, 03:46
Go to the top of the page
+Quote Post
d0gbert
post Oct 17 2006, 07:48
Post #5





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE (Leto Atreides II @ Oct 16 2006, 20:38) *
The major problem for me is that it seems to have disabled all the headphone outputs. sad.gif


Try this version: http://mitglied.tripod.de/atproc2/CMI-091-release.zip
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 17 2006, 09:46
Post #6





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



QUOTE (d0gbert @ Oct 16 2006, 22:48) *
QUOTE (Leto Atreides II @ Oct 16 2006, 20:38) *

The major problem for me is that it seems to have disabled all the headphone outputs. sad.gif

Try this version: http://mitglied.tripod.de/atproc2/CMI-091-release.zip

Works great! smile.gif

Thanks!

It seems that the volume is now much louder than with the regular drivers, but it's not such a big deal. Just gotta remember to keep the volume slider down. Or it could be I'm just imagining it. laugh.gif

Sorry I can't seem to get the debugging information to get captured properly to give you any further information about my setup.
Go to the top of the page
+Quote Post
d0gbert
post Oct 21 2006, 02:02
Post #7





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



new release 0.92:
- built with the latest WDK (version 5728)
- first AMD64/EM64T release - this driver should work on your Windows XP x64 installation and on Vista x64. To install the driver on x64 version of Vista, you must disable the driver signature enforcement during boot-up with the F8 key
- stupid fix for a nasty bug which rendered large parts of the mixer useless

I'm keen to know whether the driver actually works on Vista. So if you have a card lying around and some time, please test and report smile.gif.

This post has been edited by d0gbert: Oct 21 2006, 12:55
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 21 2006, 03:00
Post #8





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



Thanks. smile.gif

This post has been edited by Leto Atreides II: Oct 21 2006, 03:01
Go to the top of the page
+Quote Post
Leto Atreides II
post Oct 21 2006, 05:45
Post #9





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



When do you think you'll start releasing the source? And when you do, what will be necessary to compile it? I'm interested in taking a look.
Go to the top of the page
+Quote Post
d0gbert
post Oct 21 2006, 12:54
Post #10





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE (Leto Atreides II @ Oct 20 2006, 22:45) *
When do you think you'll start releasing the source?

released under BSD license, check the site.

QUOTE
And when you do, what will be necessary to compile it? I'm interested in taking a look.


You need the Windows Driver Development Kit (WinDDK/WDK, http://www.microsoft.com/whdc/driver/found.../WhichDDK.mspx). I've used build 2600 and 5728 so far.
Unpack the stuff to <DDK>\src[\wdm]\audio, set the paths in paths.bat and you're ready to go. There's a bunch of batch files for building the binaries / updating the driver.

This post has been edited by d0gbert: Oct 21 2006, 12:59
Go to the top of the page
+Quote Post
zima
post Oct 31 2006, 11:25
Post #11





Group: Members
Posts: 128
Joined: 3-July 03
From: Pomerania
Member No.: 7541



I wonder...how hard would be to modify drivers for 9738 (integrated on many motherboardsl and BTW: http://www.hydrogenaudio.org/forums/index....c=38113&hl= )


--------------------
http://last.fm/user/zima
Go to the top of the page
+Quote Post
d0gbert
post Oct 31 2006, 13:49
Post #12





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE (zima @ Oct 31 2006, 04:25) *
I wonder...how hard would be to modify drivers for 9738 (integrated on many motherboardsl and BTW: http://www.hydrogenaudio.org/forums/index....c=38113&hl= )


The 9738 is a regular AC97 codec, meaning that there are lots of limitations like fixed sample rate (48kHz) etc - a generic AC97 driver should support most of the features of the codec, maybe even bitperfect output for that particular sample rate.
In contrast, the 8738 is a regular and pretty simple PCI codec, so they require completely different drivers and have only very few things in common, namely the C-Media logo on top of the chip blink.gif.

This post has been edited by d0gbert: Oct 31 2006, 13:54
Go to the top of the page
+Quote Post
howardbut
post Nov 2 2006, 20:12
Post #13





Group: Members
Posts: 2
Joined: 2-November 06
Member No.: 37093



it sounds awesome! but could I have the following request in the next update:

- software AC3 decode from SPDIF-in

The reason is that I have a XBOX and would like to use the computer as an audio decoder so that I can feed the surround audio into my 5.1 computer speaker setup.

Thank you.
Go to the top of the page
+Quote Post
d0gbert
post Nov 2 2006, 21:02
Post #14





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE (howardbut @ Nov 2 2006, 13:12) *
it sounds awesome! but could I have the following request in the next update:

- software AC3 decode from SPDIF-in

The reason is that I have a XBOX and would like to use the computer as an audio decoder so that I can feed the surround audio into my 5.1 computer speaker setup.

Thank you.


Mhh, no, sorry. I think that's a bad idea because running digital signal processing code in kernel space proves to be difficult due to timing constraints (keyword glitches), and the AC3 stuff is mined with patents. The main motivation behind the driver is to provide a bitperfect transceiver for digital audio signals rather than a DSP.

You could run an AC3 decoder as an application which decodes the S/PDIF In signal to your speakers, but you'd experience a nasty lag (10-20ms and more) due to the limitations of the windows driver model. This particular design flaw has been fixed in Vista, but it requires modifications to the driver and limits it to Vista, of course. I'll probably implement the stuff when Vista is final and I'll have some free time.

This post has been edited by d0gbert: Nov 2 2006, 21:04
Go to the top of the page
+Quote Post
saratoga
post Nov 2 2006, 21:26
Post #15





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



Mind if I ask how you got into Windows driver developement? It always struck me as an interesting topic.
Go to the top of the page
+Quote Post
howardbut
post Nov 3 2006, 01:16
Post #16





Group: Members
Posts: 2
Joined: 2-November 06
Member No.: 37093



thank you d0gbert.
referring to your reply, could you please suggest me which AC3 decoder can do my required work? How can i manage the settings?

Cheers~



QUOTE (d0gbert @ Nov 2 2006, 20:02) *
QUOTE (howardbut @ Nov 2 2006, 13:12) *

it sounds awesome! but could I have the following request in the next update:

- software AC3 decode from SPDIF-in

The reason is that I have a XBOX and would like to use the computer as an audio decoder so that I can feed the surround audio into my 5.1 computer speaker setup.

Thank you.


Mhh, no, sorry. I think that's a bad idea because running digital signal processing code in kernel space proves to be difficult due to timing constraints (keyword glitches), and the AC3 stuff is mined with patents. The main motivation behind the driver is to provide a bitperfect transceiver for digital audio signals rather than a DSP.

You could run an AC3 decoder as an application which decodes the S/PDIF In signal to your speakers, but you'd experience a nasty lag (10-20ms and more) due to the limitations of the windows driver model. This particular design flaw has been fixed in Vista, but it requires modifications to the driver and limits it to Vista, of course. I'll probably implement the stuff when Vista is final and I'll have some free time.
Go to the top of the page
+Quote Post
d0gbert
post Nov 3 2006, 09:53
Post #17





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE (Mike Giacomelli @ Nov 2 2006, 14:26) *
Mind if I ask how you got into Windows driver developement? It always struck me as an interesting topic.

Uhm.. more or less by accident. I'm generally interested in the architecture of operating system kernels, and driver development goes along with it.

QUOTE
referring to your reply, could you please suggest me which AC3 decoder can do my required work? How can i manage the settings?

graphedt.exe in conjunction with a proper AC3 codec. I haven't tested the SPDIF input capabilities yet, so I might try the stuff later on.
Go to the top of the page
+Quote Post
René Eske Jensen
post Nov 8 2006, 08:13
Post #18





Group: Members
Posts: 4
Joined: 8-November 06
Member No.: 37307



QUOTE (d0gbert @ Oct 21 2006, 02:02) *
I'm keen to know whether the driver actually works on Vista. So if you have a card lying around and some time, please test and report smile.gif.


Hi there!

Thanks for spending time on a driver for the CMI chip, the native driver really sucks.

Anyway, I have tried the driver both in XP and Vista, and it works well. I had some problems during installation in Vista (BSOD), but I think it relates to uninstalling the old driver (if I just uninstall the old driver I get the same BSOD). Using safe mode I had no problems installing the driver.

The driver works fine but I cannot turn off the digital output. I don't need to, but when the option to do so is present, it should work.

I can't choose multichannel output. I don't need it either, but I can see in the release note that it should be possible, so at least I should be able to.

Is the selection of sample rate on the output automatic and dependent on the input signal? Contrary to the native driver, your driver doesn't have any option to change the sample rate.

Anyway, thanks for a nice driver. Now I am able to get digital out in Vista. Thanks a bunch!

BR,
René

HW config:
Soltek 75FRN2-L
Athlon XP2500+
Terratec 5.1 Fun
Radeon 9600
Go to the top of the page
+Quote Post
René Eske Jensen
post Nov 8 2006, 12:59
Post #19





Group: Members
Posts: 4
Joined: 8-November 06
Member No.: 37307



Hi again,

Just another thing - the mute function doesn't work, at least not for the main volume control.

BR,
René
Go to the top of the page
+Quote Post
d0gbert
post Nov 8 2006, 14:13
Post #20





Group: Members
Posts: 15
Joined: 17-November 05
Member No.: 25818



QUOTE
I had some problems during installation in Vista (BSOD), but I think it relates to uninstalling the old driver (if I just uninstall the old driver I get the same BSOD).

Yep, that's a bug in the old official cmedia driver - I had the same problem with version 0639 I think.

QUOTE
The driver works fine but I cannot turn off the digital output. I don't need to, but when the option to do so is present, it should work.

The analog part of the card is a nice extra, and the main aim of the driver is to provide a bitperfect spdif interface, but...

QUOTE
I can't choose multichannel output. I don't need it either, but I can see in the release note that it should be possible, so at least I should be able to.

... u can turn off the digital interface by selecting a multi channel configuration in your "sounds and audio devices" control panel applet (number of channels >=4).
The problem you will run into is that the driver "forgets" the channel configuration after each restart.

QUOTE
Is the selection of sample rate on the output automatic and dependent on the input signal?

Uhm, yes, the sample rate is selected by the kmixer, the way it's supposed to be in every WDM implementation. That means that if you start playing a 48kHz 16bit wave PCM stream and nothing else is pushing stuff through the kmixer, the driver sets the card to 48kHz 16bit. If you start playing another wave stream, let's say 96 kHz 16bit, the kmixer queries the driver whether the stream can be played simultaneously, which isn't possible due to obvious constraints (no support for hardware mixing), so the kmixer downsamples the stream to the format of the current stream, mixes them together and sends the resulting stream to the driver / card.
This is obviously a pretty bad design flaw, and Windows Vista has the ability to somewhere define a default sample rate and resolution. I might add a control application some time in the future though which would implement similiar functionality and some more stuff.

QUOTE
Just another thing - the mute function doesn't work, at least not for the main volume control.

Yeah, and the DAC volume doesn't work on 8768 devices etc etc. There are plenty of hardware revisions out there, and the specifications from C-Media have absolutely no information about the changes and capabilities of each of those revisions.
Go to the top of the page
+Quote Post
Leto Atreides II
post Nov 8 2006, 19:41
Post #21





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



QUOTE (d0gbert @ Nov 8 2006, 05:13) *
Yeah, and the DAC volume doesn't work on 8768 devices etc etc. There are plenty of hardware revisions out there, and the specifications from C-Media have absolutely no information about the changes and capabilities of each of those revisions.


Actually the DAC volume has been working since 0.9.2. At least it has for me on my 8768.
Go to the top of the page
+Quote Post
Leto Atreides II
post Nov 8 2006, 20:56
Post #22





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



QUOTE (Leto Atreides II @ Nov 8 2006, 10:41) *
QUOTE (d0gbert @ Nov 8 2006, 05:13) *

Yeah, and the DAC volume doesn't work on 8768 devices etc etc. There are plenty of hardware revisions out there, and the specifications from C-Media have absolutely no information about the changes and capabilities of each of those revisions.


Actually the DAC volume has been working since 0.9.2. At least it has for me on my 8768.


I should probably be more specific. The DAC slider doesn't do anything but the main volume slider works fine -- and it only changes the volume of the DAC output, since the digital out can't change when it's bit-perfect.
Go to the top of the page
+Quote Post
lavak
post Nov 14 2006, 07:38
Post #23





Group: Members
Posts: 2
Joined: 14-November 06
Member No.: 37562



This is fantastic. I have a soyo sy-k7v dragon plus MB with onboard CMI8738 and optical/coax in/out.

I have noticed that my drivers (c-media 5.12.1.639) don't support simultaneous digital in and out.

Do yours?

And.. does the clock of the input need to be synced with the clock of the output in this mode? Or does the chip have an asynchronous PLL for receive clocking?


I will try your version soon,
thanks!


EDIT:
OK, they installed fine, and work! A few issues, though: at first no digital out, only digital in worked. then I was playing an MP3 and changed the 's/pdif 5V signal level' switch (what does that do anyway?) and winamp crashed, and the digital output was brought to life (toslink glowing red). However, since then there is no way to revive the digital input without a reboot. no amount of switching and fiddling worked. Also, there is no way to turn the digital output off.

Also, what is the DAC level slider adjusting, exactly? it doesn't change the wav output volume, but that must go through the DAC, right?

Chip version markings:
CMI8738/PCI-6ch-MX
HRTF 3D Audio
M8Y31-0140
UGG1DB

This post has been edited by lavak: Nov 14 2006, 08:24
Go to the top of the page
+Quote Post
Leto Atreides II
post Nov 14 2006, 17:55
Post #24





Group: Members
Posts: 163
Joined: 13-January 02
From: Eugene, OR
Member No.: 1009



AFAIK the DAC level slider isn't adjusting anything. See previous posts.
Go to the top of the page
+Quote Post
qs_test
post Nov 15 2006, 07:09
Post #25





Group: Members
Posts: 1
Joined: 15-November 06
Member No.: 37598



Hello,

I am using an onboard C-Media-Chip CIM8738 with coaxial S/PDIF in and out. AC3 output works fine.

Is it possible record an AC3 stream via S/PDIF-in and decode it ?
Go to the top of the page
+Quote Post

17 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th April 2014 - 18:00