snd_pcm_hw_params_get_*() without snd_pcm_open() ?
I need to read the properties of a pcm device, but snd_pcm_open() blocks or exits with an error if something is using that device. Is there any workaround ?
Bye.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 3 lines · Giuliano Pochini
I need to read the properties of a pcm device, but
snd_pcm_open()blocks or exits with an error if something is using that device. Is there any workaround ?
No, the characteristic of a PCM device is dynamic (might be changed during runtime) thus it's not useful to obtain this information in another way. Also, I think that most of applications want to be clever than user, simply use device passed by user and try work with it.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Re: snd_pcm_hw_params_get_*() without snd_pcm_open(
Quoted 8 lines · On 28-Apr-2003 Jaroslav Kysela wrote:
Quoted 3 lines · Giuliano Pochini
I need to read the properties of a pcm device, but
snd_pcm_open()blocks or exits with an error if something is using that device. Is there any workaround ?No, the characteristic of a PCM device is dynamic (might be changed during runtime)
Ah, this is a good news :) My card has digital i/o, but the number of channels changes when the user switches between S/PDIF and ADAT. Now I can fix it properly.
Quoted 3 lines
thus it's not useful to obtain this information in another way. Also, I think that most of applications want to be clever than user, simply use device passed by user and try work with it.
I'm writing a mixer. I need some infos I cannot get from the ctl interface (eg. # of channels). I can register an "info" ctl to pass the data I need to userspace, but I don't like that hack. And I don't like to store a list of capabilities of each card inside the mixer. Any hints ?
Bye.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Unusual pcm contraint
My card can manage substreams of 1, 2, 4, 6, 8 channels. Pcm_open() returns min=1, max=8, but it's not entirely true because 3, 5 and 7 channels are not allowed. In such cases wh_params() returns -EINVAL. Is it ok or is there a cleaner way ?
Bye.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Re: Unusual pcm contraint
Quoted 5 lines · Giuliano Pochini
My card can manage substreams of 1, 2, 4, 6, 8 channels.
Pcm_open()returns min=1, max=8, but it's not entirely true because 3, 5 and 7 channels are not allowed. In such caseswh_params()returns-EINVAL. Is it ok or is there a cleaner way ?
See: pci/intel8x0.c and look for channels6.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf