alsa-utils/speaker-test
Arnaud Pouliquen 55421afe9c speaker-test: Fix chmap wav file selection.
The channel selection currently does not work properly when a channel
map control is provided but no manual channel map was explicitly
requested with "-m".

For example, the CEA/HDMI 6ch (surround 5.1) map is:
 FL, FR, LFE, FC, RL, RR.

Tested command: speaker-test -D hdmi -c 6 -t wav

Speaker-test tries to play channels in this following order:
 0 - Front Left
 3 - Front Center
 1 - Front Right
 5 - Rear Right
 4 - Rear Left
 2 - LFE

But wav file played on associated speakers are not aligned. Here are
the real files played:
 0- /usr/share/sounds/alsa/Front_Left.wav => OK
 3- /usr/share/sounds/alsa/Rear_Right.wav  => OK
 1- /usr/share/sounds/alsa/Front_Right.wav  => OK
 5- /usr/share/sounds/alsa/Rear_Center.wav => KO
 4- found file /usr/share/sounds/alsa/Front_Center.wav => KO
 2- /usr/share/sounds/alsa/Rear_Left.wav  => KO

Issue is that associated wav files ordering is reworked only if
channel_map_set variable is set.

Fix consists in allowing wavs re-ordering if a channel mapping as been
get or set, i.e. channel_map is not null.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-12-07 18:17:05 +01:00
..
samples Install sound samples to correct places. 2005-04-16 11:09:26 +00:00
Makefile.am Makefiles - use AM_CPPFLAGS instead INCLUDES 2014-05-07 10:55:59 +02:00
pink.c Implement Pink noise output. 2005-04-14 15:53:53 +00:00
pink.h Implement Pink noise output. 2005-04-14 15:53:53 +00:00
readme.txt Update to speaker-tools 0.0.7 2005-02-18 10:18:53 +00:00
speaker-test.1 speaker-test: update man page for new -X arg, also consistency fixes 2014-02-26 16:15:54 +01:00
speaker-test.c speaker-test: Fix chmap wav file selection. 2016-12-07 18:17:05 +01:00

To make or build just type

make

To test: -
1) Just stereo sound from one stereo jack: -
./speaker-test -Dplug:front -c2
2) A 4 speaker setup from two stereo jacks: -
./speaker-test -Dplug:surround40 -c4
3) A 5.1 speaker setup from three stereo jacks: -
./speaker-test -Dplug:surround51 -c6