Hello, and thank you in advance.
I have been installing Artix XFCE S - 6.
How to add high quality settings like this
It's from period when I used pulseaudio.
How to check which is my current sample format and sample rate in Alsa ? Thank you.
Bonjour,
Have you seen this pages :
https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture
https://www.alsa-project.org/wiki/Asoundrc
https://alsa.opensrc.org/ALSA_plugins
Ok, but I don't know where to enter such parameters: default-sample-format = float32le ?
For example, there is
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format unchanged
defaults.pcm.dmix.card defaults.pcm.card
But no default and alternate sample rate.
Link that you provided is about systemd and pulseaudio.
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
I have installed alsa-plugins, but I don't know what to do next, in order to change bit depth, sample rate and default sample channels.
How to check if file that I am playing, is played with correct bit depth ?
Sorry for giving you false hope.
I use alsa without looking much further.
However, I read this:
pcm.device{
format S24_LE
rate 96000
type hw
card 0
device 0
}
https://unix.stackexchange.com/questions/74558/change-sampling-rate-in-alsa
Sorry :-[
From what I understood we can define the conversion format in in /etc/asound.conf or ~ /.asoundrc
It is probably not useful to use plugins.
Sorry I couldn't tell you more, but here are two more threads worth reading:
https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html
https://community.blokas.io/t/any-way-to-get-a-better-format-than-16bit-when-opening-an-output-in-alsa-with-sdl/1353/7
In case someone is interested
cat /proc/asound/card1/pcm0p/sub0/hw_params
(Change parameters according to your card)
It displays current file, current bit depth and sample rate.
It displays 32 bit and 48.000, no matter what I have been playing.
It seems that S - 6 installed pipewire for me (??).
I have to wonder why you want to set your sample rate this way when the standard for quality audio is 44.1 kHz and 48 kHz.
ALSA will default to 48 kHz for mixing purposes and use dmix with a possibly sub-standard process.
edit:
You can configure your music player to use direct device output, bypassing ALSA's resampling. This achieves easy and bit-perfect playback at the source samplerate, if your card supports it. In mpd, this segment of the configuration looks like:
audio_output {
type "alsa"
name "alsa"
device "hw:0,0"
auto_resample "no"
}
You won't play other audio sources simultaneously since there's no mixing being done. This is with the
music player. Everything else will be resampled at the default 48kHz. Then in ~/.asoundrc, change the means that ALSA uses to resample (sox, speex, libsamplerate, etc) for best overall quality in other applications.
I have many vinyl rips in 24 bit and in 96.000 and more hz.
You mean that I should enter that in asoundrc ?
Where I can find current bitrate and sample rate ?
Is this correct ?
cat /proc/asound/card1/pcm0p/sub0/hw_params
Thank you,
My example shows an mpd configuration. It's configured in the music player you use, but the idea is the same - change output to hardware device.
Yes. Globbing
may give more info (eg. `cat /proc/asound/card*/pcm*p/sub*/hw_params`). You want to see the sample rate adjusting per the source material.