Hello Everyone,
My problem today is that speaker-test does not produce a 20kHz sine wave on Tinycore 16.0 to the line out. speaker-test does produce something just not a 20kHz sine wave.
speaker-test -t sine -f 20000 -X -l 0
However using the exact same hardware running Ubuntu 20.24 or 22.04 the following code works and a 20kHz sine wave is produced.
The difference being that the alsa versions are different between the 3 Operating Systems.
- Tinycore 16.0 Alsa version is 1.2.13
- Ubuntu 20.04 Alsa version is 1.2.2
- Ubuntu 22.04 Alsa version is 1.2.6
Through my testing, starting at 8000 Hz, and incrementing by 1000 Hz, speaker-test does produce a sine wave, until I went over 15000 Hz then no more sine wave.

speaker-test -t sine -f 8000 -X -l 0
speaker-test -t sine -f 15000 -X -l 0

speaker-test -t sine -f 16000 -X -l 0
The work around for the time being is to configure speaker-test to play a 20kHz wav file, this dose work and produces a beautiful sine wav

speaker-test -t wav -f /opt/20kHz.wav -l 0
Now for the people who will say why on earth do you want to produce a sound that no one can hear, and my reply is "Exactly".
I send the 20kHz sine wav across the audio line as a way to supervise that the audio line is fully functioning. The second the 20kHz tone stops we are notified and send someone out to fix the problem, whether it be hardware or someone accidentality cuts the wire, we want to know. Basically the 20 kHz sine wave does not interferer with paging in the system.
My first thoughts on why the 20 kHz sine is not produced, is because of missing driver. But I made sure that every sound driver that was loaded on Ubuntu was loaded on Tinycore.
sudo modprobe snd_seq_midi snd_seq_midi_event snd_intel_dspcfg
I also loaded AlsaPlugins.tcz just incase, but that did not make a difference.
tceload -i alsa-plugins.tcz
The last thing I tried after was to set the format sample -F parameter to 96000
speaker-test -t sine -f 20000 -X -l 0 -F 96000
At first when I did this I thought I was so smart. A sine wave appeared, however I did not have a speaker hooked up, but when the speaker got plugged in I heard a high pitched noise. So the parameter affected the output but not the desired output that I need.
Another thought that pass through my mind is could this be a configuration setting during the build of alsa that need to be turned on.
After all 15000 Hz does work.
This is slightly related to a previous post linked below.
https://forum.tinycorelinux.net/index.php/topic,27673.0.htmlThank you
Any help is greatly appreciated
gharig