[GH-ISSUE #542] Crash when trying to play to alsa loopback device #346

Closed
opened 2026-02-27 19:30:08 +03:00 by kerem · 4 comments
Owner

Originally created by @yofreke on GitHub (Nov 27, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/542

Originally assigned to: @roderickvd on GitHub.

My goal is to run the output of librespot to an alsa loopback device, however I get this crash when trying to play audio. It seems like the crash only happens when something is listening to the other side of the loopback. Happy to help debug if there is any missing info

pi@raspberrypi:~ $ sudo modprobe snd-aloop

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 4/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

pi@raspberrypi:~ $ sudo /usr/bin/librespot --device hw:2,0,0 --name tinyPi --backend alsa
[2020-11-27T08:54:04Z INFO  librespot] librespot (raspotify v0.14.0) 6aac8a6 (2020-07-24). Built on 2020-07-26. Build ID: wPNyqn0m
[2020-11-27T08:54:11Z INFO  librespot_core::session] Connecting to AP "guc3-accesspoint-b-xzfv.ap.spotify.com:4070"
[2020-11-27T08:54:11Z INFO  librespot_core::session] Authenticated as "yofreke" !
[2020-11-27T08:54:11Z INFO  librespot_playback::audio_backend::alsa] Using alsa sink
[2020-11-27T08:54:11Z INFO  librespot_core::session] Country: "US"
[2020-11-27T08:54:12Z INFO  librespot_playback::player] Loading <Avenues> with Spotify URI <spotify:track:6JO9hJYbENVIeo5J6NP8l4>
[2020-11-27T08:54:12Z INFO  librespot_playback::player] <Avenues> (139663 ms) loaded
[2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'
[2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed
[2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'
[2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed
[2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'
[2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', playback/src/audio_backend/alsa.rs:103:19
stack backtrace:
   0:   0x8ab584 - backtrace::backtrace::libunwind::trace::had1ce870e7642f03
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1:   0x8ab584 - backtrace::backtrace::trace_unsynchronized::he46c884781dd51a8
                       at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2:   0x8ab584 - std::sys_common::backtrace::_print_fmt::h621902e5e498623c
                       at src/libstd/sys_common/backtrace.rs:78
   3:   0x8ab584 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h39c43d9eea8febb9
                       at src/libstd/sys_common/backtrace.rs:59
   4:   0x8d2e88 - core::fmt::write::h1faa4c62c7847860
                       at src/libcore/fmt/mod.rs:1076
   5:   0x8a4cd4 - std::io::Write::write_fmt::h1d02362bb0653180
                       at src/libstd/io/mod.rs:1537
   6:   0x8ade68 - std::sys_common::backtrace::_print::hb6e6bf916a89634f
                       at src/libstd/sys_common/backtrace.rs:62
   7:   0x8ade68 - std::sys_common::backtrace::print::h70b0c25b24fd7afb
                       at src/libstd/sys_common/backtrace.rs:49
   8:   0x8ade68 - std::panicking::default_hook::{{closure}}::hc261daa3190f9e66
                       at src/libstd/panicking.rs:198
   9:   0x8adb1c - std::panicking::default_hook::h5ce743d47ceb319b
                       at src/libstd/panicking.rs:218
  10:   0x8ae520 - std::panicking::rust_panic_with_hook::hb609da6fd4918712
                       at src/libstd/panicking.rs:486
  11:   0x8ae13c - rust_begin_unwind
                       at src/libstd/panicking.rs:388
  12:   0x8d0560 - core::panicking::panic_fmt::h48562d60f069801a
                       at src/libcore/panicking.rs:101
  13:   0x8d04bc - core::panicking::panic::h3b12b164efb75653
                       at src/libcore/panicking.rs:56
  14:   0x534e2c - <librespot_playback::audio_backend::alsa::AlsaSink as librespot_playback::audio_backend::Sink>::write::hfd03664996f46394
  15:   0x5258e0 - <librespot_playback::player::PlayerInternal as futures::future::Future>::poll::h42ccf25cc1b87898
  16:   0x4a0088 - futures::task_impl::std::set::h9bf896dc3d2ccfae
  17:   0x481d24 - std::thread::local::LocalKey<T>::with::h2213c9258ce9c67a
  18:   0x488658 - futures::future::Future::wait::h648a3718536bde53
  19:   0x481858 - std::sys_common::backtrace::__rust_begin_short_backtrace::h34ff2c5cefca6e3d
  20:   0x49ded8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h581f1baab70f4017
  21:   0x8b48c8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hb42eae37b0651b8e
                       at /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/liballoc/boxed.rs:1076
  22:   0x8b48c8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h51216037af35b9c0
                       at /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/liballoc/boxed.rs:1076
  23:   0x8b48c8 - std::sys::unix::thread::Thread::new::thread_start::hcd96612ae799c481
                       at src/libstd/sys/unix/thread.rs:87
^C[2020-11-27T08:54:17Z ERROR librespot_playback::player] Player thread panicked!

Originally created by @yofreke on GitHub (Nov 27, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/542 Originally assigned to: @roderickvd on GitHub. My goal is to run the output of librespot to an alsa loopback device, however I get this crash when trying to play audio. It seems like the crash only happens when something is listening to the other side of the loopback. Happy to help debug if there is any missing info ``` pi@raspberrypi:~ $ sudo modprobe snd-aloop pi@raspberrypi:~ $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1] Subdevices: 4/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 4/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 pi@raspberrypi:~ $ sudo /usr/bin/librespot --device hw:2,0,0 --name tinyPi --backend alsa [2020-11-27T08:54:04Z INFO librespot] librespot (raspotify v0.14.0) 6aac8a6 (2020-07-24). Built on 2020-07-26. Build ID: wPNyqn0m [2020-11-27T08:54:11Z INFO librespot_core::session] Connecting to AP "guc3-accesspoint-b-xzfv.ap.spotify.com:4070" [2020-11-27T08:54:11Z INFO librespot_core::session] Authenticated as "yofreke" ! [2020-11-27T08:54:11Z INFO librespot_playback::audio_backend::alsa] Using alsa sink [2020-11-27T08:54:11Z INFO librespot_core::session] Country: "US" [2020-11-27T08:54:12Z INFO librespot_playback::player] Loading <Avenues> with Spotify URI <spotify:track:6JO9hJYbENVIeo5J6NP8l4> [2020-11-27T08:54:12Z INFO librespot_playback::player] <Avenues> (139663 ms) loaded [2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument' [2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed [2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument' [2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed [2020-11-27T08:54:12Z ERROR librespot_playback::audio_backend::alsa] Alsa error PCM open ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument' [2020-11-27T08:54:12Z ERROR librespot_playback::player] Could not start audio: Alsa error: PCM open failed thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', playback/src/audio_backend/alsa.rs:103:19 stack backtrace: 0: 0x8ab584 - backtrace::backtrace::libunwind::trace::had1ce870e7642f03 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86 1: 0x8ab584 - backtrace::backtrace::trace_unsynchronized::he46c884781dd51a8 at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66 2: 0x8ab584 - std::sys_common::backtrace::_print_fmt::h621902e5e498623c at src/libstd/sys_common/backtrace.rs:78 3: 0x8ab584 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h39c43d9eea8febb9 at src/libstd/sys_common/backtrace.rs:59 4: 0x8d2e88 - core::fmt::write::h1faa4c62c7847860 at src/libcore/fmt/mod.rs:1076 5: 0x8a4cd4 - std::io::Write::write_fmt::h1d02362bb0653180 at src/libstd/io/mod.rs:1537 6: 0x8ade68 - std::sys_common::backtrace::_print::hb6e6bf916a89634f at src/libstd/sys_common/backtrace.rs:62 7: 0x8ade68 - std::sys_common::backtrace::print::h70b0c25b24fd7afb at src/libstd/sys_common/backtrace.rs:49 8: 0x8ade68 - std::panicking::default_hook::{{closure}}::hc261daa3190f9e66 at src/libstd/panicking.rs:198 9: 0x8adb1c - std::panicking::default_hook::h5ce743d47ceb319b at src/libstd/panicking.rs:218 10: 0x8ae520 - std::panicking::rust_panic_with_hook::hb609da6fd4918712 at src/libstd/panicking.rs:486 11: 0x8ae13c - rust_begin_unwind at src/libstd/panicking.rs:388 12: 0x8d0560 - core::panicking::panic_fmt::h48562d60f069801a at src/libcore/panicking.rs:101 13: 0x8d04bc - core::panicking::panic::h3b12b164efb75653 at src/libcore/panicking.rs:56 14: 0x534e2c - <librespot_playback::audio_backend::alsa::AlsaSink as librespot_playback::audio_backend::Sink>::write::hfd03664996f46394 15: 0x5258e0 - <librespot_playback::player::PlayerInternal as futures::future::Future>::poll::h42ccf25cc1b87898 16: 0x4a0088 - futures::task_impl::std::set::h9bf896dc3d2ccfae 17: 0x481d24 - std::thread::local::LocalKey<T>::with::h2213c9258ce9c67a 18: 0x488658 - futures::future::Future::wait::h648a3718536bde53 19: 0x481858 - std::sys_common::backtrace::__rust_begin_short_backtrace::h34ff2c5cefca6e3d 20: 0x49ded8 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h581f1baab70f4017 21: 0x8b48c8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hb42eae37b0651b8e at /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/liballoc/boxed.rs:1076 22: 0x8b48c8 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h51216037af35b9c0 at /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/liballoc/boxed.rs:1076 23: 0x8b48c8 - std::sys::unix::thread::Thread::new::thread_start::hcd96612ae799c481 at src/libstd/sys/unix/thread.rs:87 ^C[2020-11-27T08:54:17Z ERROR librespot_playback::player] Player thread panicked! ```
kerem 2026-02-27 19:30:08 +03:00
Author
Owner

@bartoszwalicki commented on GitHub (Dec 12, 2020):

I have the same problem. I am trying to play on softvol pcm device. Configured in ALSA as:

pcm.softvol {
        type    softvol
        slave {
                pcm     "hw:CARD=FXAUDIODACX6"
        }
        control {
                name    "SoftMaster"
                card    "FXAUDIODACX6"
        }
}

Trying to play via raspotify, passing --device softvol to librespot.

<!-- gh-comment-id:743784385 --> @bartoszwalicki commented on GitHub (Dec 12, 2020): I have the same problem. I am trying to play on softvol pcm device. Configured in ALSA as: ``` pcm.softvol { type softvol slave { pcm "hw:CARD=FXAUDIODACX6" } control { name "SoftMaster" card "FXAUDIODACX6" } } ``` Trying to play via raspotify, passing `--device softvol` to `librespot`.
Author
Owner

@ashthespy commented on GitHub (Dec 12, 2020):

This fails because we explicitly set the rate to 44100 along with other hardware parameters in alsa.rs -- is your device capable of that?
github.com/librespot-org/librespot@89cafd7c86/playback/src/audio_backend/alsa.rs (L50-L53)

Try and see if this patch helps?

<!-- gh-comment-id:743801615 --> @ashthespy commented on GitHub (Dec 12, 2020): This fails because we explicitly set the rate to `44100` along with other hardware parameters in [`alsa.rs`](https://github.com/librespot-org/librespot/blob/89cafd7c86cd62ca0666a9a3d94eeb50fa51a16e/playback/src/audio_backend/alsa.rs#L51) -- is your device capable of that? https://github.com/librespot-org/librespot/blob/89cafd7c86cd62ca0666a9a3d94eeb50fa51a16e/playback/src/audio_backend/alsa.rs#L50-L53 Try and see if [this patch](https://github.com/ashthespy/librespot/blob/08d8bccf7300e0d5f0b32f88155656ee57ba9cce/playback/src/audio_backend/alsa.rs#L46-L50) helps?
Author
Owner

@roderickvd commented on GitHub (May 25, 2021):

That's weird because snd_pcm_hw_params_set_rate_resample() is enabled by default.

I cannot reproduce this on my setup (also, Alsa softvol is working fine for me and other users).
Can you try this on the latest librespot and report back?

In the logs below you see that the loopback device assumes rate 48000 by default but changes to 44100 the moment librespot starts playback.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpirpidac [snd_rpi_rpi_dac], device 0: RPi-DAC HiFi pcm1794a-codec-0 [RPi-DAC HiFi pcm1794a-codec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
$ aplay -Dhw:1,0,0 --dump-hw-params --verbose /usr/share/sounds/alsa/Front_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
HW Params of device "hw:1,0,0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S16_LE S16_BE S24_LE S24_BE S32_LE S32_BE FLOAT_LE FLOAT_BE S24_3LE S24_3BE
SUBFORMAT:  STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [16 1024]
CHANNELS: [1 32]
RATE: [8000 192000]
PERIOD_TIME: (5 65536000]
PERIOD_SIZE: [1 524288]
PERIOD_BYTES: [64 1048576]
PERIODS: [1 1024]
BUFFER_TIME: (5 131072000]
BUFFER_SIZE: [1 1048576]
BUFFER_BYTES: [64 2097152]
TICK_TIME: ALL
--------------------
Hardware PCM card 1 'Loopback' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 1572864000
  appl_ptr     : 0
  hw_ptr       : 0
$ ./librespot/target/debug/librespot --device hw:1,0,0 --backend alsa &
[1] 17902
[2021-05-25T19:27:57Z INFO  librespot] librespot 0.2.0 902ba3b (Built on 2021-05-23, Build ID: 1fVNCtXP)
[2021-05-25T19:28:05Z INFO  librespot_core::session] Connecting to AP "gew1-accesspoint-b-pdv7.ap.spotify.com:4070"
[2021-05-25T19:28:09Z INFO  librespot_core::session] Authenticated as "roderickvd" !
[2021-05-25T19:28:09Z INFO  librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2021-05-25T19:28:09Z INFO  librespot_playback::audio_backend::alsa] Using Alsa sink with format: S16
[2021-05-25T19:28:09Z INFO  librespot_core::session] Country: "NL"
[2021-05-25T19:28:09Z INFO  librespot_playback::player] Loading <What Happens To Me> with Spotify URI <spotify:track:0n6Tc3UXJXneAgDWWQMO5u>
[2021-05-25T19:28:10Z INFO  librespot_playback::player] <What Happens To Me> (304440 ms) loaded
$ cat /proc/asound/card1/pcm0p/sub0/hw_params 
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22052
<!-- gh-comment-id:848204700 --> @roderickvd commented on GitHub (May 25, 2021): That's weird because `snd_pcm_hw_params_set_rate_resample()` is [enabled by default](https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html#ga82eecc0e27a94ce0caa195cc3765536c). I cannot reproduce this on my setup (also, Alsa softvol is working fine for me and other users). Can you try this on the latest `librespot` and report back? In the logs below you see that the loopback device assumes rate 48000 by default but changes to 44100 the moment `librespot` starts playback. ``` $ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: sndrpirpidac [snd_rpi_rpi_dac], device 0: RPi-DAC HiFi pcm1794a-codec-0 [RPi-DAC HiFi pcm1794a-codec-0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 $ aplay -Dhw:1,0,0 --dump-hw-params --verbose /usr/share/sounds/alsa/Front_Left.wav Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono HW Params of device "hw:1,0,0": -------------------- ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED FORMAT: S16_LE S16_BE S24_LE S24_BE S32_LE S32_BE FLOAT_LE FLOAT_BE S24_3LE S24_3BE SUBFORMAT: STD SAMPLE_BITS: [16 32] FRAME_BITS: [16 1024] CHANNELS: [1 32] RATE: [8000 192000] PERIOD_TIME: (5 65536000] PERIOD_SIZE: [1 524288] PERIOD_BYTES: [64 1048576] PERIODS: [1 1024] BUFFER_TIME: (5 131072000] BUFFER_SIZE: [1 1048576] BUFFER_BYTES: [64 2097152] TICK_TIME: ALL -------------------- Hardware PCM card 1 'Loopback' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 16 buffer_size : 24000 period_size : 6000 period_time : 125000 tstamp_mode : NONE tstamp_type : MONOTONIC period_step : 1 avail_min : 6000 period_event : 0 start_threshold : 24000 stop_threshold : 24000 silence_threshold: 0 silence_size : 0 boundary : 1572864000 appl_ptr : 0 hw_ptr : 0 $ ./librespot/target/debug/librespot --device hw:1,0,0 --backend alsa & [1] 17902 [2021-05-25T19:27:57Z INFO librespot] librespot 0.2.0 902ba3b (Built on 2021-05-23, Build ID: 1fVNCtXP) [2021-05-25T19:28:05Z INFO librespot_core::session] Connecting to AP "gew1-accesspoint-b-pdv7.ap.spotify.com:4070" [2021-05-25T19:28:09Z INFO librespot_core::session] Authenticated as "roderickvd" ! [2021-05-25T19:28:09Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0) [2021-05-25T19:28:09Z INFO librespot_playback::audio_backend::alsa] Using Alsa sink with format: S16 [2021-05-25T19:28:09Z INFO librespot_core::session] Country: "NL" [2021-05-25T19:28:09Z INFO librespot_playback::player] Loading <What Happens To Me> with Spotify URI <spotify:track:0n6Tc3UXJXneAgDWWQMO5u> [2021-05-25T19:28:10Z INFO librespot_playback::player] <What Happens To Me> (304440 ms) loaded $ cat /proc/asound/card1/pcm0p/sub0/hw_params access: RW_INTERLEAVED format: S16_LE subformat: STD channels: 2 rate: 44100 (44100/1) period_size: 5513 buffer_size: 22052 ```
Author
Owner

@roderickvd commented on GitHub (Jun 14, 2021):

Cannot reproduce and no further replies.

<!-- gh-comment-id:860566677 --> @roderickvd commented on GitHub (Jun 14, 2021): Cannot reproduce and no further replies.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#346
No description provided.