You are not logged in.

#1 2019-11-30 08:27:23

mokman
Member
Registered: 2015-10-27
Posts: 21

[SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Edit: solved, it was an error with mpd crashing when a alsa null output was defined.

Changelog:
ver 0.21.18 (2019/12/24)
* output
  - alsa: fix hang bug with ALSA "null" outputs


I am trying to setup multiroom audio without resampling and slimstreamer looks great. it does work when using aplay, but mpd is not able to detect the default alsa output.
any clues about it?

/etc/asound.conf:

# Define SlimPlexor plugin
pcm.slimplexor {
  type slimplexor
}

# Define 'plug' plugin which might be used as a fallback (optional)
pcm.plug {
  type plug
  slave {
    pcm "hw:0,0"
  }
}

# Following lines define SlimPlexor as a default device
pcm.!default {
  type slimplexor
}

# Following lines are a backup for regular default device (can be used to disable SlimPlexor)
#pcm.!default {
#  type hw
#  card 0
#}

#ctl.!default {
#  type hw
#  card 0
#}

~/.config/mpd/mpd.conf

db_file            "~/.config/mpd/database"
log_file           "~/.config/mpd/log"
music_directory    "~/.config/mpd/music"
user		   "mok"

audio_output {
        type          "alsa"
        name          "slimstreamer"
}

mpd log output:

Nov 30 09:16 : client: [2] opened from 192.168.1.14:39000
Nov 30 09:16 : client: [3] opened from 192.168.1.14:39002
Nov 30 09:16 : exception: Unsupported URI scheme
Nov 30 09:16 : exception: Stored playlists are disabled
Nov 30 09:16 : exception: Stored playlists are disabled
Nov 30 09:16 : exception: No such playlist
Nov 30 09:16 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Nov 30 09:16 : exception: Failed to open mixer for 'default detected output': failed to attach to default: No such file or directory

Last edited by mokman (2020-01-07 08:11:20)

Offline

#2 2019-11-30 13:44:21

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Have you tried adding a device option ?

see https://wiki.archlinux.org/index.php/Mu … figuration


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-11-30 14:13:53

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Thanks for your answer. No, didn't try device option since I would not know what to put in. Slimstreamer requires 4 loopback devices, see here: https://github.com/gimesketvirtadieni/s … /README.md

Last edited by mokman (2019-11-30 14:14:36)

Offline

#4 2019-11-30 14:37:01

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Looks like all we'd need is device details of the slimplexor plugin.

post

aplay --list-pcm

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2019-11-30 14:41:18

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Your default definition overrides, and prevents the default PCM from being listed for applications that rely on relevant listing functionality, (

aplay -L

won't list it either)  extend your pcm.!default override with

pcm.!default {
type slimplexor
hint {
    show on
    description "Default ALSA Output (SimPlexor)"
  }
}

Last edited by V1del (2019-11-30 14:42:02)

Offline

#6 2019-11-30 20:37:11

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

thanks, i added the hint lines to /etc/asound.conf. Now MPD does find the default alsa device, but it continues to crash after 4sec of a played song. log does not output anything about it. the clients i tried for controlling are cantata and MALP on android.

Offline

#7 2019-11-30 21:04:29

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Slimstreamer requires 4 loopback devices

Check if loopback module is loaded: sudo lsmod |grep snd_aloop

Offline

#8 2019-11-30 22:11:04

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

snd_aloop              28672  0
snd_pcm               135168  1 snd_aloop
snd                   110592  3 snd_timer,snd_aloop,snd_pcm

Streaming data from aplay is working, so it is loaded?

Offline

#9 2019-12-02 09:44:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

What crashes? Check your journal/mpd log. Can you play the exact same file with any other client (i.e. not MPD and not MPD clients since that will expectedly have the same outcome)?

Offline

#10 2019-12-03 08:34:45

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

mpd.log:

Dec 03 09:11 : exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Dec 03 09:11 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Dec 03 09:11 : exception: Failed to open mixer for 'default detected output': failed to attach to default: No such file or directory
Dec 03 09:11 : client: [0] opened from 192.168.1.156:55340
Dec 03 09:11 : client: [1] opened from 192.168.1.156:55342
Dec 03 09:11 : exception: Unsupported URI scheme
Dec 03 09:11 : exception: Stored playlists are disabled
Dec 03 09:11 : exception: Stored playlists are disabled
Dec 03 09:11 : exception: No such playlist

yes, the flac file is fine. on the headless system where i try to get mpd running and streaming is no other software installed, aplay plays the decoded wav file from the same flac fine.

Offline

#11 2019-12-03 15:35:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

How are you actually trying to play the file? Did you populate the MPD database and properly play it back from an MPD context or are you trying a (http) url via direct playback?

Offline

#12 2019-12-04 09:38:05

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

V1del wrote:

... Did you populate the MPD database and properly play it back from an MPD context ...

this.
there's just one album for testing in the database and i try to play it via mpc. however it stays on the first second of every track i try to play:

mok@server ~ $ mpc -v
2Pac - So Many Tears
[playing] #1/16   0:01/3:59 (0%)

when i try to clear the playlist it gives me timeout error:

mpc clear
MPD error: Timeout

::EDIT::

i just started fresh with a new installation of mpd and this is my complete log output:

 mok@server ~ $ systemctl status mpd.service 
● mpd.service - Music Player Daemon
     Loaded: loaded (/usr/lib/systemd/system/mpd.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2019-12-04 23:02:16 CET; 3min 26s ago
       Docs: man:mpd(1)
             man:mpd.conf(5)
   Main PID: 4358 (mpd)
      Tasks: 6 (limit: 9202)
     Memory: 15.1M
     CGroup: /system.slice/mpd.service
             └─4358 /usr/bin/mpd --no-daemon

Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : exception: bind to '0.0.0.0:6600' failed (continuing anyway, because b>
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : exception: Decoder plugin 'wildmidi' is unavailable: configuration fil>
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : exception: Failed to open '/home/mok/.config/mpd/database': No such fi>
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : output: No 'audio_output' defined in config file
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : output: Attempt to detect audio output device
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : output: Attempting to detect a alsa audio device
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : output: Successfully detected a alsa audio device
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : exception: Input plugin 'tidal' is unavailable: No Tidal application t>
Dez 04 23:02:16 server mpd[4358]: Dec 04 23:02 : exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id config>
Dez 04 23:02:16 server systemd[1]: Started Music Player Daemon.
~/.config/mpd/log
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/01. Intro.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/02. If I Die 2Nite.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/03. Me Against the World.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/04. So Many Tears.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/05. Temptations.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/06. Young Niggaz.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/07. Heavy in the Game.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/08. Lord Knows.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/09. Dear Mama.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/10. It Ain’t Easy.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/11. Can U Get Away.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/12. Old School.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/13. Fuck the World.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/14. Death Around the Corner.flac
Dec 04 23:02 : update: added 2Pac - Me Against the World (1995) [CD FLAC] Interscope Records 92399-2/15. Outlaw.flac
Dec 04 23:02 : client: [0] opened from 127.0.0.1:52012
Dec 04 23:02 : client: [0] closed
Dec 04 23:03 : client: [1] opened from 127.0.0.1:52014
Dec 04 23:03 : exception: Failed to read mixer for 'default detected output': failed to attach to default: No such file or directory
Dec 04 23:03 : client: [1] closed
Dec 04 23:03 : client: [2] opened from 127.0.0.1:52016
Dec 04 23:03 : client: [2] closed
Dec 04 23:03 : client: [3] opened from 127.0.0.1:52018
Dec 04 23:03 : exception: Stored playlists are disabled
Dec 04 23:03 : client: [3] closed
Dec 04 23:03 : client: [4] opened from 127.0.0.1:52020
Dec 04 23:03 : exception: Stored playlists are disabled
Dec 04 23:03 : client: [4] closed
Dec 04 23:03 : client: [5] opened from 127.0.0.1:52022
Dec 04 23:03 : client: [5] closed
Dec 04 23:04 : client: [6] opened from 127.0.0.1:52024
Dec 04 23:04 : client: [6] closed
Dec 04 23:04 : client: [7] opened from 127.0.0.1:52026
Dec 04 23:04 : exception: Failed to open mixer for 'default detected output': failed to attach to default: No such file or directory
Dec 04 23:04 : client: [7] closed
Dec 04 23:04 : client: [8] opened from 127.0.0.1:52028
Dec 04 23:04 : client: [8] closed
Dec 04 23:04 : client: [9] opened from 127.0.0.1:52030
Dec 04 23:04 : client: [9] closed
Dec 04 23:04 : client: [10] opened from 127.0.0.1:52032
Dec 04 23:04 : client: [10] closed
Dec 04 23:04 : client: [11] opened from 127.0.0.1:52034
Dec 04 23:04 : client: [11] closed
Dec 04 23:04 : client: [12] opened from 127.0.0.1:52036
Dec 04 23:04 : client: [12] closed
Dec 04 23:04 : client: [13] opened from 127.0.0.1:52038
Dec 04 23:04 : client: [13] closed

aplay still working fine. what issue could mpd have with this alsa/slimplexor/slimstreamer setup?

Last edited by mokman (2019-12-04 22:13:49)

Offline

#13 2019-12-07 20:11:40

gimesketvirtadieni
Member
Registered: 2019-12-07
Posts: 1

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

Hi

Author of SlimStreamer is here smile It is great to find out that someone finds SlimStreamer useful smile
I think I was able to reproduce this problem, so I will be able to troubleshoot and let you know about the outcomes.
Any feedback is much appreciated wink

Offline

#14 2019-12-08 16:09:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,415

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

@gimesketvirtadieni

You seem to have accidentally posted this into a wrong topic, I've merged it into the correct one, always nice to see/hear from upstreams

Offline

#15 2019-12-13 23:44:01

mokman
Member
Registered: 2015-10-27
Posts: 21

Re: [SOLVED] Slimstreamer & MPD - MPD can't find default alsa output.

so, i still don't know what is wrong with my mpd setup. slimstreamer works great, but mpd won't play anything.
here is the outcome of mpd --no-daemon --stdout --verbose

config_file: loading file /home/mok/.config/mpd/mpd.conf
exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.6
opus: libopus 1.3.1
sndfile: libsndfile-1.0.28
hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
exception: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
simple_db: reading DB
exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
curl: version 7.67.0
curl: with OpenSSL/1.1.1d
avahi: Initializing interface
exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Client changed to state 101
avahi: Client is CONNECTING

Offline

Board footer

Powered by FluxBB