I added mgp123 to local.conf as this
CORE_IMAGE_EXTRA_INSTALL += "\
mpg123 \
alsa-lib \
alsa-plugins \
alsa-state \
alsa-utils"
LICENSE_FLAGS_WHITELIST="commercial"
But, running mpg123 shows error as below
root@imx6ull14x14evk:~# mpg123 Happy.mp3
[../../../mpg123-1.22.4/src/output/pulse.c:84] error: Failed to open pulse audio output: Connection refused
[../../mpg123-1.22.4/src/audio.c:645] error: failed to open audio device
[../../mpg123-1.22.4/src/audio.c:180] error: Unable to find a working output module in this list: pulse
[../../mpg123-1.22.4/src/audio.c:545] error: Failed to open audio output module
[../../mpg123-1.22.4/src/mpg123.c:913] error: Failed to initialize output, goodbye.
root@imx6ull14x14evk:~#
For more information, I can play a wav file using aplay (one of alsa-utils).
How can I use mpg123 ?
Solved! Go to Solution.
Self Answer.
If you want to install package mpg123, you need to install also packagegroup-fsl-pulseaudio as below.
In your bb file.
IMAGE_INSTALL += "packagegroup-fsl-pulseaudio"
By this, bitbake include pulseaudio module, not only pulseaudio lib.
Best Regards.
Mannsik.
Self Answer.
If you want to install package mpg123, you need to install also packagegroup-fsl-pulseaudio as below.
In your bb file.
IMAGE_INSTALL += "packagegroup-fsl-pulseaudio"
By this, bitbake include pulseaudio module, not only pulseaudio lib.
Best Regards.
Mannsik.
Hi Mannsik
according to http://mpg123.de/faq.shtml
one can try to test as
mpg123 -a hw:0,0 myfile.mp3
additionally one can try with gstreamer:
https://github.com/openembedded/openembedded-core/commit/7691d048ccbb1cbde5ffba7977c799a91349cb3d
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor
And, In my tryial
So I couln't try gstreamer and ffplay.
BR.
Mannsik
Hi Igor
Thank you for your reply.
But, no difference with option, you told,
$ mpg123 -a hw:0.0 myfile.mp3
I think my evk board has only one audio device.
But, with below(as common use), some BBs can play MP3.
mpg123 myfile.mp3
I tried below BBs and some of BB could play mp3 files with mpg123.
And, I didn't try fsl-image-qt5, because my evk is iMX6ULL.
I compared bb files and found that, BBs who can play mp3 has below FEATURE
IMAGE_FEATURES += hwcodecs
Is this the factor to enable play mp3?
Best Regards.
Mannsik
hwcodecs is not the factor..