You are not logged in.
It is not enforced in the sense that it can be removed by experienced Linux users.
Resampling is not a problem, the problem is that it is enforced upon ALSA users.
PipeWire can be removed, but resampling cannot be disabled in ALSA (you can only change the default resampler of ALSA).
It seems that ALSA users are treated like miserable slaves.
The only way to prevent resampling with ALSA is to install the fftrate ALSA plugin and configure it correctly
(but you may need to reconfigure the fftrate plugin for audio files of another format)
$ aplay audio_test_48kHz_16bit.wav
Playing WAVE 'audio_test_48kHz_16bit.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Input: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates: 48000 --> 48000 (J: 0.00%, T: None, W: Planar)
T: None means "without resampling"
$ aplay -v audio_test_48kHz_16bit.wav
Playing WAVE 'audio_test_48kHz_16bit.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Input: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates: 48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: fftrate
Protocol version: 10003
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 7680
period_size : 1920
period_time : 40000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1920
period_event : 0
start_threshold : 7680
stop_threshold : 7680
silence_threshold: 0
silence_size : 0
boundary : 8646911284551352320
Slave: Direct Stream Mixing PCM
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 7680
period_size : 1920
period_time : 40000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1920
period_event : 0
start_threshold : 7680
stop_threshold : 7680
silence_threshold: 0
silence_size : 0
boundary : 8646911284551352320
Hardware PCM card 0 'iMic USB audio system' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 7680
period_size : 1920
period_time : 40000
tstamp_mode : ENABLE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 1920
period_event : 0
start_threshold : 1
stop_threshold : 8646911284551352320
silence_threshold: 0
silence_size : 8646911284551352320
boundary : 8646911284551352320
appl_ptr : 0
hw_ptr : 0
Since the fftrate real-time codec is likely to provide much better quality of resampling than your DAC built-in hardware resampler, it is recommended to set the fftrate resampler to maximum sample rate supported by your DAC (digital-to-analog converter).
Last edited by igorzwx (2025-08-22 12:38:10)
Offline
Resampling is not a problem, the problem is that it is enforced upon ALSA users
Again, it is not. Resampling is forced if you use dmix, because dmix can only mix streams at the same (fixed, when you configure the dmix pcm) sample rate. By default, that's 48kHz.
Resampling is also used if there is a 'plug' PCM involved and your input doesn't suit the next component in the chain (likely dmix if you are using any of the "default" devices), because automatically converting formats and sample rates is what the plug PCM does.
Use a 'hw:' PCM directly, and no software resampling will happen, at all. Regardless of what plugins you have installed or not.
If your hardware doesn't support what you're trying to play, it will simply fail.
This, by the way, is what audiophools everywhere have been doing for decades to get that magical "bit-perfect" output. It's a pain in the ass because you can only play one stream at a time and it will lock the output PCM, but that's not a problem for e.g. a dedicated LMS or MPD music player.
Unlike dmix, which always runs at the 48kHz common-denominator unless manually told otherwise, pipewire will intelligently try to find the highest sample rate that works for both the input stream and the output hardware, and set that up dynamically when you start playback. If it later needs to mix in something else, it'll upsample (which is lossless for any sane rate converter) the new stream to suit.
All that happens without the user needing to touch anything, or grub around in arcane and poorly documented ALSA configuration files. While it might not be a benefit to you, I'm pretty sure it's a win for people who just want the best audio they can reasonably expect, with the least hassle.
Bear in mind, the vast majority of normies these days have no idea what sample rate means beyond "bigger number better", get their music from youtube or $streaming_service, and play it back on some horrid little class-d bluetooth speaker. If pipewire makes that miserable experience even a fraction better by doing sane things with resampling by default, it's a service to music everywhere.
Pipewire is not perfect, and yes, it's a product of the "evil" freedesktop crowd... But it is a whole lot better than pulseaudio, and a whole lot less cumbersome to set up than a bunch of ALSA plugins.
Once, I did what you're doing. I wrote complicated asound .rc files, I pored over kernel sources and I hung out on mailing lists trying to make sense of the piss-poor ALSA documentation... Because the alternative was pulseaudio (or ESD, *shudder*), and pulseaudio sucks.
Now, we have a sound-server that sucks a whole lot less. It's still a sound server for better or worse, but there are good reasons every other modern OS uses one. If you don't want it, that's fine, you do you. But don't spread FUD about being "forced" to do things, the choice is yours same as it ever was.
Last edited by steve_v (2025-08-22 13:15:04)
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
Resampling is forced if you use dmix
You are mistaken. Resampling cannot be disabled in ALSA.
With or without dmix, ALSA is always resampling everything to 48kHz.
To fool semi-deaf users, it does simulate HiRes playback with Intel HDA codec (and other HiRes DACs), but it sounds crappy.
The deception is justified by the theory that human beings cannot hear the difference between HiRes and CD format.
The only way to prevent ALSA resampling, is to install the fftrate codec and configure it correctly.
Last edited by igorzwx (2025-08-22 13:56:21)
Offline
With or without dmix, ALSA is always resampling everything to 48kHz
Oh really:
$ $ aplay -D hw:PCH -c2 ./16_96k_PerfectTest.wav
Playing WAVE './16_96k_PerfectTest.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
$ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 96000 (96000/1)
period_size: 12000
buffer_size: 48000
96kHz in, 96kHz out. Where's this 48kHz bit you're talking about?
Maybe you mean this?
$ aplay -D plug:dmix -c2 ./16_96k_PerfectTest.wav
Playing WAVE './16_96k_PerfectTest.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
$ cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 16384
That's dmix doing dmix things, and if you don't configure it otherwise your default ALSA device will be using dmix.
fool semi-deaf users... simulate... deception
Yes yes, there always has to be some conspiracy in here doesn't there. Well, if it makes you feel better, you believe whatever you want dude.
Last edited by steve_v (2025-08-22 14:08:06)
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
It does simulate HiRes playback.
The deception works, if you cannot hear the difference between HiRes and 48kHz.
Offline
As they say in the industry, 'scope shots (showing resampling artefacts) or it didn't happen. You're writing guides on "bit-perfect" "audiophile" sound, so I assume you have a decent 'scope handy to test your findings, right?
Alternatively, feel free to point out the lines in the kernel sources that do this. I've looked (a long time ago, to be fair), have you?
Last edited by steve_v (2025-08-22 14:15:59)
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
Igor you don't know what you're talking about, you need to read more, alsa doesn't re-sample by default, neither does ffplay by the way.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
At this point I'm pretty sure, like ~80% of the people on this board, Igor is just trying to find some big conspiracy to sound "in the know" about.
I mean, this is a thread about audio quality, right? I don't see any FFTs or oscilloscope captures, blind-test results, or anything else that could even vaguely be called "evidence".... Just assertions that "someone" is pulling the wool over our eyes and this "magic sauce" (aka using a different resampler plugin) fixes a bunch of supposed "deceptions".
Last edited by steve_v (2025-08-22 14:22:43)
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
It is not so difficult to install fftrate, configure is properly, and check whether you hear the difference.
If you don't hear the difference, you might be perfectly happy with pipewire.
Offline
It's a pain in the ass because you can only play one stream at a time and it will lock the output PCM, but that's not a problem for e.g. a dedicated LMS or MPD music player.
Well, it's not a pain in the ass if you don't need/want multiple sound sources playing at the same time. And I am totally fine with alsa passing the music along without screwing with it too much.
Also, you lose system beeps altogether if you're running pure alsa, but weirdly enough if you have music already playing, you'll get the system beeps, lol.
EDIT: To be clear, I am not trying for anything "bit-perfect", just trying to have the least amount of software possible between the music and me.
Last edited by greenjeans (2025-08-22 14:27:06)
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
It is not so difficult to install fftrate, configure is properly, and check whether you hear the difference.
It's not so difficult to hook up a scope and show us the difference either. If the ALSA defaults really sound that bad, it should be quite obvious on even rummage-sale grade 10MHz gear.
If you don't hear the difference, you might be perfectly happy with pipewire.
"If you don''t hear the difference it doesn't mean my gizmo isn't working, you must just not have golden ears" is the standard line of audiophool snake-oil salesmen everywhere, always has been.
Well, it's not a pain in the ass if you don't need/want multiple sound sources playing at the same time.
Yeah, I know. I've got an old Pi with a DAC hat in my lounge that's set up that way. It only runs MPD, so who cares about stream mixing. vOv
Also, you lose system beeps altogether if you're running pure alsa, but weirdly enough if you have music already playing, you'll get the system beeps, lol.
That's... Interesting. I've talked to people having strange issues with the system bell before, and never really figured out what was going on. That might be a useful clue the next time it comes up.
Last edited by steve_v (2025-08-22 14:38:14)
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
@steve_v
It seems that you trust your scope and terminal output rather than your ears.
Offline
You mean I trust objective measurement over subjective opinion? Damn sure I do.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
That's... Interesting. I've talked to people having strange issues with the system bell before, and never really figured out what was going on. That might be a useful clue the next time it comes up.
Crazy huh? I found out by accident, scrolling to the end of a man page in terminal while music was playing. Obviously this is in Openbox only, Mate has it's own built in mixer so you always get everything. Don't know about other DE's.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
I trust objective measurement
If you do not know how to fool yourself with "objective measurement", try to read Richard Feynman
Feynman, Richard P. (June 1974). "Cargo Cult Science" (PDF). California Institute of Technology. Archived (PDF) from the original on 2022-10-09. Retrieved 2015-10-25.
_http://calteches.library.caltech.edu/51/2/CargoCult.pdf
If you do not trust your ears, you might be perfectly happy with pipewire.
people having strange issues with the system bell before
Arch Linux users had such problem many years ago, when systemd was enforced.
The "beeping driver" was in the boot image.
It was not enough to blacklist it, one had to rebuild the boot image (Initramfs).
Last edited by igorzwx (2025-08-22 15:30:12)
Offline
If you think your ears are a reliable instrument, you might be happy reading tea leaves.
I'm not going to argue this, you'll just keep trotting out the old "if you can't hear the difference" line until we both die of old age.
I've been there before, with many an audiophool convinced that the special crystal power lead stands or $8000 speaker cables they got conned into buying make a real difference. All that happens is abandonment of any kind of scientific method for a bunch of feely-woo about "warmness" "depth" "clarity" and other intangible unquantifiable nonsense. Sound reproduction is not magic, and any parameter thereof that matters can be measured and quantified.
Further, it can be measured and quantified with the kind of equipment that costs very little these days - so you are either intentionally omitting measurements because you know they won't prove your point, or you lack the expertise to conduct them. Either way, I call shenanigans. The burden of proof is on the one making the bold claims, and right now that is you.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
@steve_v
Do you think your ears are not a reliable instrument?
Offline
Of course they aren't. You've never actually conducted a double-blind a/b test, have you?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
He doesn't even have a basic understanding of human hearing Steve, he seems to believe that everyone has the exact same hearing across all frequencies unless it's been damaged. He's maybe stumbled upon something that fills in the weak spots in his own hearing, and now assumes that's what's right for everyone.
Fletcher-Munson curve was like day one back in tech school.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
Of course they aren't.
Do you trust your eyes?
Do you trust your brain?
Do think that your brain can be deceptive?
Offline
He doesn't even have a basic understanding of human hearing Steve
Righty ho then, seems I'm rolling rocks up Mt. Kruger again. Guess I'll stop now before this gets out of hand.
Shame, audio engineering is a bit of a hobby of mine. Mostly old-school analog stuff mind, but here I was hoping for a real debate and maybe an excuse to unpack some of my pets test equipment. Nevermind.
Do think that your brain can be deceptive?
I see... When rational arguments don't go your way, appeal to, what, garden-shed psychology? philosophy? No thanks.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
Wait, Igor may be on to something, i've been sitting here listening to music and Magic Bus by The Who came on, and while it was playing I was singing along, but instead of singing " Too much, magic bus" every time, I started singing "Igor's magic sauce" instead, and the more I chanted it, the more it started to sound better! WOW!
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
At least you have taste
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Offline
Shame, audio engineering is a bit of a hobby of mine. Mostly old-school analog stuff mind, but here I was hoping for a real debate and maybe an excuse to unpack some of my pets test equipment. Nevermind.
That would be a great conversation that i'd happily participate in.
I think I still have an old Simpson voltmeter in one of my boxes of old stuff, circa early 80's.
https://sourceforge.net/projects/vuu-do/ New Vuu-do isos uploaded August 2025!
Vuu-do GNU/Linux, minimal Devuan-based Openbox and Mate systems to build on. Also a max version for OB.
Devuan 5 mate-mini iso, pure Devuan, 100% no-vuu-do. Devuan 6 version also available for testing.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
If you do not trust your ears, how can you trust your eyes, your brain, your thoughts, and your opinions?
Offline