Ugh, Alsa again … Linux versions after 5.10.94 have this regression that changing the sample rate with snd_pcm_hw_params returns "invalid argument" if you call it a second time, and I could finally no longer delay updating my kernel, so I worked around it by re-opening the device if I need to change the sample format.
That is everything I changed. And somehow, now playback sounds super noisy and as if there is overdrive in the high frequencies?
=> More informations about this toot | More toots from ruuda@fosstodon.org
Unplugging the external sound card and plugging it in again has fixed this issue. I am now even more puzzled.
=> More informations about this toot | More toots from ruuda@fosstodon.org
Aaand the distortion returned 😕
=> More informations about this toot | More toots from ruuda@fosstodon.org
Rebooting also fixed it, and what’s more, if my program closes the device and re-opens it and sets it to a different sample rate and bit depth, then it’s also fine again. Seems to be totally a software problem. I wonder if it’s the Alsa plug
system.
=> More informations about this toot | More toots from ruuda@fosstodon.org
When it switches back from 24 bit / 48 kHz to 16 bit / 44.1 kHz, the 16-44 one sounds distorted again! Ugh!
=> More informations about this toot | More toots from ruuda@fosstodon.org
I’m curious what it is that I’m hearing though! You can still hear the track clearly, but it sounds distorted especially in higher and louder parts, like the vocals. It sounds the same as distortion on a guitar amp. It is also still stereo.
Two hypothesis:
=> More informations about this toot | More toots from ruuda@fosstodon.org
I now rewrote all my code to no longer use the Alsa plug:
device, it talks to the raw card now, and it still happens 😢 When I play back 96 kHz audio, it takes longer to play and sounds like garble. I unplug the USB sound card and plug it back in, and suddenly playback — using the exact same code — works fine! And I think it’s in the kernel and not in the device itself, because it worked fine on an older Linux version.
=> More informations about this toot | More toots from ruuda@fosstodon.org
@ruuda write angry email to Linus that he broke userspace
=> More informations about this toot | More toots from arianvp@functional.cafe
@arianvp I did, two years ago: https://www.spinics.net/lists/alsa-devel/msg138533.html
=> More informations about this toot | More toots from ruuda@fosstodon.org This content has been proxied by September (ba2dc).Proxy Information
text/gemini