Skip to main content

Topic: Homebrew CMI 8738 drivers (Read 447086 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #25
OK, all-in-one answer:

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

Quote
Is it possible record an AC3 stream via S/PDIF-in and decode it ?

In theory, yes. I haven't had the time and motivation to try the SPDIF-in recording stuff yet.

Quote
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?

Asynchronous PLL is a few cents more expensive than a synchronous PLL for both SPDIF-in and -out => c-media made the obvious choice.

Quote
OK, they installed fine, and work!  A few issues, though: at first no digital out, only digital in worked.

Digital-in meaning direct loop-through to SPDIF-out ?

Quote
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).

The 'official' cmedia driver might have set some registers which need to be unset for my way of handling things.

Quote
However, since then there is no way to revive the digital input without a reboot.  no amount of switching and fiddling worked.

OK, this is to be expected. I haven't implemented loop-through yet.

Quote
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?

It's supposed to do that. It's setting soundblaster register 0x04 which has been marked in the cmedia specs as "Wave Volume".
There's "Wave Volume" slider in the mixer, but that's just adjusting the volume software-wise in the kmixer.

OK, thanks for the reports, I'm currently working on the next version.
  • Last Edit: 15 November, 2006, 12:36:14 PM by d0gbert

  • lavak
  • [*]
Homebrew CMI 8738 drivers
Reply #26
Quote
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?

Asynchronous PLL is a few cents more expensive than a synchronous PLL for both SPDIF-in and -out => c-media made the obvious choice.


So, unless the source data is clock-synced with the 8738, the digital input won't be bit accurate, no matter what driver is used.  There will be repeat errors or lost samples, the severity of which determined by the differences in clock accuracy of the source and 8738.


Quote
Digital-in meaning direct loop-through to SPDIF-out ?

Digital-in meaning I can record from the digital in and monitor it via the DAC on headphones.

Quote
Quote
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).

The 'official' cmedia driver might have set some registers which need to be unset for my way of handling things.

That's indeed what seems to have happened (that's why spdif in worked at first, but never again, because the monitoring register was unset)

Quote
Quote
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?

It's supposed to do that. It's setting soundblaster register 0x04 which has been marked in the cmedia specs as "Wave Volume".
There's "Wave Volume" slider in the mixer, but that's just adjusting the volume software-wise in the kmixer.

OK, thanks for the reports, I'm currently working on the next version.


Thank YOU for your work.  I took a glance at the source, but couldn't make heads or tails of it, sorry.

Homebrew CMI 8738 drivers
Reply #27
Just tried the 0.94 driver out in both XP and Vista. It works great. In XP I am able to output 96kHz (and 88.2kHz, although my receiver still shows 96kHz - I think it shows the same for both sample rates). I haven't tried 96kHz in Vista.

DTS/DD out works fine in both XP and Vista.

Only quirk I have now is that the volume after resuming from Suspend to RAM is very high. Pressing either the up or down volume just once resets the actual volume to the right volume step.

Keep up the good work!

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #28
I've just uploaded a new version (0.9.5) which includes a switch for selecting the secondary SPDIF-in. So recording from SPDIF-in while monitoring through analog-out should work now, but this probably requires turning off SPDIF-out.
You can record stuff now under Vista, and I've re-implemented a small workaround for the XP mixer (sndvol32). The .inf file was broken for 64 bit releases in previous releases, so this has been fixed, too.

René, thanks for the bug report. Power management is one of the few things which haven't been implemented yet - but it's pretty high on my list.

Homebrew CMI 8738 drivers
Reply #29
René, thanks for the bug report. Power management is one of the few things which haven't been implemented yet - but it's pretty high on my list.


Thanks a bunch. Your the man You have my highest regards. I was going to buy a new soundcard, but because of your driver I don't have to!

BR,
René

  • cervicek
  • [*]
Homebrew CMI 8738 drivers
Reply #30
Hi, please somebody could help me with SPDIF problem ?
SPDIF output using AC3filter + Nightingale 6 PRO worked properly in XP but in Vista x64 this driver with exactly the same ac3filter version and with the same settings doesn't work. Of course I enabled SPDIF in Sound device settings. When I test SPDIF sound from device settings panel it worked - my receiver switched to DD, but when I play movie it doesn't play in DD.
There are installed two sound devices Speakers and Digital Output interface... which one should be used ? (bsplayer/zoomplayer can set output audio device)... and why there is still some unknown multimedia device even when I installed this driver and this driver can't be installed for this device ?
Thanks you very much.. I appreciate ANY help.

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #31
cervicek, the SPDIF interface needs to be set as the default device (right-click the item in the sound applet of the control panel and click the relevant menu item).

the third item probably comes from the stuff which fixes some weird bug of the windows XP mixer, you can ignore it.

  • cervicek
  • [*]
Homebrew CMI 8738 drivers
Reply #32
Thanks. I'll try it.. and ac3filter must be set to use direct sound or waveout ?

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #33
Thanks. I'll try it.. and ac3filter must be set to use direct sound or waveout ?

both should work.

  • ElKabong
  • [*]
Homebrew CMI 8738 drivers
Reply #34
If I get a cheap audio card with an 8738, will I be able to do simultaneous digital and analog (stereo) out? Is that a function of the audio chip, the soundcard, or the drivers?

And if so, can you recommend a cheap, reliable card that definitely does this?

Thanks!

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #35
If I get a cheap audio card with an 8738, will I be able to do simultaneous digital and analog (stereo) out?

yes, but that's limited to 16bit stereo. The DAC of the 8738 models might be limited to a maximum sample rate of 48 kHz though.

Quote
Is that a function of the audio chip, the soundcard, or the drivers?

it's done in hardware. one signal is streamed through the DAC and the SPDIF interface at the same time. there are some registers to control this, and the drivers set these registers, naturally.


Quote
And if so, can you recommend a cheap, reliable card that definitely does this?

Any sound card with a cmedia 8738 or 8768 chip and spdif in/out will do the job. Pick the cheapest model which has SPDIF connectors.

Homebrew CMI 8738 drivers
Reply #36
I just noticed that mixer.exe still runs in the background, and it must have a memory leak or something since I've seen it grow to use over 100 megs of memory.  Your drivers don't need mixer.exe, right?  It's just left over from my old C-Media installation?

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #37
I just noticed that mixer.exe still runs in the background, and it must have a memory leak or something since I've seen it grow to use over 100 megs of memory.  Your drivers don't need mixer.exe, right?  It's just left over from my old C-Media installation?

yeah, you can happily delete it.

  • cervicek
  • [*]
Homebrew CMI 8738 drivers
Reply #38
I'm here again with the same problem...  I think I've tried all possible combinations including setting SPDIF as default device and almost all versions of ac3filters with different settings. Now I think the problem is in x64 Vista or in ac3filter because the sound is normally sent to receiver as stereo (or prologic) when SPDIF is switched OFF in ac3filter, but when I switched on SPDIF in ac3filter it seems that ac3filter immediatelly stopped receving/sending sound signal because channel level meters in ac3filter stopped to show any signal.
I also tried to use my onboard Realtek AC97 with SPDIF and the result was exactly the same so I'm convinced the problem is in Vista or ac3filter because when I tried testing sound to SPDIF in device settings it worked fine for both AC97 and C-Media. So the cards and drivers can play ac3, receiver can receive it but it doesn't work with ac3filter :-(
Does somebody have working SPDIF on x64Vista with AC97 or C-Media ? Which drivers ? Which ac3filter ?

  • d0gbert
  • [*]
Homebrew CMI 8738 drivers
Reply #39
It works perfectly fine here with the 32bit version of vista and media player classic which uses its internal filters for AC3 passthrough.
The driver might have failed to install - the x64 version of vista doesn't allow unsigned drivers, and since I'm not able to sign the drivers by myself or cash out ~500 usd to msft, you will need to disable this policy by pressing F8 each time you boot and selecting the relevant item in the menu.

  • cervicek
  • [*]
Homebrew CMI 8738 drivers
Reply #40
You're right. I reinstalled Vista to 32bit and with Windows Media Player Classic it works when AC3 filter is not used..  and it doesn't work in x64 in ANY configuration. So the problem is in ac3filter and somewhere in 64bit :-)
Unfortunately I have to use 32bit Vista... but better then Pro Logic :-)
thanks

  • Dogbert
  • [*][*][*]
Homebrew CMI 8738 drivers
Reply #41
New release: 0.96.
This release brings mainly improvements and features for Vista, mainly the implementation of WaveRT (support for very low latency recording/playback, that's probably gonna replace ASIO sooner or later) and support for SysFX:


The current release might be a bit unstable.

  • kron
  • [*]
Homebrew CMI 8738 drivers
Reply #42
First of all, big thanks, really great driver, you saved me!!
I'm using it successfully with a Nightingale card and Vista.
The only thing that didn't work was the output of dts .wav files.
In my spdif properties, there is only 48 kHz, and it says that this
is the only frequency my digital receiver can handle.
But this is definitely not true, I had a C-Port soundcard before,
and it played these wav-files, and my receiver ate them with a spoon.
So is there anything I can tweak or do to enable 44.1 kHz output?
Thanks in advance for any hints!

  • Dogbert
  • [*][*][*]
Homebrew CMI 8738 drivers
Reply #43
So is there anything I can tweak or do to enable 44.1 kHz output?
Thanks in advance for any hints!


There are two ways:
1. Use non-WaveRT drivers and a kernel streaming outplug plugin. (foo_out_ks.dll for foobar, out_ks for winamp).
2. Use WaveRT drivers and an output plugin which employs "exclusive access" to the soundcard. The exclusive access mode of the vista sound system bypasses all the mixing by design and passes the stream directly onto the soundcard. If I recall correctly, this is just an extra flag for opening a sound device through WaveOut, so the implementation should be fairly easy, but I haven't seen any support for that in output plugins. But I guess it's just a matter of weeks before this gets implemented.

Good luck,

dogbert

  • cervicek
  • [*]
Homebrew CMI 8738 drivers
Reply #44
I'm using it successfully with a Nightingale card and Vista.


Do you use your Nightingale in Vista x86 or x64 ? Does the SPDIF work in ac3filter ? I have the same card but couldn't get it work in x64 + ac3filter.

  • kron
  • [*]
Homebrew CMI 8738 drivers
Reply #45
I use it in Vista x86, and ac3 works perfectly with ac3filter.
@dogbert:
What does "The current release might be a bit unstable." mean,
is it the 0.95, that is unstable or the 0.96?

  • Dogbert
  • [*][*][*]
Homebrew CMI 8738 drivers
Reply #46
What does "The current release might be a bit unstable." mean,
is it the 0.95, that is unstable or the 0.96?

I feared that 0.96 might be unstable because
1. a lot of new stuff has been implemented, mainly WaveRT
2. I don't have any other machines for testing, and the problem is that I disabled stuff like kernel paging for debugging purposes which would be enabled on normal machines. Thus, I might miss a few bugs which might occur on normal machines.

But I haven't got any crash reports in my inbox, and it's working on my machine without a single crash for the last few days, so I consider it to be reasonably stable now.

  • kron
  • [*]
Homebrew CMI 8738 drivers
Reply #47
There are two ways:
1. Use non-WaveRT drivers and a kernel streaming outplug plugin. (foo_out_ks.dll for foobar, out_ks for winamp).
2. Use WaveRT drivers and an output plugin which employs "exclusive access" to the soundcard. The exclusive access mode of the vista sound system bypasses all the mixing by design and passes the stream directly onto the soundcard. If I recall correctly, this is just an extra flag for opening a sound device through WaveOut, so the implementation should be fairly easy, but I haven't seen any support for that in output plugins. But I guess it's just a matter of weeks before this gets implemented.


Thanks for your answer!
Method one would mean not to take your drivers, since they are (now) WaveRT, is that right?
And method 2..."it's just a matter of weeks before this gets implemented" - do you mean by you?

  • Dogbert
  • [*][*][*]
Homebrew CMI 8738 drivers
Reply #48
Quote
Method one would mean not to take your drivers, since they are (now) WaveRT, is that right?

I provide both WaveRT (x86-WaveRT.zip) and non Wave-RT (x86.zip) drivers, so you can choose.

Quote
And method 2..."it's just a matter of weeks before this gets implemented" - do you mean by you?

Uhm.. I'd do it if the output plugins of winamp/foobar were open source. But they aren't, so we have to wait for the authors to implement it.

  • wdekler
  • [*][*][*]
Homebrew CMI 8738 drivers
Reply #49
First, a really big thank you for programming this driver!

Has anyone been able to get 24bit output before I rush out and buy a cheap generic 8768 card (sweex 7.1)?

The datasheet clearly mentions that the chip should be capable to do this:

http://www.cmedia.com.tw/files/doc/PCI/CMI...20Rev%201.0.pdf

The 8738 datasheet only mentions 16bits.