When explicitly specifying channel maps, we need to use that when
loading wave files so the correct file is played back.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Fix many occurrences of unescaped “-”.
Fix minor English issue.
Signed-off-by: Jordi Mallach <jordi@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There are some devices around supporting this sample rate so let's make
speaker-test capable to deal with them.
Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The surround channel map follows the given channel map from the
driver if available.
Also, the channels can be specified manually via -m option.
Pass the channel map like "FL,FR,FC,LFE".
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620513
From the Debian bug report:
"The speaker-test manpage could be improved somewhat by helping a
little bit the user determine how to find out the devices he can test.
Based on http://alsa.opensrc.org/Speaker-test I have make some changes
to the manpage (diff attached) to describe a little bit more how
speaker-test can be used alongside 'aplay'.
Please consider the following patch for
alsa-utils-1.0.23/speaker-test/speaker-test.1"
Signed-off-by: Javier Fernández-Sanguino Peña <jfs@debian.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rather than having numerous preprocessor directives scattered in the code
checking __BYTE_ORDER, only check it once and define a set of macros
accordingly that can be used in the rest of the code. This makes things
simpler to read and less error-prone.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Use atof() rather than atoi() to store the frequency- we were already using
a floating point value internally but did not let the user specify one from
the command line.
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
The period_size an buffer_size parameters must be taken after calling
snd_pcm_hw_params(). Otherwise they could be undefined numbers.
For example, period_size gets 0 when pcsp driver is used, resulting in
a floating-point exception error.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
By doing this we move them from the .data section to .rodata setion,
or from .data.rel to .data.rel.ro.
The .rodata section is mapped directly from the on-disk file, which is
always a save, while .data.rel.ro is mapped directly when using
prelink, which is a save in a lot of cases.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Without this patch, ENABLE_NLS is checked before ever being defined
(aconfig.h is not yet included), and thus locale.h would never be
included even when NLS is enabled.
Signed-off-by: Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
This patch makes speaker-test fill the buffers with properly coded data on
both big- and little-endian processors.
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
speaker-test doesn't work well when you choose a little-endian format on a
big-endian processor, or the opposite. Yes, I know about plughw:, but for
debugging purposes it may not be an option. The following patch add proper
support for S32 and S16 support for but LE and BE processors:
- The "if (bits-per-sample)" construct was replaced by case (format).
- Support for S16_BE, S32_BE formats was added.
- S16_LE and S32_LE were made compatible with big-endian processors.
- NB: The pink noise generator wasn't changed (I'll do if this patch is OK).
From: Giuliano Pochini <pochini@shiny.it>
Improve buffer/period set up in speaker-test.
- Don't ignore -b and -p options but use them if specified
- Clean up and improvement of messy buffer/period setup codes
- Add -P option for specifying number of periods explicitly