alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* PCM extra attributes
@ 2013-07-24 17:09 Vinod Koul
  2013-07-25  3:54 ` Raymond Yau
  2013-07-25  8:06 ` Jaroslav Kysela
  0 siblings, 2 replies; 4+ messages in thread
From: Vinod Koul @ 2013-07-24 17:09 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, "Vinnakota, Lakshmi N <lakshmi.n.vinnakota

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

-- 

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

* Re: PCM extra attributes
  2013-07-24 17:09 PCM extra attributes Vinod Koul
@ 2013-07-25  3:54 ` Raymond Yau
  2013-07-25  8:06 ` Jaroslav Kysela
  1 sibling, 0 replies; 4+ messages in thread
From: Raymond Yau @ 2013-07-25  3:54 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Takashi Iwai, ALSA Development Mailing List,
	"Vinnakota, Lakshmi N <lakshmi.n.vinnakota

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

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

* Re: PCM extra attributes
  2013-07-24 17:09 PCM extra attributes Vinod Koul
  2013-07-25  3:54 ` Raymond Yau
@ 2013-07-25  8:06 ` Jaroslav Kysela
  2013-07-25  8:38   ` Vinod Koul
  1 sibling, 1 reply; 4+ messages in thread
From: Jaroslav Kysela @ 2013-07-25  8:06 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Takashi Iwai, alsa-devel,
	"Vinnakota, Lakshmi N <lakshmi.n.vinnakota

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

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.

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

* Re: PCM extra attributes
  2013-07-25  8:06 ` Jaroslav Kysela
@ 2013-07-25  8:38   ` Vinod Koul
  0 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2013-07-25  8:38 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: Takashi Iwai, alsa-devel, lakshmi.n.vinnakota

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

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

end of thread, other threads:[~2013-07-25  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 17:09 PCM extra attributes Vinod Koul
2013-07-25  3:54 ` Raymond Yau
2013-07-25  8:06 ` Jaroslav Kysela
2013-07-25  8:38   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).