I did read the bug report on moc and it looks like the same problem. But my guess is that this is not moc related, more an ALSA thing as I have problem with speaker-test:
/home/effo> speaker-test
speaker-test 1.1.7
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1099:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
/home/effo/.config/pulse>
Hmm, "unable to open slave", are we trying to use the wrong device or something like that...?
Let's look at all cards:
/home/effo> aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=HDMI,DEV=0
HDA ATI HDMI, HDMI 0
HDMI Audio Output
dmix:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct sample snooping device
hw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
HDA ATI HDMI, HDMI 0
Hardware device with all software conversions
default:CARD=Generic
HD-Audio Generic, ALC887-VD Analog
Default Audio Device
sysdefault:CARD=Generic
HD-Audio Generic, ALC887-VD Analog
Default Audio Device
front:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Front speakers
surround21:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct sample mixing device
dsnoop:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct sample snooping device
hw:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Direct hardware device without any conversions
plughw:CARD=Generic,DEV=0
HD-Audio Generic, ALC887-VD Analog
Hardware device with all software conversions
Ok, I want to use default:CARD=Generic
I'll try it with speaker-test:
/home/effo> speaker-test -Ddefault:Generic
speaker-test 1.1.7
Playback device is default:Generic
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
0 - Front Left
Time per period = 2,654912
0 - Front Left
Time per period = 2,986484
YES - sound!
I can even play music with aplay:
/home/effo> aplay --device default:CARD=Generic Muse_-_Please,_Please,_Please,_Let_Me_Get_What_I_Want.wav
Playing WAVE 'Muse_-_Please,_Please,_Please,_Let_Me_Get_What_I_Want.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
So I guess that alsa uses the wrong device as the default one. But why? And how to change that?
Did some googling and found
https://www.alsa-project.org/main/index.php/Setting_the_default_deviceSo listed my cards:
/home/effo> cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfeb44000 irq 42
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfeb40000 irq 16
Then created /etc/asound.conf and added
defaults.pcm.card 1
defaults.ctl.card 1
And now mocp and qmmp works!
But I don't like adding random config-files, this feels like a cludge
Shall I report my findings somewhere?