snd_pcm_set_chmap()

Set the current channel mapping for a PCM stream

Synopsis:

#include <sys/asoundlib.h>

int snd_pcm_set_chmap( snd_pcm_t *pcm,
                       const snd_pcm_chmap_t *map );

Arguments:

pcm
The handle for the PCM device, which you must have opened by calling snd_pcm_open_name(), snd_pcm_open(), or snd_pcm_open_preferred().
chmap
A pointer to a snd_pcm_chmap_t structure that specifies the new mapping.

Library:

libasound.so

Use the -l asound option with qcc to link against this library.

Description:

The snd_pcm_set_chmap() function sets the current channel mapping for a PCM stream. It's supported only if the hardware is capable of being remapped.

Returns:

0 on success, or a negative errno value if an error occurred.

Errors:

EINVAL
One of the following:
  • The value of pcm or chmap is NULL.
  • The encoded number of voices is the mapping was greater than the maximum voices that the device supports.
ENOMEM
Not enough memory was available.
ENOTSUP
The device supports only one fixed mapping.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Read the Caveats

Caveats:

This function isn't thread-safe if pcm (snd_pcm_t) is used across multiple threads.