All of lore.kernel.org
 help / color / mirror / Atom feed
* Multi-channel playback
@ 2016-04-12 21:16 Li, Steve
  2016-04-13  6:51 ` Clemens Ladisch
  2016-04-14  8:28 ` Subhransu S. Prusty
  0 siblings, 2 replies; 3+ messages in thread
From: Li, Steve @ 2016-04-12 21:16 UTC (permalink / raw)
  To: alsa-devel

Hi,

I am trying to playback a multi-channel PCM stream, e.g. 5.1. Is there an API for configuring the channel positions?

I found this API:
int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map);

typedef struct snd_pcm_chmap {
        unsigned int channels;
        unsigned int pos[0];
} snd_pcm_chmap_t;

But when I call it, it returns -6. Also, calling snd_pcm_get_chmap() return NULL.

Your help is appreciated.

Thanks
Steve

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

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

* Re: Multi-channel playback
  2016-04-12 21:16 Multi-channel playback Li, Steve
@ 2016-04-13  6:51 ` Clemens Ladisch
  2016-04-14  8:28 ` Subhransu S. Prusty
  1 sibling, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2016-04-13  6:51 UTC (permalink / raw)
  To: Li, Steve, alsa-devel

Li, Steve wrote:
> I am trying to playback a multi-channel PCM stream, e.g. 5.1. Is there an API for configuring the channel positions?

Yes, but not many devices support it.

> calling snd_pcm_get_chmap() return NULL.

Your device (driver), whatever it is, doesn't support reading it either.


Regards,
Clemens

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

* Re: Multi-channel playback
  2016-04-12 21:16 Multi-channel playback Li, Steve
  2016-04-13  6:51 ` Clemens Ladisch
@ 2016-04-14  8:28 ` Subhransu S. Prusty
  1 sibling, 0 replies; 3+ messages in thread
From: Subhransu S. Prusty @ 2016-04-14  8:28 UTC (permalink / raw)
  To: Li, Steve; +Cc: alsa-devel

On Wed, Apr 13, 2016 at 02:46:39AM +0530, Li, Steve wrote:
> Hi,
> 
> I am trying to playback a multi-channel PCM stream, e.g. 5.1. Is there an API for configuring the channel positions?
> 
> I found this API:
> int snd_pcm_set_chmap(snd_pcm_t *pcm, const snd_pcm_chmap_t *map);
> 
> typedef struct snd_pcm_chmap {
>         unsigned int channels;
>         unsigned int pos[0];
> } snd_pcm_chmap_t;
> 
> But when I call it, it returns -6. Also, calling snd_pcm_get_chmap() return NULL.
> 
> Your help is appreciated.

Hi Steve,

You can use the chmap controls, only if the sound device has registerd
controls for chmap. So you have to check whether the chmap controls are
supported by the PCM device. I guess query_chmap can be used for this. 

Also you can refer test/chmap.c in alsa-lib on how to use those APIs.
Using a debug version of alsa library will help you as well to narrow down
what is missing.

Regards,
Subhransu

> 
> Thanks
> Steve
> 
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

-- 

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

end of thread, other threads:[~2016-04-14  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12 21:16 Multi-channel playback Li, Steve
2016-04-13  6:51 ` Clemens Ladisch
2016-04-14  8:28 ` Subhransu S. Prusty

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.