Commit graph

43 commits

Author SHA1 Message Date
Dan McGee
6a1109b732 speaker-test: only check byte order once
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>
2009-05-11 09:08:35 +02:00
Dan McGee
8b0db35f63 speaker-test: move existing endian macros up in the file
This is necessary for a later patch removing the various endianness checks
sprinkled throughout the code.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2009-05-11 09:08:15 +02:00
Dan McGee
21d3717c3f Remove dead/commented out code
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2009-05-11 09:07:18 +02:00
Dan McGee
f0a3bdc88b Allow frequencies down to 30 Hz
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2009-05-11 09:06:57 +02:00
Dan McGee
7d051f7e10 speaker-test: allow frequency to be floating point
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>
2009-05-11 09:06:33 +02:00
Wu Fengguang
0e8fcfc2ce speaker-test.c - add readability comments to speaker channels
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20 18:01:44 +01:00
Takashi Iwai
0d6134450e speaker-test: Fix floating-point exception bug
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>
2008-11-26 14:27:24 +01:00
Diego E. 'Flameeyes' Pettenò
6232f1c96c Make some static tables and strings constants.
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>
2008-11-21 13:10:02 +01:00
Diego E. 'Flameeyes' Pettenò
f53441ae68 Remove some unused variables.
Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 13:09:52 +01:00
Diego 'Flameeyes' Pettenò
01285f20d9 Move conditional inclusion of locale.h further down.
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>
2008-11-13 13:22:13 +01:00
Jaroslav Kysela
9957c66e46 alsactl - install initialization files
Also, spearate SOUNDSDIR and DATADIR in configure.in.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-13 12:31:00 +02:00
Giuliano Pochini
1b7f9278af speaker-test.c - fix pink noise generator on big-endian archs
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>
2008-04-28 09:16:27 +02:00
Takashi Iwai
6372f4acc2 speaker-test.c - fix sine generator on big-endian archs
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>
2008-04-21 15:19:27 +02:00
Takashi Iwai
9abeb5843a Remove xfer_align
The xfer_align is the obsolete feature now.  Remove it from aplay
and speaker-test to avoid deprecated calls.
2008-01-08 18:39:06 +01:00
Takashi Iwai
1e6f486623 speaker-test - Put errors to stderr
Error messages should be shown in stderr.
2007-11-05 12:44:13 +01:00
Takashi Iwai
9dd3e2801c speaker-test - Fix number of periods to play
The number of periods to play in pink and sine modes could be calculated
as zero, which results in just silence.  Make the minimal value 1.
2007-11-05 12:40:35 +01:00
Takashi Iwai
7af6e01ace Fix the default buffer size calculation in speaker-test
Fixed the default buffer size calculation in speaker-test.
The size should be aligned to nperiods.
2006-05-12 18:07:07 +02:00
Takashi Iwai
6d1673526b Avoid unnecessary drain/restart in speaker-test
Avoid unnecessary drain/restart in speaker-test when the buffer
is enough small.
2006-04-06 19:19:07 +02:00
Takashi Iwai
9b1a2566a1 Remove loops after errors
Don't retry after fatal errors.
2006-03-29 17:06:44 +00:00
Takashi Iwai
a948ec4204 Fix a typo in speaker-test help text
Fix a typo in speaker-test help text.  Updated ja.po, too.
2006-03-27 11:24:09 +00:00
Takashi Iwai
35544911e8 Fix missing commas
Fixed missing commas in array elements (ALSA bug#1938).
2006-03-24 16:36:31 +00:00
Takashi Iwai
5e1a68b7b7 Improve buffer/period set up in speaker-test
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
2006-03-24 14:46:52 +00:00
Takashi Iwai
8e821d4fee Add missing comma
Add a missing comma in the last fix...
2006-03-21 11:14:54 +00:00
Takashi Iwai
69c5beb106 Add --nloops option and fix manpage
- Added --nloops option to specify the number of loops
- Fixed man page of speaker-test
2006-03-06 19:42:23 +00:00
Takashi Iwai
8e6170206d Tentative fix for speaker-test WAV with 5 or more channels
Fix the WAV file name for center/lfe.  Use the existing
"Rear_Center.wav" for LFE as a workaround.
2006-03-02 11:41:58 +00:00
James Courtier-Dutton
2975ef9e75 speaker-test: Fix version reporting. 2005-12-22 13:35:42 +00:00
Takashi Iwai
35c0bd63ec Fix compile on big-endian arch
Fix compile on big-endian arch.
2005-12-14 15:11:42 +00:00
Takashi Iwai
9fe49dd30f speaker-test - Fix missing i18n
Add the gettext tags to newly added texts.
2005-12-01 11:31:26 +00:00
Takashi Iwai
9da694ef02 Add WAV file playback support to speaker-test
Add WAV file playback support to speaker-test.
The support is still limited to S16_LE, and doesn't refer to csv file yet.
2005-11-30 17:09:17 +00:00
James Courtier-Dutton
b69100fb0a Make speaker-test compatible with dmix by default. 2005-11-19 13:31:21 +00:00
Takashi Iwai
9dc666526f Disable NLS support when --disable-nls is passed
Disable NLS support when --disable-nls is passed (bug#1514).
2005-11-08 16:43:36 +00:00
Takashi Iwai
9d1ad2effd Fix compile with --disable-nls
Fix compile with --disable-nls.
2005-10-31 14:44:03 +00:00
James Courtier-Dutton
0733a8912b speaker-test: Add support for testing FLOAT_LE format. 2005-10-09 22:43:21 +00:00
James Courtier-Dutton
6304ad4634 Correct buffer size choosing. 2005-08-13 16:53:39 +00:00
Takashi Iwai
6343f35202 i18nize some programs
i18nize some programs with gettext.
2005-06-23 10:38:06 +00:00
James Courtier-Dutton
36820ac625 Don't use max volume 2005-05-03 18:36:08 +00:00
James Courtier-Dutton
177e788c59 Fix speaker-test with -FS32_LE format. 2005-05-03 18:27:50 +00:00
James Courtier-Dutton
36f7af4ffc Implement order for 8-channel sound, arranged in 7.1 mode. 2005-04-16 13:23:52 +00:00
James Courtier-Dutton
e7e0f401f1 Implement Pink noise output.
Thank you Nathan Hurst and Phil Burk.
2005-04-14 15:53:53 +00:00
James Courtier-Dutton
be0e80e87c Minor updates. No functionallity changes. 2005-04-14 15:06:33 +00:00
Takashi Iwai
ead77a1000 Update to speaker-tools 0.0.7
Updated to speaker-tools version 0.0.7.
2005-02-18 10:18:53 +00:00
Jaroslav Kysela
2db52ba839 James Courtier-Dutton <James@superbug.demon.co.uk>
I attach a patch that updates the speaker-test program.
It corrects a few minor bugs as well as add a new -s option.
2004-05-16 13:43:29 +00:00
Takashi Iwai
25dba8a7f2 added speaker-test utility by James Courtier-Dutton <James@superbug.demon.co.uk>
imported version: 0.0.4.
2004-05-10 14:28:02 +00:00