[alsa-devel] PCM extra attributes
Hey Takashi,
We were looking to find the substream index in the userspace for the device opened (in case we support multiple substreams and mix them). Since we also wanted to have some specific alsa controls for each substream the problem of not knowing substream in usermode make stuff interesting!
I was pointed to an old RFC of yours [1] and it fits my needs. I can get the substream index using this and program the alsa controls.
Now reading the archive looks like it was note merged. Would be okay to do so for above case. I can resurrect the patchset if you would like...
Thanks ~Vinod
[1]: http://mailman.alsa-project.org/pipermail/alsa-devel/2009-June/018651.html
--
We were looking to find the substream index in the userspace for the device opened (in case we support multiple substreams and mix them).
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___info.html
snd_pcm_info_get_subdevice() - Get subdevice from a PCM info container
snd_pcm_info_get_subdevice_name() - Get subdevice name from a PCM info container
snd_pcm_info_get_subdevice_count() - Get subdevices count from a PCM info container
snd_pcm_info_get_subdevice_avail() - Get avail subdevices count from a PCM info container
snd_pcm_info_set_subdevice - Set wanted subdevice inside a PCM info container
Since we also wanted to have some specific alsa controls for each substream the problem of not knowing substream in usermode make stuff interesting!
The subdevices of a device need to same format , rate , channels, period and buffer constraints
http://git.alsa-project.org/?p=alsa-tools.git;a=tree;f=hwmixvolume
Date 24.7.2013 19:09, Vinod Koul wrote:
Hey Takashi,
We were looking to find the substream index in the userspace for the device opened (in case we support multiple substreams and mix them). Since we also wanted to have some specific alsa controls for each substream the problem of not knowing substream in usermode make stuff interesting!
The substream/subdevice index is in the snd_pcm_info field, so you can correlate the PCM with the controls from the control API.
snd_pcm_info_get_subdevice()
Jaroslav
On Thu, Jul 25, 2013 at 10:06:52AM +0200, Jaroslav Kysela wrote:
Date 24.7.2013 19:09, Vinod Koul wrote:
Hey Takashi,
We were looking to find the substream index in the userspace for the device opened (in case we support multiple substreams and mix them). Since we also wanted to have some specific alsa controls for each substream the problem of not knowing substream in usermode make stuff interesting!
The substream/subdevice index is in the snd_pcm_info field, so you can correlate the PCM with the controls from the control API.
snd_pcm_info_get_subdevice()
This looks intresting, Thanks Jarsolav and Raymond.
If I get snd_pcm_info after the stream has been created I should see the subdevice and thus use alsa controls corrorsponding.
Let me test this, it should work
~Vinod
participants (3)
-
Jaroslav Kysela
-
Raymond Yau
-
Vinod Koul