← 返回命令列表

Linux command

speaker-test 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

speaker-test

Example

speaker-test -t sine -f [frequency]

Example

speaker-test -t wav

Example

speaker-test -t wav -w [path/to/file.wav]

Example

speaker-test -c [channels]

Example

speaker-test -D [device_name]

Example

speaker-test -s [channel_number]

说明

speaker-test generates test tones through ALSA sound devices to verify speaker configuration and channel mapping. It supports various test signals including pink noise, sine waves, and WAV file playback. The tool cycles through each speaker channel, playing the test signal to help identify which physical speaker corresponds to which audio channel. Use aplay -L to list available PCM devices for the -D option.

参数

-c, --channels _num_
Number of channels to test (default: 8)
-D, --device _name_
PCM device name to use
-f, --frequency _freq_
Sine wave frequency in Hz (default: 440)
-t, --test _type_
Test signal: pink, sine, wav, or st2095
-l, --nloops _count_
Number of test loops (0 = infinite)
-s, --speaker _channel_
Test single channel only
-w, --wavfile _file_
Custom WAV file for wav test
-W, --wavdir _directory_
Directory containing WAV files
-r, --rate _rate_
Sample rate in Hz
-b, --buffer _time_
Buffer size in microseconds
-p, --period _time_
Period size in microseconds
-P, --nperiods _periods_
Number of periods (default: 4)
-m, --chmap _map_
Channel position mapping override
-X, --force-frequency
Allow frequencies outside 30-8000Hz range
--help
Display usage information

FAQ

What is the speaker-test command used for?

speaker-test generates test tones through ALSA sound devices to verify speaker configuration and channel mapping. It supports various test signals including pink noise, sine waves, and WAV file playback. The tool cycles through each speaker channel, playing the test signal to help identify which physical speaker corresponds to which audio channel. Use aplay -L to list available PCM devices for the -D option.

How do I run a basic speaker-test example?

Run `speaker-test` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --channels _num_ do in speaker-test?

Number of channels to test (default: 8)