My environment has two audio output: HDMI and Bluetooth speaker. Usually both of them work correctly. For example,
#this plays sound via bluetooth speaker
$ aplay -D default jingle.wav
#this plays sound via HDMI
$ aplay -D plughw:1,7 jingle.wav
However,
mpc play
doesn't play any sound. My /etc/mpd.conf
is a default one except for the music directory. So
music_directory "smb://xxx.xxx.xx.x/some_directory"
...
audio_output {
type "alsa"
name "My ALSA Device"
# device "hw:0,0" # optional
# mixer_type "hardware" # optional
# mixer_device "default" # optional
# mixer_control "PCM" # optional
# mixer_index "0" # optional
}
I use a remote music directory (smb
protocol) and the connection is ok. According to man mpd.conf
, the default value of device
field is "default"
. But mpc play
plays no sound though I expect it plays via the bluetooth speaker as the aplay -D default
command above. sudo mpd --no-daemon --stderr
says
exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
avahi: Service 'Music Player' successfully established.
client: opened from xxx.x.x.x:xxxxx
No protocol specified
xcb_connection_has_error() returned true
No protocol specified
No protocol specified
xcb_connection_has_error() returned true
exception: Failed to read mixer for 'My ALSA Device': no such mixer control: PCM
The last line may be the cause, so I set the mixer_type
field as "none"
. But still no sound. mpc play
successes and the current position (e.g. 00:56/3:20 (58%)
) progresses but no sound.
How can I use my bluetooth speaker? If I set device
to plughw:1,7
, mpc play
actually plays sound via HDMI as the aplay
command above. However, I would like to use the bluetooth speaker.
Environment:
$ lsb_relase -d
Description: Linux Mint 19 Tara
$ mpd --version
Music Player Daemon 0.20.18
I installed mpd
via sudo apt install mpd
.
Asked by ynn
(998 rep)
May 8, 2019, 02:27 PM
Last activity: May 9, 2019, 03:13 AM
Last activity: May 9, 2019, 03:13 AM