Hello, I'm trying to use the recently introduced ALSA channel map API for surround playback. I tried many combinations of calling snd_pcm_set_chmap() at various points, many combinations of device names, calling snd_pcm_hw_params_set_channels_near or snd_pcm_hw_params_set_channels, but nothing seems to be successful. I get various error message (I'm sorry that I can't be more detailed, but summarizing what I tried is probably not very helpful). The most interesting issue was that calling snd_pcm_query_chmaps right after opening the device returned all layouts supported by the system, and later on the same handle returned a list that contained the terminating NULL element only. The code I'm trying to change could output surround just fine using legacy device names (like "plug:surround51"). Trying to run aplay --chmap=fl,fr,rl,rr,fc,lfe -Dplug:surround51 audiodump.wav (where audiodump.wav contains 5.1 S16 PCM data) crashes with a double free error. The only program other than aplay that uses the new API I've found was VLC, which has the snd_pcm_set_chmap call commented. The documentation (I looked at the doxygen) wasn't very helpful. It's a bit too scarce. Instead of having to find out what works through trial & error (which isn't guaranteed to result in correct code), or reverse engineering aplay's code (which crashes anyway, as pointed out above), it would be nice to know what exact sequence of function calls ALSA lib expects for setting up the channel map. Preferably this should be included in the official documentation. My version of the ALSA lib is 1.0.27 (on Debian unstable). My kernel is 3.8.6. ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user