The Advanced Linux Sound Architecture (ALSA) - utilities
Find a file
Anssi Hannula a1992044d5 speaker-test: Fix chmapped channel selection without specified chmap
The channel selection currently does not work properly when there is a
driver-provided non-ALSA-traditional channel map but no manual channel
map was explicitely requested with "-m".

For example, the CEA/HDMI 8ch map is FL,FR,RLC,RRC,FC,LFE,RL,RR. Note
that it is otherwise the same as the traditional ALSA channel map,
except that the traditional rear speakers are considered
rear-center speakers and the traditional side speakers are considered
rear speakers.

Speaker-test tries to play back channels in this following order:
  0, /* Front Left  */
  4, /* Center      */
  1, /* Front Right */
  7, /* Side Right  */
  3, /* Rear Right  */
  2, /* Rear Left   */
  6, /* Side Left   */
  5, /* LFE         */

When it is the time to play back Side Left/Right, speaker-test tries to
look for SL/SR in the chmap, but doesn't find it, so it just plays back
channels 6/7 (which indeed are the side speakers, or RL/RR in this
channel map - so the correct channels are selected).

When it becomes the time to playback Rear Left/Right, speaker-test again
tries to find RL/RR in the chmap, and this time it does find them in the
chmap positions 6/7.

So the channels 6/7 are tested twice and 2/3 are never tested.

To fix this, define a generic playback order channel_order[] to be used
when the channel map is present (but not user-defined) and generate a
(speaker/playback number => channel number) mapping with the channels
ordered in the following order:
1. regular channels found in channel_order[] in the defined order,
2. channels not found in channel_order[] ordered by channel number.
3. UNKNOWN channels ordered by channel number.
4. NA channels ordered by channel number.
For channels outside the channel map just use their channel numbers (so
they will be last after all of the above).

For example, if the playback device has a fictional default channel map
of FR,FL,UNKNOWN1,FOO,BAR,RR,RL,UNKNOWN2, the playback order will be
FL,FR,RR,RL,FOO,BAR,UNKNOWN1,UNKNOWN2(,any_extra_channels).

When the channel mapping is specified manually, the specified order is
used for playback as before.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-12 09:09:48 +01:00
alsaconf fix use of $(SED) 2011-08-31 22:31:55 +02:00
alsactl alsactl: alsa-state.service - fix typo (rkill -> kill) 2013-07-19 14:36:52 +02:00
alsaloop alsaloop: pcmjob.c: use portable way to initialize recursive mutex 2013-11-08 14:57:06 +01:00
alsamixer alsamixer: Use isatty() to check the terminal (interactive) availability 2013-03-22 13:27:26 +01:00
alsaucm alsaucm: Don't double-free empty lists 2011-06-03 11:48:12 +02:00
amidi Several formatting fixes for manpages. 2013-05-16 10:38:13 +02:00
amixer amixer: fix indentation when printing container TLV contents 2013-10-02 17:36:02 +02:00
aplay aplay: fix two off by one errors 2013-09-09 12:02:29 +02:00
iecset Fix several typos in manpage and help strings. 2013-05-16 10:38:02 +02:00
include alsamixer: show channel names for multichannel controls 2009-05-25 10:26:22 +02:00
m4 Fix autoreconf 2005-08-19 13:07:45 +00:00
po Translate alsa-utils to French. 2011-01-10 19:57:02 +01:00
seq Fix several typos in manpage and help strings. 2013-05-16 10:38:02 +02:00
speaker-test speaker-test: Fix chmapped channel selection without specified chmap 2013-11-12 09:09:48 +01:00
utils Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:25:17 +02:00
.gitignore alsactl: revert back old systemd static units with the /etc/alsa/state-daemon.conf switch 2013-04-10 10:29:19 +02:00
acinclude.m4 fixed for the recent autoconf. 2004-01-26 15:57:37 +00:00
ChangeLog update build tools. 2005-08-13 16:27:59 +00:00
configure.in Release v1.0.27.2 2013-07-09 17:28:37 +02:00
COPYING Updated COPYING with the recent FSF address 2011-06-03 14:24:30 +02:00
gitcompile renamed hgcompile to gitcompile 2008-05-20 13:32:28 +02:00
INSTALL Trivial fixes in INSTALL file 2012-02-13 15:17:45 +01:00
Makefile.am Merge branch 'ucm' 2011-01-24 15:00:26 +01:00
README Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:25:17 +02:00
TODO aplay/arecord 2000-12-27 21:24:57 +00:00

		Advanced Linux Sound Architecture - Utilities
		=============================================

This package contains the command line utilities for the ALSA project.
The package can be compiled only with the installed ALSA driver and
the ALSA C library.

alsaconf	- the ALSA driver configurator script
alsactl		- an utility for soundcard settings management
aplay/arecord	- an utility for the playback / capture of .wav,.voc,.au files
amixer		- a command line mixer
alsamixer	- a ncurses mixer
amidi		- a utility to send/receive sysex dumps or other MIDI data
iecset		- a utility to show/set the IEC958 status bits

You may give a look for more information about the ALSA project to URL
http://www.alsa-project.org.

					Jaroslav Kysela <perex@perex.cz>