All of lore.kernel.org
 help / color / mirror / Atom feed
* snd_pcm_hw_params_get_*() without snd_pcm_open() ?
@ 2003-04-27 22:46 Giuliano Pochini
  2003-04-28  8:12 ` Jaroslav Kysela
  0 siblings, 1 reply; 5+ messages in thread
From: Giuliano Pochini @ 2003-04-27 22:46 UTC (permalink / raw)
  To: alsa-devel


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: snd_pcm_hw_params_get_*() without snd_pcm_open() ?
  2003-04-27 22:46 snd_pcm_hw_params_get_*() without snd_pcm_open() ? Giuliano Pochini
@ 2003-04-28  8:12 ` Jaroslav Kysela
  2003-04-28 10:37   ` snd_pcm_hw_params_get_*() without snd_pcm_open( Giuliano Pochini
  0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Kysela @ 2003-04-28  8:12 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

On 27 Apr 2003, Giuliano Pochini wrote:

> 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 <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: snd_pcm_hw_params_get_*() without snd_pcm_open(
  2003-04-28  8:12 ` Jaroslav Kysela
@ 2003-04-28 10:37   ` Giuliano Pochini
  2003-04-28 15:47     ` Unusual pcm contraint Giuliano Pochini
  0 siblings, 1 reply; 5+ messages in thread
From: Giuliano Pochini @ 2003-04-28 10:37 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel


On 28-Apr-2003 Jaroslav Kysela wrote:
> On 27 Apr 2003, Giuliano Pochini wrote:
>
>> 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.

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Unusual pcm contraint
  2003-04-28 10:37   ` snd_pcm_hw_params_get_*() without snd_pcm_open( Giuliano Pochini
@ 2003-04-28 15:47     ` Giuliano Pochini
  2003-04-28 16:00       ` Jaroslav Kysela
  0 siblings, 1 reply; 5+ messages in thread
From: Giuliano Pochini @ 2003-04-28 15:47 UTC (permalink / raw)
  To: alsa-devel


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unusual pcm contraint
  2003-04-28 15:47     ` Unusual pcm contraint Giuliano Pochini
@ 2003-04-28 16:00       ` Jaroslav Kysela
  0 siblings, 0 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2003-04-28 16:00 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

On Mon, 28 Apr 2003, Giuliano Pochini wrote:

> 
> 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 ?

See: pci/intel8x0.c and look for channels6.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-04-28 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-27 22:46 snd_pcm_hw_params_get_*() without snd_pcm_open() ? Giuliano Pochini
2003-04-28  8:12 ` Jaroslav Kysela
2003-04-28 10:37   ` snd_pcm_hw_params_get_*() without snd_pcm_open( Giuliano Pochini
2003-04-28 15:47     ` Unusual pcm contraint Giuliano Pochini
2003-04-28 16:00       ` Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.