HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: kogam4 on 2014-01-12 04:55:07

Title: Automatic Downsampling in ALSA/PulseAudio
Post by: kogam4 on 2014-01-12 04:55:07
Hello Everyone,

I'm currently running a Linux Mint 13 setup with ALSA and Pulseaudio configured. I've gone through every configuration file on both ALSA and PA that I can find, attempting to put the settings to 24/96 output in every instance. I don't know whether ALSA or PA is to blame, but higher resolution files are being automatically downmixed to 16/48, which is less than ideal. These are the files I've edited:

/etc/pulse/daemon.conf
/usr/share/alsa/alsa.conf
~/.asoundrc

cat ~/.asoundrc:
defaults.pcm.!rate_converter "samplerate_best"   
defaults.pcm.dmix.!rate 96000   
defaults.pcm.dmix.!format S24_LE

I don't know guys. I'm out of ideas, does anyone else have any?

Regards,
Kogami
Title: Automatic Downsampling in ALSA/PulseAudio
Post by: phofman on 2014-01-12 08:23:03
PA - https://wiki.archlinux.org/index.php/Audiop...back#Pulseaudio (https://wiki.archlinux.org/index.php/Audiophile_Playback#Pulseaudio)

The libsamplerate resampling method is pretty CPU intensive, check http://blog.ivitera.com/pavel/linux-audio/...ing-libsoxr-lsr (http://blog.ivitera.com/pavel/linux-audio/pulseaudio-with-ld_preloading-libsoxr-lsr)

Alsa - if your apps use PA exclusively, no need to change anything there. In PA-enabled distributions the default alsa device is configured to be just a bridge to PA.

Title: Automatic Downsampling in ALSA/PulseAudio
Post by: kogam4 on 2014-01-12 19:53:34
PA - https://wiki.archlinux.org/index.php/Audiop...back#Pulseaudio (https://wiki.archlinux.org/index.php/Audiophile_Playback#Pulseaudio)

The libsamplerate resampling method is pretty CPU intensive, check http://blog.ivitera.com/pavel/linux-audio/...ing-libsoxr-lsr (http://blog.ivitera.com/pavel/linux-audio/pulseaudio-with-ld_preloading-libsoxr-lsr)

Alsa - if your apps use PA exclusively, no need to change anything there. In PA-enabled distributions the default alsa device is configured to be just a bridge to PA.


I know. I've edited my pulseaudio config file to refect that, but it still downsamples
cat /etc/pulse/daemon.conf:
; daemonize = yes
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

; high-priority = yes
; nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = src-sinc-medium-quality
; enable-remixing = yes
; enable-lfe-remixing = no

flat-volumes = no

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000

; default-sample-format = s24le
; default-sample-rate = 96000
; alternate-sample-rate = 96000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

default-fragments = 8
default-fragment-size-msec = 10

; enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 1
; deferred-volume-extra-delay-usec = 0

So I really can't figure it out. Banshee/Audacious is outputting bit-perfect to pulse, which should be sampling the material at 24/96, which ALSA should accept at the native resolution. But something is broken in that chain.
Title: Automatic Downsampling in ALSA/PulseAudio
Post by: phofman on 2014-01-12 20:09:51
If the listing is your current setup, I see the corresponding options commented out, i.e. inactive.
Title: Automatic Downsampling in ALSA/PulseAudio
Post by: kogam4 on 2014-01-12 20:20:07
Wow. I can't believe I missed that.
Sorry, that fixed the problem.