LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing soundcard settings doesn't work with the sound VIs in vista and win7

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

0 Kudos
Message 1 of 8
(4,493 Views)

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.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 8
(4,484 Views)

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

0 Kudos
Message 3 of 8
(4,480 Views)

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

 

0 Kudos
Message 4 of 8
(4,244 Views)

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

 

0 Kudos
Message 5 of 8
(4,219 Views)

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

 

0 Kudos
Message 6 of 8
(4,207 Views)

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

0 Kudos
Message 7 of 8
(4,188 Views)

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.

 

 

Message 8 of 8
(4,186 Views)