02-16-2010 07:13 AM
Hello everybody
I'm working with the usb audio codec chip pcm2904 from ti as a external usb soundcard to sample data. The soundcard works with the standard windows driver usbaudio.sys.
We have a software written for windows xp and want to port it to windows vista and windows 7. Now the problem is, that the sound VI to configure the audio device can only change between mono and stereo, when in the control panel of the soundcard the stereo setting is activated (which isn't the default setting for the soundcard).
Does anybody know how you can change the settings of the soundcard programmatically in labview under vista or win7?
The second problem is that when I change the soundcard settings manually to stereo and then start my application I've got an additional gain of 20dB compared to the measured signal in windows xp.
Does somebody know this problem? And is there a solution?
Best regards
Ueli Giger
02-16-2010 07:29 AM
I have made some very cool applications using Labview and sound card. But those applications have only been hobbyist project. This is because it is impossible to make universal sound card applications. The sound card settings depend on to many uncontrollable settings. I have seen problems like you have very often. I do not have any solution. But post your code so we can have a look.
02-16-2010 08:18 AM
Hello
I located the problem by testing the soundcard with the example VI "Continuous Sound Input.vi" from LabView. My problem is here that when in Vista or Win7 the setting of a soundcard is set to mono over the control panel, the standard VI "configure sound input.vi" returns 2 for the number of channels but when I sample the data with the attached VI there is only one channel instead of two.
What do you mean, is this a problem with the sound VIs from labview under vista and win7?
By the way it isn't our goal to write an application for universal soundcards. Our application should work only with one type of soundcard (PCM2904 from TI), which uses the standard windows driver usbaudio.sys.
Best regards
Ueli
06-11-2010 02:41 PM
Hi Ueli
I am running into the same problem. On my side I find that on Vista the default microphone setting of 25% is identical to the XP setting of 100%. In other words Vista seems to boost the microphone signal by 12 dB. However the signal still saturates at the same level, so the net effect of that boost is to REDUCE the available dynamic range by 12 dB... On Vista it is best to leave the gain at the default 25%, or force it to that value.
Did you find anything to change the mono default setting to stereo other than through the Windows applet?
Bruno Paillard
Senior Designer
Convergence Instruments
06-14-2010 01:37 AM
Hello Bruno
Sorry but I have not find any solution to change the mono default setting to stereo other then throug the Windows applet. I've read something that it's only possible to change the default setting programmatically during installation with an extra .inf file for the soundcard. So I think it isn't possible to change this setting with LabView.
For Win7 a Microsoft developer told me, that win7 automatically boosts up the microphone if there isn't a hardware volume control on the microphone input as it is @ the TI PCM2904. But I didn't receive a answer how I can remove this automatically added gain.
My solution is for the Moment that we've created a workaround for our customers to set the right settings in win7 and vista.
Best regards
Ueli Giger
Development Engineer
RFbeam Microwave GmbH
06-14-2010 06:46 AM
Hi Ueli
I found a way to set the volume and mute settings, based on a library found on the NI site. If you want I can send it to you.
The biggest problems is the default setting: Microphone in mono and 44.1 kHz on Vista and Win7. I have not found any way to adjust this programatically. Because the device may be shared by different apps that may request different settings, Win-Vista and 7 always configure it the same way in hardware and "emulate" the requested setting by software (the microphone input is set to mono, but the channel is duplicated...
I believe that you are right, the default settings may only be changed by a new .inf file. However this will affect the certification of the driver package (the driver will need to be recertified, even if the driver itself is the same)... Unfortunate.
Thanks for your help
Regards
Bruno
06-14-2010 12:37 PM
Hello Bruno
It would be nice when you can send me the VI's that you've found.
Thanks for your help
Best regards
Ueli
06-14-2010 12:43 PM
Hi Ueli
Please find below an llb with all kinds of functions to adjust many settings of the sound card. To adjust the volumes and mute, you need to use the mixer functions, rather than the Wave IN and Wave OUT functions.