* Get sound card available channels
@ 2014-09-25 0:39 Dan Hordern
2014-09-25 8:49 ` Clemens Ladisch
0 siblings, 1 reply; 2+ messages in thread
From: Dan Hordern @ 2014-09-25 0:39 UTC (permalink / raw)
To: alsa-devel
Hi,
We have a need for our process to poll/monitor the sound cards. This
process needs to provide a unique id for the sound card (e.g. some concat
of name+hardware address) which we can get using snd_ctl_t handle.
However, we also need to provide the number or rx/tx channels each sound
card provides. Doing this using the pcm hw_params after snd_pcm_open won't
work as the device may be in use.
Is there a way for this process to get the number of rx/tx channels without
needing to 'open' the device, e.g. using the snd_ctl_t handle?
One observation I have made is that there is a proc file ( cat
/proc/asound/card1/stream0) that seems to only be populated by the USB
soundcards I have and not the Intel builtin. This has all the information I
require but if it isn't a standard file we can't rely on it.
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Get sound card available channels
2014-09-25 0:39 Get sound card available channels Dan Hordern
@ 2014-09-25 8:49 ` Clemens Ladisch
0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2014-09-25 8:49 UTC (permalink / raw)
To: Dan Hordern, alsa-devel
Dan Hordern wrote:
> We have a need for our process to poll/monitor the sound cards.
Something like libudev would help with monitoring /dev/snd/controlC*
devices.
> This process needs to provide a unique id for the sound card (e.g.
> some concat of name+hardware address) which we can get using snd_ctl_t
> handle.
snd_ctl_card_info_get_id()
> However, we also need to provide the number or rx/tx channels each sound
> card provides. Doing this using the pcm hw_params after snd_pcm_open won't
> work as the device may be in use.
>
> Is there a way for this process to get the number of rx/tx channels without
> needing to 'open' the device, e.g. using the snd_ctl_t handle?
No. The number of channels might depend on the current configuration
and on other resources.
What do you need these numbers for?
Regards,
Clemens
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-25 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 0:39 Get sound card available channels Dan Hordern
2014-09-25 8:49 ` Clemens Ladisch
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.