Understanding PC sound cards

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'd love to do some experimenting with my own homebrew audio DSP code. A PC would appear to be the ideal way to do it without committing any funds to speak of, and making almost unlimited processing power available.

I have, in the past, had some success dabbling with the free BASS audio library Un4seen Developments - 2MIDI / BASS / MID2XM / MO3 / XM-EXE / XMPlay and, at its simplest, it is possible to write simple applications to discover your sound cards and list the inputs and outputs available, then simply pull or push data in and out of buffers to read and write audio. Perfect for experimenting.

However, there is a fly in the ointment that I've never been able to quite work out:

On the surface your sound card may sound ideal: inputs for line, SPDIF and 'wave' (software sources), and '7.1' outputs (i.e. 8 independent 24 bit outputs). The problem comes when you try to use the inputs and outputs independently. What I have found is that there are certain preset internal routings that have always made me feel that I was blundering around when it came to understanding sound cards.

When you install a sound card, you also install 'drivers' and mixer 'applets' which you can call up in the Windows XP control panel. Different sound cards seem to make different facilities available in these applets. (I'm not sure what the overlap is between 'drivers' and these mixer applets.) In addition, the sound card manufacturer may also include their own mixer applet that you can call up yourself. Often these seem to duplicate the Windows applets but with a different 'skin', or they may provide additional facilities. The most basic mixer applet gives you slider controls for 'Recording' and 'Playback'.

It turns out that in some sound cards, at least, the 'Record' slider for 'Wave' comes after the 'Playback' slider, so that you can't record 'Wave' without also hearing it through the speakers. (Has this ever confused you when attempting to set up a sound card?) BASS appears to be unable to do anything about this, and it can only work with the post-slider source (but maybe there are other things in BASS that I don't know about).

With the Creative Audigy line of cards, some enthusiasts created an open source driver (the Kx project) that allowed you to clear the internal routing yourself and get around this problem, but even they felt the need to chain the record fader after the playback fader, in the out-of-the-box default configuration. (Why?)

Am I missing something obvious? Why do sound card manufacturers sometimes not make the Record and Playback controls independent? Is there a straightforward way to turn off/bypass this internal routing?
 
Yes, I have (and still do),it is very annoying and causes problem when you are trying to record with it even through a mixer and even when using a VST Host.

I have a GINA 24 card and I have to use outputs 3 and 4 in order to use it in full duplex.
This becomes a problem when I switch to linux as the system always defaults to outputs 1 and 2 and the signal goes straight through on those outputs with no way to chose which out puts I want to use.

I didn't realize this when I switched to Linux as well, and, I couldn't figure out why I was seeing the drivers but not getting any sound out.
It was because the sound was coming out of 1 and 2 ,and they weren't hooked up because I use 3 and 4 outputs becuase of the pass through on 1 and 2. :(

It does the same thing in widows and it took me awhile to figure out why I was getting a clean sound from my guitar and excessive gain and squealing feedback when I try to turn on just the effects and listen to them only.

I use Live Professor and my card is made for multi channel recording but yet I still have this problem with the two input channels and outputs 1 and 2.
Now that I have figured out what was happening I have not yet checked to see if there is some setting that I have missed in the Echo Systems mixer when using windows.

I also use a Phillips PSC-706 sound card and it is almost impossible sometimes to do a full duplex situation as well with out spending too much time trying to get it to work and then when I do get it to work I have to go back and undo the setting in order to hear the play back properly.

My X-Fi card has its own switching built in to it and I don't use it enough to know my way around it and it took me nearly a week to figure out how to record with it and I still have the same issues when I try to do some full duplex stuff with VST effects in the input signal chain using windows XP.

Ahhhhhhhhhh !!!!

Don't get me wrong, They are super sounding cards but are a real Big PIA to get them to work properly.

Now I have two machines setup in order to get around such issues.
I use the one with the GINA24 card for multitrack playback and recording but only with 6 channels instead of 8 and another two that just run the Live Host for Vst''s and effects only.
As there is to much delay (latancy) running through the DAW software ,Calkwalk and Cubase both are terrible at it.
Luckily I don't do much recording lately and I have a 16 track that I use when I need too do a big project.


jer :)

P.S. I wish I was a programmer so that I could write some drivers that work properly for Full duplex stuff,Maybe some day I will learn, I did start looking into how to write VST and stuff but I have no clue as to where to start,My days of programming was with Basic and a little machine language on the 8bit machines of yesteryear. I could fix a computer all of the way down to the component level but not at programming !! He,he,he :)
 
Last edited:
@gerald

At last! Someone who knows what I'm talking about. Thanks for taking the trouble to post.

I'm very interested in your experiences with the X-Fi card. That would seem to be the logical progression for me: potentially excellent quality, but at a very reasonable price. I notice that 5.1 X-Fi cards (not the 'Xtreme Audio' variant, which is not a true X-fi card apparently) are available quite cheaply, but I really do need six independent outputs, if not eight. If two of them are taken up with internal 'preset' routing, then I can't use them. Are you saying that under Windows XP, you can't turn off the feedthrough to two of the outputs? (This information is simply not available from Creative themselves).

As regards programming your own drivers, I really don't know if this is trivially easy, given the right information, or beyond mere mortals like me. The Kx project I mentioned was very interesting in that they somehow worked out how to program the Audigy card's internal Emu chip, allowing them to control everything. It might be that this goes beyond what is possible from just writing your own driver.

I still can't help but wonder if we're missing something that everyone else knows about, like a 'Sound Card Raw Mode' button in the control panel somewhere..!
 
I'm using an Audigy 2 ZS with KX-Project. You have FULL control over all sound card functions but it takes some time to learn how to use it. I even got to the point where I was able to compile a simple plugin that runs DSP code on the chip itself. It's a very friendly platform. I fully recommend it for experimentation.
 
I have been checking out the KX-Project But I haven't spent any time figuring out how to work with it yet,But looks very promising.

The X-FI card I have is the true version in the form of the Elite Pro.
I haven't messed with it lately since I have upgraded all of the drivers as my GINA24 card is my main system.
The one thing that I figured out is that the new drivers (not sure if the old drivers allowed this) allows you to have four channels of dedicated outputs that can each have its own vst effect on them.
I was going to use this feature as a dedicated digital crossover system and still be able to use the built in players.
But I haven't tried any of this yet but what I have read is that it is possible.

And from what I understand is that the KX-Project will allow me to have individual control over all of the 8 outputs available on the X-FI card but in order to do this it takes a special cable thats has four contact points on the mini-plugs instead of the standard three in order to connect to all 8 them.
I do not yet have this cable.
Had I known this when I bought the card I would have gotten the cable then back when it first came out.
They didn't make this very clear when I bought it and is a poor way of doing things, I may just solder my own interface to it sometime if I can't get the cable for a reasonable price as the last time I checked they are not cheap.

The X-FI card was my first forte' into the 24Bit format and I just love the card.
The GINA24 card I got from a friend that he and I had a recording studio together and it was the first 24Bit card I had ever heard and it is still great to this day.
The only problem I had with it was with Samplitude running under XP.
Some of the switching functions and VST controls seemed to be a bit glitchy in XP
I have an older version and it seems to run Flawlessly in Win98 instead of XP.

I can't say if one is better than the other as they are both excellent cards.

I will try to spend some time with the X-FI system and let you know what I find with the new drivers and signal switching I just have to set that machine backup and hook it up.
But I do find the creative mixing console a bit confusing as with any digital mixer compared to a real mixer.
This is why prefer a cut and dry in and out function as I use my Mackie32-8 for everything and have no use for the digital console.

:cheers:

jer :)
 
Last edited:
I am not an expert but I do have some experience with Linux audio. There are two major problems with audio on the Linux system, as many will attest.

1) Sound card manufacturers simply do not develop their drivers to the extent they do for Windows. For example, the Linux driver for X-fi was developed by ALSA, after Creative begrungingly released some interface data. It is bare bones, just enough to get sound in and out. When we talk of drivers for PC audio, we have come to expect a load of additional software in the order of mixers, recorders and effects, etc., which are rock solid under Windows (usually).

2) Free Linux distributions are notorious for buggy audio and video. Most of them will detect the card (if it is "supported") and load the driver module automatically. However, you may later find that adding some audio-related applet or some benign application (such as Audacity) along with other optional software, will break the system. Finding the answer may take days to weeks, or maybe never. System backup images come in very handy. I backup the entire drive and simply recover from that as it is easy and more reliable.

Fiddling with drivers and or ignoring what you are plugging in to those inputs may have undesired financial consequences, and sometimes break the OS. Only the top of the line audiphile cards are barely economical to repair.

If anyone would correct or add to my view, I am receptive to it.

Better yet, if anyone knows of a Linux distro-audio combination that performs well and is reliable, your comments are more than welcome.
 
I have a GINA 24 card and I have to use outputs 3 and 4 in order to use it in full duplex.
This becomes a problem when I switch to linux as the system always defaults to outputs 1 and 2 and the signal goes straight through on those outputs with no way to chose which out puts I want to use.

I didn't realize this when I switched to Linux as well, and, I couldn't figure out why I was seeing the drivers but not getting any sound out.
It was because the sound was coming out of 1 and 2 ,and they weren't hooked up because I use 3 and 4 outputs becuase of the pass through on 1 and 2. :(

I do not know what software you were using, but in linux it is fully configurable which inputs/outputs you want to use as default. In fact you can script any controls configuration, be it at boot or hooked to a button (config 1, config 2, etc) on your desktop. If you give details, we can go through the setup together.
 
I

1) Sound card manufacturers simply do not develop their drivers to the extent they do for Windows. For example, the Linux driver for X-fi was developed by ALSA, after Creative begrungingly released some interface data. It is bare bones, just enough to get sound in and out.

X-fi is one of the few soundcards not supported properly in linux. It uses a complicated DSP chip and creative never released reasonable documentation. Similar to Lynx (though it is supposed to work under OSS4), M2tech HiFace version 1, and a few other USB dacs with proprietary communication protocols. Fortunately M2tech learned their lesson and switched to standard USB audio class 2 in the HiFace version 2.



When we talk of drivers for PC audio, we have come to expect a load of additional software in the order of mixers, recorders and effects, etc., which are rock solid under Windows (usually).

Unlike windows, Linux alsa defines standard API for all control functionalities the soundcards offer. As a result you can use third-party software on basically any sound card, they all communicate using common API. That is a huge advantage.

There are countless mixers, recorders, effects, DAW software, softsynths, etc. and they all work with any soundcard, provided it offers the specific functionality needed. You can script sound card controls, and switch soundcards at will. I am really glad linux drivers do not come with bunch of proprietary GUI tools, but a consistent API instead.

2) Free Linux distributions are notorious for buggy audio and video. Most of them will detect the card (if it is "supported") and load the driver module automatically. However, you may later find that adding some audio-related applet or some benign application (such as Audacity) along with other optional software, will break the system.

Well, please give an example. I have not experienced such behaviour.

Finding the answer may take days to weeks, or maybe never. System backup images come in very handy. I backup the entire drive and simply recover from that as it is easy and more reliable.

A short question to appropriate forum (e.g. here) would have most likely solved your problem. Reinstalling a system after installing and audio software is never required. Do you have a specific example of the problems you encountered?
 
X-fi is one of the few soundcards not supported properly in linux....
True. I did get it to work in speech recognition. In fact, the onboard card would not even work; too much distortion. Do you know of a well-supported, relatively inexpensive one that is?

...USB dacs with proprietary communication protocols. Fortunately M2tech learned their lesson and switched to standard USB audio class 2 in the HiFace version 2.
In my speech recognition mic app, it appears sending the stream in via USB is the way to go, and the only way to go if there are many mic inputs to be processed in a PC program.


Unlike windows, Linux alsa defines standard API for all control functionalities the soundcards offer. As a result you can use third-party software on basically any sound card, they all communicate using common API. That is a huge advantage.
Agreed. I wish I knew how to write them.


Well, please give an example. I have not experienced such behaviour.
Unfortunately, I did not document my actions that lead to the failures. On openSUSE 11.0 Audacity was not compatible with phonon or pulse audio, I cannot recall. I found that out later after doing the research I should have done first. I also experimented with the cutting edge ALSA driver, plugged in a zoom mic designed for camcorders, fiddled with the boost and level settings, and now own a smoked Titanium: no mic input and no "record what you hear" (on Windows). I am tempted to take a shot at replacing the ADC, but since there are no troubleshooting guides, I am cowering. It could be a blown resistor or some component that is common to both circuits.

A short question to appropriate forum (e.g. here) would have most likely solved your problem. Reinstalling a system after installing and audio software is never required....
It was my initial, impatient, and sloppy foray into Linux audio. And at the time I did not consider going to an audio forum. The openSUSE forum proved useless. In contrast, this forum has helped me in related areas, and now I know where to go first!

Thank you for your input.
 
That would be great,phofman!!

Right now every thing is running good so far as I have channel outputs 1,2,3 and 4 hooked up so that 1,2 for Linux and 3,4 for windows.

The DAW software does allow me to choose what ever I want to use as does audacity I think as I have not yet messed with it that much.

But I would like for Linux to default to outputs 3 and 4 though as this is what I am used to and to be sure that I don't get any pass through on 1 and 2 as mentioned.

Once I turned off my on board sound in the bios I had sound on the Gina card right away.
But the system did recognize both sound systems though.

I really like Linux and is very straight forward and since my machine is a 64bit dual core machine this is the first 64bit OS that I have had to run on it.

The only major glitch I have so far is with Firefox so I mainly use chrome.
I have the Ant Toolbar installed in Firefox so that I can down load videos very easily and works just fine but it does glitch out once in awhile.
At least Firefox has a built in recovery system,In which is a nice feature should it happen while I am downloading a video.

So far I have every possible application that I need running in Linux needed for video and audio with the exception of a Live VST stand alone host (i.e. Live Professor).
I even have an app. that runs my WinTV card as well and all I had to do was install it and it worked the first time and better than the original windows version.

My machine is an Opteron 185 running at 2.95Ghz with 3Gb of ram a 7600gt video card and the Gina24 card.

Right now I am running Linux 12 (Mint, KDE)and it seems to work very good with this machine.

I have tried about 4 different distro's 2 Mint versions and Ubuntu 12.04 beta and Ubuntu Studio 12.04.

I would be using Ubuntu Studio but it doesn't like my video card and I can't run dual monitors as loading the Server X driver slows the system to a crawl and sometimes locks it up.

I didn't have this problem with the Mint versions or one of the Ubuntu versions ( if I remember correctly).
In Ubuntu regular version I was able to run two monitors but again I could not load the recommended video drivers and when I did the system would halt.

I have been using Linux for about 3 or 4 weeks now and I may try reloading Ubuntu again or another version as I just found one that has the cinnamon interface as this was the other version of mint that I had tried.

I loved Ubuntu studio as It had every thing that you would need already part of the package,But I could only use it with one monitor as mentioned,This I didn't like.

I am not sure how much of a difference it will make using the new 3.2 kernel but my updates in Linux 12 did bring the kernel up to 3.0.

So,it is all still very new to me and I am still learning and getting used to the system and so far I am impressed with it!

It boots fast and the apps run very fast and cleanly compared to windows in many ways,But of course there are some apps that I have that will only run in windows.

I am still trying to figure out Wine But I did get one windows app to run under it okay.

Sorry if I have gone off of any topics here.

I loved Ubuntu when I first used it and it was just 2 days before the official release of 12.04.

The only time I had any bugginess was when I had both sound systems going and the DAW app was glitching,popping and crackling but since then I have figured out the driver situation and have not had any issues like that since except for the mentioned dual monitor setup using Ubuntu.


:cheers:

jer :)
 
ITPhoenix,Thank for the Heads up on the X-Fi card,Sorry that you had to go through that!

Looking in the ALSA list I found that they do support the DSP in my Phillips card so I may give that a try when I decide to setup one of my other machines for a backup.

It is a 16bit card but it is one of the best 16bit cards ever produced.
They were quite expensive back in the day ($200) and is probably why they aren't widely used or very well known.

I hope it doesn't end up like your card though, Again very sorry to hear about that.

Jer :)
 
I doubt you will have a problem. I had a bad experience with a true beta driver (the Creative driver is still considered "beta" on their site), but I cannot declare it the cause of my failure. I installed the beta in hopes to get my input working again, since it had been totally gone. I did get my input back again which implies there was an existing problem unrelated to the original driver. At least with openSUSE, I noticed they were using at least one lower version than the cutting edge driver.
 
Okay,That is good to hear that you got it back working again!!
I do remember that the original drivers were quite glitchy,The last time I used the machine with that card was quite a while ago.
I had updated all of the drivers under windows and it was working much better compared to the original ones.

I am checking out the open SUSE versions of linux as well.
Since it doesn't take a day and a half to load up a new distro like it does windows! He,he,he,he
And since I don't really have anything loaded in windows I can easily reload that too should any mishaps occur to the boot track as it has happened once or twice but no major big deal.

jer :)
 
When it comes to moving around the internal sound card routing, I've found Linux's JACK drivers to be the most useful and transparent. I use Ubuntu Studio as my distro of choice. I've played with a number of different sound cards, (echo darla, maudio 44, tascam us-122, presonus firepod, etc...) but have always stayed away from Creative brand cards due to both the lack of open support and the lack of quality/price point they offer. I'd recommend doing some research on your soundcard to see if the routing issues you're describing are physically part of the routing on the card or part of the software chain. I've heard Creative doesn't release this info.

As for the original issue of homebrew dsp, have you considered programming languages such as ChucK, PureData, or CSound? Those are my personal favourites (probably in that order too).
 
When it comes to moving around the internal sound card routing, I've found Linux's JACK drivers to be the most useful and transparent. I use Ubuntu Studio as my distro of choice. I've played with a number of different sound cards, (echo darla, maudio 44, tascam us-122, presonus firepod, etc...) but have always stayed away from Creative brand cards due to both the lack of open support and the lack of quality/price point they offer. I'd recommend doing some research on your soundcard to see if the routing issues you're describing are physically part of the routing on the card or part of the software chain. I've heard Creative doesn't release this info.

As for the original issue of homebrew dsp, have you considered programming languages such as ChucK, PureData, or CSound? Those are my personal favourites (probably in that order too).

stochastic: Excellent pointers! Yes, Creative caters to Windows users, not audio developers. They would not even give me a max. current for the input. It took 4 emails over 6 days just to get them to say 600 ohms is the ideal impedence for the mic.

I did not even know DSP programming languages existed (a testimony as to where I am).

geraldfryjr: I am testing Xubuntu 11.10. Fast and rock solid so far. Nvidia driver does not give the larger screen resolutions unless you use DVI card/monitor; same probably goes for HDMI. Out of fear of going broke, I acquired an Asus Xonar DG PCI (not PCIe) since I can get away with that quality for my app. I do not like the mic/line-in being consolidated, but as long as it works......
 
Cool.I have been considering Xubuntu as well.
From what I have read Mint is based upon Ubuntu 11.10, There are so many versions I am sure I will try many more before before I am done.
Right now I have both have my screens set at 1600 X 1200 but one monitor can go as high as 2500 but then things start too get to small to be readable.

Yes,DSP programming is a whole another language I have read that some use a C+ editor to write and compile with, This was when I was researching how to write VST's.

Ya,creative is not to good with there customer support,I had to twist some arms in order to get them to explain the difference between their two (three) X-FI cards.
I had to tell them that I wasn't going to buy their product unless I knew which card was the better one!
It was then Finally that the tech explained to me which one to get,But I ultimately ended up with the Elite Pro setup because buying the interface was like another $80 more if bought separately!
It had just hit the market at that time.
And after I had installed the thing with their glitchy drivers I didn't mess with it for a year and when I called them back up for support and they refused to help me unless I had agreed to a heavy fee ($$$$),so I hung up it set it aside until last year.

jer :)
 
Last edited:
Thanks jer for reminding me about Mint. I saw it when researching realtime Linux kernels (RTOS), and since my app is all audio, I will try that now. The current Mint version is not realtime but I doubt it would affect an audio app. Supposedly, there are ways to affect interrupts in Ubuntu that effectually do about the same thing. If you need blinding speed, an overclocked Core i7 seems the ticket.
 
Yes,Audio apps are my main goal so I have been doing a lot of reading and the snappiness of the apps running under Linux seems to be the way to go.
Especially for the older systems that I have acquired I would love to get an I7 2700k but I don't have the funds at the moment.
I have also been thinking that maybe some of the older great overclocking CPU's might be a viable less expensive route.
I have found that some of the VST's that I have been using sound way better than my two Alesis Quadreverb units not to mention the amp simulators and every thing else that is available.

So clock for clock performance and clock speed is of the utmost importance since sound apps are basically single threaded.

I had a P4 overclocked 3.7 Ghz and that thing was incrediable compared to what I was used to.

I just put together an FX-6100 for my mom and I got it to 5.0Ghz on boot and 4.95 stable a nice and healthy 50% overclock!!
Sadly it is not my machine !!! :(

Not bad for a $440 barebone kit from Tiger direct and a Corsair H100 cooler.
I was going to have her get an I7 but the cost was greater than what she wanted to spend and it will never see any gaming.
But it will see some video work and AMD CPU's seem to be better suited for that kind of work.
With an SSD it is quite a performer even though there aren't any braggin rights !! He,he,he,he

I haven't tried Linux on it yet but I will oneday.

Jer :)
 
I'd recommend doing some research on your soundcard to see if the routing issues you're describing are physically part of the routing on the card or part of the software chain. I've heard Creative doesn't release this info.

As for the original issue of homebrew dsp, have you considered programming languages such as ChucK, PureData, or CSound? Those are my personal favourites (probably in that order too).

With the Audigy, I'm sure that the internal Wave routing is only a driver/software issue, as the Kx driver and its GUI routing panel are able to clear the whole chain and allow you to start from scratch. You can configure the card to feed the incoming Wave stream to 'RecL' and 'RecR' only, which is exactly what I want. Then six ASIO output channels can be connected to the six analogue outputs. Using BASS, I can then read the two Wave channels, process the data with my FFTs etc. and write the filtered data out to the six ASIO channels. That's all I want to do at the moment. The question is, could I do the same with the X-Fi, as there is no open source driver.

I've never really tried any programming languages but 'C'. Would the DSP languages you suggest be easy to learn? I like the idea of 'C' being so low level that I feel as though I kind of understand what I'm doing with the data, but it is certainly a bit cumbersome when it comes to DSP.
 
Having the new Realtime Kernel concerned me when Ubuntu Studio 12.04 did quite fit my graphic requirement and having to Step down using mint kinda bummed me out.

But like I said getting the updates may have fixed this I will have to look into this further in order to confirm it.

I know the new updated kernel is 3.0 or better though.

jer :)
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.