ionciubotaru Posted July 22, 2016 Posted July 22, 2016 I have a nanoPi M1 with armbian Jessie, fresh install with no X server I wish to play a mp3 file using mplayer, but there is no audio output. #mplayer ./3951.mp3 the output is: MPlayer2 2.0-728-g2c378c7-4+b1 © 2000-2012 MPlayer Team Cannot open file '/root/.mplayer/input.conf': No such file or directory Failed to open /root/.mplayer/input.conf. Cannot open file '/etc/mplayer/input.conf': No such file or directory Failed to open /etc/mplayer/input.conf. Failed to read LIRC config file ~/.lircrc. Playing ./3951.mp3. Detected file format: MP2/3 (MPEG audio layer 2/3) (libavformat) [mp3 @ 0xb5d9b5b8]max_analyze_duration 5000000 reached [mp3 @ 0xb5d9b5b8]Estimating duration from bitrate, this may be inaccurate [lavf] stream 0: audio (mp3), -aid 0 Load subtitles in ./ Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123] AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400) AO: [pulse] Init failed: Connection refused AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample) [AO_ALSA] Unable to find simple control 'Master',0. Video: no video Starting playback... A: 12.7 (12.6) of 216.9 (03:36.9) 3.2%
borombo Posted July 26, 2016 Posted July 26, 2016 try mplayer ./3951.mp3 -ao alsa or mplayer ./3951.mp3 -ao sdl 1
ionciubotaru Posted July 29, 2016 Author Posted July 29, 2016 Thank you for your answer, now mplayer works fine. I have another problem. I wish to play 2 instances of mplayer or vlc or mpc ( a background music as first player) and an announcement as second player. The first player plays ok, but the second return: [AO_ALSA] alsa-lib: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy [AO_ALSA] Playback open error: Device or resource busy Failed to initialize audio driver 'alsa' Could not open/initialize audio device -> no sound. Audio: no sound please help
borombo Posted July 30, 2016 Posted July 30, 2016 this is because no software mixer configured by default in Armbian. you can configure software mixer by editing /etc/asound.conf like described in article http://www.alsa-project.org/main/index.php/Asoundrc#Software_mixing. Or easiest way is to install pulseaudio and pavucontrol which are configured by default.
ionciubotaru Posted July 30, 2016 Author Posted July 30, 2016 Thank you borombo, I configured alsa mixer and now I can play multiple mplayer audio instances. Please be so kind and help me again: I can't play video on hdmi because output is in text mode (I can see only few big square pixels). If I start X everything works fine, but I like to play a mp4 file without install X.
Johhny Blue Posted August 1, 2016 Posted August 1, 2016 Hi. I have been trying to get sound out of the 3.5mm jack on my M1 but have had no luck. It appears in aplay -l and I can get sound from a USB sound card if plugged in. I tried the suggestion above, but still no sound. I have amplified speakers plugged into the 3.5mm socket. Does anyone have it working like this and if so, can you please share how you got it working. Thanks.
Johhny Blue Posted August 1, 2016 Posted August 1, 2016 Further information following my earlier post - I just downloaded the Debian image from the FriendlyArm link https://www.mediafire.com/folder/3q2911p1qp33p/NanoPi-M1Board#dc73df73c6dk6 And the 3.5mm audio out work fine. Is this something that I can change on the armbian version or is it much more complicated? Thanks for all your work. JB
multivac61 Posted August 13, 2016 Posted August 13, 2016 A repost from here I have located a problem. When I went into alsamixer I noticed that a parameter called "Audio lineout" was set to false. In the TUI I was not able to changed the parameter but I was able to save the state in a file by using alsactl --file ~/.config/asound.state store. In the .state file I manually changed the "Audio lineout" parameter to true and reloaded the alsamixer with the `alsactl --file ~/.config/asound.state restore command. Now speaker-test -D sysdefault:CARD=audiocodec -twav -c2 plays perfectly. You should be able to solve this issue by storing different default settings for ALSA.
Recommended Posts