All –
I spent some time today grabbing captures from my oscilloscope and playing around with them. Unless specified, pulseaudio is running. I connected the oscilloscope probe and ground directly across the speaker supplied with the Pimoroni Pirate radio so there are the waveforms the speaker sees.
First, I put a 1 kHz sine wave on the speaker with
speaker-test -t sine -f 1000 -S 80
and took the following screenshot from the scope:
Note how the scope plot looks like it might have problems at the peak of the waveform.
I captured the raw data from the scope and applied a 10kHz low-pass filter, which produced
The blue trace is the data captured from the scope and the orange trace is the filtered data.
This surprised me. I though I would definitely see clipping but the digital mess from the scope produces a pretty clean sine wave once you filter it. So, the speaker-test utility is working correctly.
Next, I captured some audio from the Pimoroni Pirate radio. I turned the volume up until about half the LRDs were lit and captured the following data from the scope:
I filtered at 10kHz to produced
I believe you can see the clipping in the filtered signal (e.g. the flat parts around -2V and +2V).
With the volume turned down such that only the lower LEDs are lit, I captured and produced
Filtering =>
I had to zoom in on the filtered signal, but you can still see the clipping.
When I disabled pulseaudio, I captured (at 50% volume)
hich produced a filtered signal of
and the clipping seems to be gone.