You are not logged in.

#1 2018-12-08 12:50:43

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

[Solved] Getting exceptions from mpd / alsa

I'm running a system-wide setup for my mpd.  For a long while everything works fine feeding my DAC with bitperfect streams. Lately however I noticed that the streams to my DSD files are not getting to my DAC properly. The sound was too muted and lost the bitperfect quality. I use Cantata as the front end and it will eventually play the DSD properly after closing and reopening Cantata a few times. Just to add, I always have sound so producing sound is not the problem.

Upon closer inspection, I check with systemctl status mpd.service and I get this:

Dec 08 12:44:49 TUF-Z270 systemd[1]: Starting Music Player Daemon...
Dec 08 12:44:49 TUF-Z270 mpd[342]: exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Dec 08 12:44:49 TUF-Z270 mpd[342]: exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Dec 08 12:44:49 TUF-Z270 mpd[342]: zeroconf: No global port, disabling zeroconf
Dec 08 12:44:49 TUF-Z270 systemd[1]: Started Music Player Daemon.

And when I play a DSD file, I get these exceptions:

Dec 08 12:44:49 TUF-Z270 systemd[1]: Starting Music Player Daemon...
Dec 08 12:44:49 TUF-Z270 mpd[342]: exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Dec 08 12:44:49 TUF-Z270 mpd[342]: exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Dec 08 12:44:49 TUF-Z270 mpd[342]: zeroconf: No global port, disabling zeroconf
Dec 08 12:44:49 TUF-Z270 systemd[1]: Started Music Player Daemon.
Dec 08 12:46:27 TUF-Z270 mpd[342]: exception: Unsupported URI scheme
Dec 08 12:46:30 TUF-Z270 mpd[342]: exception: Failed to open "C20 - USB Audio" (alsa)
Dec 08 12:46:30 TUF-Z270 mpd[342]: exception: nested: Failed to open ALSA device "hw:0,0": Device or resource busy

Here is my mpd.conf:

# See: /usr/share/doc/mpd/mpdconf.example

pid_file "/run/mpd/mpd.pid"
db_file "/var/lib/mpd/mpd.db"
state_file "/var/lib/mpd/mpdstate"
playlist_directory "/var/lib/mpd/playlists"

############################################################################
### begin of mpd configuration file
### created by `mpd-configure' (version 0.9.7) on 2018-04-28T00:49:33+01:00.
### see: https://github.com/ronalde/mpd-configure/
############################################################################

## start pulseaudio
audio_output {
       type		"pulse"
       name		"Local Music Player Daemon"
       server		"127.0.0.1"
       mixer_type   "software"
}

## done adding pulseaudio

## start processing `01_output-audio-alsa.conf'
audio_output {
        type             "alsa"
        name             "C20 - USB Audio"
        device           "hw:0,0"
        auto_resample    "no"
        auto_format      "no"
        auto_channels    "no"
        replay_gain_handler "none"
        mixer_type                 "none"
}

replaygain                 "off"
## done processing

## start processing `02_paths.conf'
music_directory                   "/home/DataPool/Music"
follow_inside_symlinks "yes"
## done processing

## start processing `03_general.conf'
filesystem_charset    "UTF-8"
#id3v1_encoding        "UTF-8"
log_level             "default"
auto_update           "yes"
auto_update_depth     "4096"
## done processing

## start processing `04_client-limits.conf'
connection_timeout     "60"
max_connections        "10"
max_playlist_length    "16384"
max_command_list_size  "2048"
max_output_buffer_size "8192"
## done processing

## start processing `05_network.conf'
bind_to_address "0.0.0.0"
## done processing

## start processing `06_zeroconf.conf'
zeroconf_enabled    "True"
## done processing

As I said, I don't have problems playing music and sound. But I'd like to fix these exceptions or at least understand what they are.

Last edited by d_fajardo (2018-12-11 09:23:24)

Offline

#2 2018-12-08 20:52:03

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 247
Website

Re: [Solved] Getting exceptions from mpd / alsa

See both the DSD & troubleshooting paragraphs here here

Last edited by cirrus (2018-12-08 21:08:26)


Registered Linux User #544546
   Time you enjoyed wasting was not wasted. --John Lennon.

Offline

#3 2018-12-08 21:03:07

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

Thanks cirrus but I'm getting a 404 Not Found on that page.

Offline

#4 2018-12-08 21:07:52

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 247
Website

Re: [Solved] Getting exceptions from mpd / alsa

maybe i messed up the [url tags  https://www.musicpd.org/doc/html/user.html    ?
Edit.  i did, fixed, sorry hmm

Last edited by cirrus (2018-12-08 21:08:55)


Registered Linux User #544546
   Time you enjoyed wasting was not wasted. --John Lennon.

Offline

#5 2018-12-08 21:31:04

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

Yes I did find it on my own. I actually don't have a problem playing DSD files. It's just annoys me a bit that when I am running a program that uses PulseAudio (YouTube, Spotify) and then change to play a DSD file with mpd, the correct bitrate doesn't kickin right away. My feeling is the PulseAudio server is hanging a bit too long. Anyway here is my asound.conf:

# Define the soundcard to use
defaults.ctl.card 0
defaults.pcm.card 0
defaults.timer.card 0


## Use PulseAudio by default
pcm.!default {
    type hw
    card 0
    slave {
        type pulse
        fallback "sysdefault"
        hint {
            show on
            description "Default ALSA Output (currently PulseAudio Sound Server)"
        }
    }
}

ctl.!default {
    type hw 
    card 0
    slave {
        type pulse
        fallback "sysdefault"
    }
}

As I am running mpd as its own user, I have to adopt the PulseAudio workaround as described here.

Offline

#6 2018-12-08 21:56:13

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 247
Website

Re: [Solved] Getting exceptions from mpd / alsa

Hi d_fajardo

Sorry I'm not well versed on DSD however this *might* help
https://thepenguin.eu/2017-12-22-mpd-and-dsd-files/


Registered Linux User #544546
   Time you enjoyed wasting was not wasted. --John Lennon.

Offline

#7 2018-12-08 22:44:04

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

It looks my last asound.conf configuration is working. Before that, I had pulse as default but now I have my DAC as default with pulse as a slave. The only issue is have is I can only play the proper mpd bitrate if there's no process running pulse. Even a paused youtube video won't enable me to play a DSD bitrate. I have to close the video first to play the DSD properly. But I can live with that.
I still get exceptions from mpd but I don't know if they do any harm. I get good sound out of my DAC.
I'll close this as solved for now and just start a new thread if I have further issues.

Last edited by d_fajardo (2018-12-08 22:46:31)

Offline

#8 2018-12-09 19:03:12

cirrus
Member
From: Glasgow Scotland
Registered: 2012-08-24
Posts: 247
Website

Re: [Solved] Getting exceptions from mpd / alsa

FWIW i get this too when launching MPD

mpd[342]: exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
mpd[342]: exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured

i assume it's harmless as i don't experience anything untoward.


Registered Linux User #544546
   Time you enjoyed wasting was not wasted. --John Lennon.

Offline

#9 2018-12-10 20:23:32

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

cirrus wrote:

FWIW i get this too when launching MPD

I managed to solve it by:

input {
    plugin      "tidal"
    enabled     "no"
}
input {
    plugin      "qobuz"
    enabled     "no"
}

And the exceptions are gone.

Last edited by d_fajardo (2018-12-10 20:38:45)

Offline

#10 2018-12-10 20:32:19

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

I have so far gotten rid of all of the exceptions by disabling the plugins and updating my asound.conf, and updating my music directory and permissions.  There is however still one lingering exception:

exception: Failed to play on "Local Music Player Daemon" (pulse): suspended
Dec 10 19:46:48 TUF-Z270 mpd[12015]: player: played "Dave Brubeck/Dave Brubeck - Time Out (DSD)/04 Three To Get Ready.dsf"
Dec 10 19:46:48 TUF-Z270 mpd[12015]: exception: Failed to play on "Local Music Player Daemon" (pulse): suspended
Dec 10 19:51:39 TUF-Z270 mpd[12015]: player: played "Dave Brubeck/Dave Brubeck - Time Out (DSD)/05 Kathy's Waltz.dsf"
Dec 10 19:51:39 TUF-Z270 mpd[12015]: exception: Failed to play on "Local Music Player Daemon" (pulse): suspended
Dec 10 19:56:04 TUF-Z270 mpd[12015]: player: played "Dave Brubeck/Dave Brubeck - Time Out (DSD)/06 Everybody's Jumpin'.dsf"
Dec 10 19:56:04 TUF-Z270 mpd[12015]: exception: Failed to play on "Local Music Player Daemon" (pulse): suspended

It is clear from here that everytime I play music via mpd pulseaudio gets suspended. Fair enough that's what I believe should happen but why is it an exception? Is this harmless and something I can ignore? Or is there something I'm still missing, a change in alsa configuration perhaps?
Everything is working as it should be. I just want to understand if this exception is normal which I can safely ignore.

Offline

#11 2018-12-10 23:35:42

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

I found the solution to the pulse exception. It was actually in Cantata. I had both my DAC and Pulseaudio checked as active outputs. I unchecked pulse and the exception disappeared.
I'm still finding an answer to the following exception though:

Dec 10 23:28:36 TUF-Z270 mpd[10250]: player: played "Eric Clapton/Eric Clapton - Slowhand (DSD)/04 - Eric Clapton - Next Time You See Her.dsf"
Dec 10 23:28:44 TUF-Z270 mpd[10250]: exception: Unsupported URI scheme
Dec 10 23:29:09 TUF-Z270 mpd[10250]: player: played "Eric Clapton/Eric Clapton - Slowhand (DSD)/04 - Eric Clapton - Next Time You See Her.dsf"
Dec 10 23:31:11 TUF-Z270 mpd[10250]: exception: Unsupported URI scheme

Again this seems to happen after playing a track. Anybody has any info what this Unsupported URI Scheme means?

Offline

#12 2018-12-11 09:23:02

d_fajardo
Member
Registered: 2017-07-28
Posts: 280

Re: [Solved] Getting exceptions from mpd / alsa

Again I've traced the source of the exception. It has something to do with the way I stop the tracks.  If I stop the tracks via the proper control, I don't get the URI exception but if I close Cantata abruptly without stopping the track, I get the unsupported URI exception. I assume because Cantata sends an unknown signal to mpd. I assume this is harmless.
I've found the answers to all the exceptions so I can close this thread.

Offline

Board footer

Powered by FluxBB