MOC 2.6: No valid sound driver!

I recently updated MOC, and now it won't start

# mocp Running the server... Trying ALSA... FATAL_ERROR: No valid sound driver! FATAL_ERROR: Server exited! # mocp -V This is : Music On Console Version : 2.6-alpha3 Revision : Unversioned directory Built : Nov 29 2016 12:47:45 Compiled with : ALSA Running on : Linux 4.8.7-gentoo x86_64 Author : Damian Pietras Homepage : http://moc.daper.net/ E-Mail : mocmaint@daper.net Copyright : (C) 2003-2016 Damian Pietras and others License : GNU General Public License, version 2 or later

Things to note: alsamixer works, other applications with sound, like mplayer work, i do not have pulseaudio, i tried recompiling MOC, I tried deleting .moc from my home folder

Forums:

You might try to start MOC via "mocp -SF" to see some additional error messages or even re-emerge it with USE=debug to enable debug mode (mocp -D). You might also check your .asoundrc file (and related to this AlsaDevice in .moc/config).

# mocp -D Loading plugins from /usr/lib64/moc/decoder_plugins... Loading plugin libaac_decoder... OK Loading plugin libflac_decoder... OK Loading plugin libmp3_decoder... OK Loading plugin libvorbis_decoder... OK Running the server... Trying ALSA... FATAL_ERROR: No valid sound driver! FATAL_ERROR: Server exited! # mocp -SF Nov 29 17:39:55.659265: main.c:1187 main(): This is Music On Console (revision Unversioned directory) Nov 29 17:39:55.659311: main.c:1193 main(): Configured: '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--disable-dependency-tracking' '--htmldir=/usr/share/doc/moc-2.6_alpha3/html' '--libdir=/usr/lib64' '--docdir=/usr/share/doc/moc-2.6_alpha3' '--without-rcc' '--enable-debug' '--enable-cache' '--without-oss' '--with-alsa' '--without-jack' '--with-magic' '--with-ncursesw' '--without-samplerate' '--with-aac' '--without-ffmpeg' '--with-flac' '--without-modplug' '--with-mp3' '--without-musepack' '--without-sidplay2' '--without-sndfile' '--without-speex' '--without-timidity' '--with-vorbis' '--without-wavpack' '--without-curl' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=native -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CXXFLAGS=-march=native -O2 -pipe' Nov 29 17:39:55.659321: main.c:1203 main(): Running on: Linux 4.8.7-gentoo x86_64 Nov 29 17:39:55.659481: main.c:1155 log_command_line(): mocp -SF Nov 29 17:39:55.659528: main.c:1169 log_popt_command_line(): mocp --server --foreground Nov 29 17:39:55.659574: options.c:1041 options_parse(): Can't open config file: No such file or directory Nov 29 17:39:55.660213: decoder.c:703 load_plugins(): Loaded 4 decoders: aac flac mp3 vorbis Nov 29 17:39:55.660236: server.c:329 server_init(): Starting MOC Server Nov 29 17:39:55.660304: log.c:233 log_init_stream(): Writing log to: stdout Nov 29 17:39:55.660372: server.c:300 log_process_stack_size(): Process's stack size: 8388608 Nov 29 17:39:55.660380: server.c:317 log_pthread_stack_size(): PThread's stack size: 8388608 Trying ALSA... Nov 29 17:39:55.660396: alsa.c:477 alsa_init(): Initialising ALSA device: default Nov 29 17:39:55.664286: alsa.c:365 alsa_init_mixer_channel(): ERROR: Can't find mixer PCM Nov 29 17:39:55.664297: server.c:667 add_event_all(): No events have been added because there are no clients Nov 29 17:39:55.664315: alsa.c:365 alsa_init_mixer_channel(): ERROR: Can't find mixer Master Nov 29 17:39:55.664322: server.c:667 add_event_all(): No events have been added because there are no clients FATAL_ERROR: No valid sound driver! Nov 29 17:39:55.664345: audio.c:926 find_working_driver(): FATAL ERROR: No valid sound driver! # amixer Simple mixer control 'Headphone',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 255 Mono: Front Left: Playback 224 [88%] [-15.26dB] [on] Front Right: Playback 224 [88%] [-15.26dB] [on] Simple mixer control 'Front Mic',0 Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Front Left - Front Right Limits: Capture -24 - 24 Front Left: Capture -24 [0%] [-12.00dB] [off] Front Right: Capture -24 [0%] [-12.00dB] [off] Simple mixer control 'Line',0 Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Front Left - Front Right Limits: Capture -24 - 24 Front Left: Capture -24 [0%] [-12.00dB] [off] Front Right: Capture -24 [0%] [-12.00dB] [off] Simple mixer control 'Mic',0 Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Front Left - Front Right Limits: Capture -24 - 24 Front Left: Capture 24 [100%] [12.00dB] [on] Front Right: Capture 24 [100%] [12.00dB] [on] Simple mixer control 'IEC958',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [off] Simple mixer control 'IEC958 Loopback',0 Capabilities: pswitch pswitch-joined Playback channels: Mono Mono: Playback [on] Simple mixer control 'IEC958 Validity Check',0 Capabilities: cswitch cswitch-joined Capture channels: Mono Mono: Capture [off] Simple mixer control 'Aux',0 Capabilities: cvolume cswitch cswitch-joined cswitch-exclusive Capture exclusive group: 0 Capture channels: Front Left - Front Right Limits: Capture -24 - 24 Front Left: Capture -24 [0%] [-12.00dB] [off] Front Right: Capture -24 [0%] [-12.00dB] [off] Simple mixer control 'ADC High-pass Filter',0 Capabilities: cenum Items: 'Active' 'Frozen' Item0: 'Active' Simple mixer control 'Analog Input Monitor',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 1 Mono: Playback 1 [100%] [0.00dB] [on] Simple mixer control 'Analog Output',0 Capabilities: penum Items: 'Stereo Headphones' 'Stereo Headphones FP' 'Multichannel' Item0: 'Stereo Headphones' Simple mixer control 'Digital Input Monitor',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined Playback channels: Mono Limits: Playback 0 - 1 Mono: Playback 1 [100%] [0.00dB] [on] Simple mixer control 'Stereo Upmixing',0 Capabilities: enum Items: 'Front' 'Front+Surround' Item0: 'Front+Surround'

My card doesn't have a mixer labeled PCM, previous versions of MOC did not seem to care.

If I'm not mistaken, lack of mixers shouldn't be a problem. Seems the problem happens in fill_capabilities function, but I am puzzled why there is no detailed error message. When you run "mocp -D" you should afterwards check the log file "mocp_server_log", maybe something more is there.

You will need to set the MOC ALSAMixer1 and/or ALSAMixer2 configuration options to match your system's available mixers. You can try this out using the -O command line option on mocp to set them temporarily (see the manpage for details).

ALSAMixer1=Headphone

in the config was exactly what i needed

Hi jcf,

I also stumbled upon the new requirement that a mixer seems to be required now (since r2896).
See also my bugreport on the Debian bug tracker: https://bugs.debian.org/848577
I'm using bluealsa (https://github.com/Arkq/bluez-alsa), which allows using Bluetooth speakers with Alsa.
But in this case there is no mixer available. The volume is controlled on the hardware devices itself.

Can you please relax the mixer requirement again? Because now moc refuses to start, while it was still working fine until r2895.

Thanks!

Just found out that there is indeed a mixer available, but only after pairing with the device.
I'm using this mixer now, and moc is starting.

But I think it would be more comfortable to also allow not having a mixer set (if you don't want to control it with moc), so that you don't have to change the mixer names for different devices that you connect to.