Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - snd_pvm_open_preferred - preferences file. : (4 Items)
   
snd_pvm_open_preferred - preferences file.  
Hi:

A question from the docs : 

This page 

http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_audio/libs/snd_pcm_open_preferred.html   


mentions how the function opens this file "/etc/system/config/audio/preferences" to access the preferences when choosing
 the audio device to open.

We wish to use just those preferences. But a sample of the file cant be found in QNX 6.4.1 or 6.5 .  We feel that it may
 just be a matter of creating the file and plugging in the right values. If so - what format is used to set the desired 
values? 

Thanks,
Andy
Re: snd_pvm_open_preferred - preferences file.  
Update:

After reading some of the Linux ALSA documentation we tried to create/edit the '/etc/system/config/audio/preferences' 
file and enter 'hw:0,1'  in the hope that this would tell svn_pvm_open_preferred ()  to open card 0, device 1.  Sadly 
this didnt work. 

Thanks,
Andy
Re: snd_pvm_open_preferred - preferences file.  
It would look something like this:

> # cat /etc/system/config/audio/preferences
> pcmPreferredp	"Audiopci 1371"	1
>

Preferred device name (you can set preferred playback or capture 
device), the device name (if you have the audio driver source you can 
lookup the function call to ado_card_set_shortname(); if you don't, you 
should be able to get this by calling snd_pcm_info() and looking at 
snd_pcm_info_t.name (this is the longname, not the shortname, but should 
still work).  The last number is the device number for that card.

With the above config my /dev/snd/ looks like this:
-rw-rw-rw-  1 root      root              0 Jul 28 17:31 pcmC0D0p
-rw-rw-rw-  1 root      root              0 Jul 28 17:31 pcmC0D1p
lrw-rw-rw-  1 root      root              0 Jul 28 17:31 pcmPreferredp 
-> pcmC0D1p

If I swap the last 1 for 0, pcmPreferredp points to pcmC0D0p.

-- 
Ryan J. Allen
QNX Software Systems
Re: snd_pvm_open_preferred - preferences file.  
Ryan: 

Got it! 

This works as well. 
pcmPreferredc	1	0
pcmPreferredp	1	0


Thanks, excellent information.