Open Ryp opened 1 year ago
Sorry for taking so long to respond. Unfortunately, I'm a bit at loss here. As you can see here, librespot
is using a hardcoded 44.1kHz value that it tries to use with the device. So there is probably something in your audio setup preventing this value from working and making it fall back to something working near that value.
Maybe you can try to see, if alsa correctly recognizes that your DAC is able to play at that sample rate?
I won't have access to my setup for a while, so I'll try to get back with more info when that happens. Thanks for the reply
Bump. I have exactly same problem with spotifyd (when using alsa backend). The spotifyd outputs at 48kHz/S32_LE to DAC. As pointed out by OP, it should be 44.1kHz/S16 (or S32*). My config:
# cat spotifyd.conf
[global]
use_mpris = false
dbus_type = "system"
backend = "alsa"
device_name = "SMSL D6s"
device = "default"
control = "default"
bitrate = 320
device_type = "speaker"
zeroconf_port = 53535
# The PCM sample format to use. Possible values are F32, S32, S24, S24_3, S16.
audio_format = "S16"
volume_controller = "none"
no_audio_cache = true
cache_path = "/dev/shm"
max_cache_size = 1000000000
volume_normalisation = false
normalisation_pregain = -10
autoplay = true
and...
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
Let me know if additional details are needed.
To Reproduce Use
alsa
as the audio backend. Play a song. Run this command and replacecardX
with the correct deviceOn my machine it shows 48khz. My DAC has a display and states the same. My DAC can play 44.1khz as well
Expected behavior Music should play at 44.1khz (or some multiple) because that's most likely the source audio format. 48khz is for videos, and using it for music add a useless resampling step (purists would consider this heresy, even though it still sounds good).
Logs
Click to show logs
``` CliConfig { config_path: None, no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: Some("taken out for privacy"), username_cmd: None, password: Some("taken out for privacy"), password_cmd: None, use_keyring: false, use_mpris: Some(true), dbus_type: None, on_song_change_hook: None, cache_path: None, no-audio-cache: true, backend: Some(Alsa), volume_controller: None, device: Some("default:CARD=NOPE"), control: None, mixer: None, device_name: Some("no"), bitrate: Some(Bitrate320), audio_format: Some(S24), initial_volume: None, volume_normalisation: true, normalisation_pregain: None, zeroconf_port: None, proxy: None, device_type: Some(Avr), autoplay: false, max_cache_size: None } } Found user shell: Some("/bin/bash") No proxy specified registering event source with poller: token=Token(2147483649), interests=READABLE Using software volume controller. registering event source with poller: token=Token(0), interests=READABLE | WRITABLE signal: Want signal found waiting giver, notifying poll_want: taker wants! signal: Want signal: Want deregistering event source from poller signal: Closed Ignoring blacklisted access point ap-gew4.spotify.com:4070 Ignoring blacklisted access point ap-gue1.spotify.com:443 Connecting to AP "ap-gew1.spotify.com:443" registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE new Session[0] Mixing with softvol and volume control: Log(60.0) Normalisation Type: Auto Normalisation Pregain: 0.0 dB Normalisation Threshold: -2.0 dBFS Normalisation Method: Dynamic Session[0] strong=3 weak=1 Country: "FR" Normalisation Attack: 5 ms Normalisation Release: 100 ms Normalisation Knee: 5 dB new Spirc[0] new MercuryManager Input volume 58958 mapped to: 49.99% new Player[0] Converting with ditherer: tpdf Using AlsaSink with format: S24 command=AddEventSender command=VolumeSet(58958) registering event source with poller: token=Token(1), interests=READABLE kMessageTypeNotify "Web Player (Firefox)" 28f3e936584cd981c2c3147e97808edcee5fa1d8 253424170 1692470538006 kPlayStatusStop State: context_uri: "spotify:playlist:78sNyQed5gKSrFElk9DjgX" index: 0 position_ms: 0 status: kPlayStatusPlay position_measured_at: 1692470545149 context_description: "" shuffle: true repeat: false playing_from_fallback: true row: 0 playing_track_index: 0 track {gid: ">\341;\025B\027E5\275\211Q\266\276\374\r\322"} track {gid: "\272\327\007dX\262B\332\243\202\030\345{\263\371\036"} track {gid: "\312\263\245zs\353JI\2457\356\333\277\327\324s"} track {gid: "\3551\\O^=HD\266\372?A\331 \216\375"} track {gid: "7\225\352\205\021\006DB\277\304d\2479Q\331\246"} track {gid: "-\302\000\177>lB^\223DnDk\222\301~"} track {gid: "\221\2304\314\3202M\302\261\276\347\327U\357\237\332"} track {gid: "ih\201J\005\324@\326\246\212\022\354(\222\211N"} track {gid: "Q\225\365w\373\003F\277\243L\030\215*p\335."} track {gid: "2v\023\324\275TJ\r\267\372;w\\\223O~"} track {gid: "\221\361#Q\226\252K\244\237\276\234\t\177\274c("} track {gid: "\251>(R\317Compilation flags
Versions