Red Hat Bugzilla – Bug 247865
mikmod doesnt seem to support sound output
Last modified: 2013-07-02 19:21:30 EDT
Description of problem:
Well, it does look like the mikmod in f7
is built without a support for any audio
output at all.
$ ldd /usr/bin/mikmod
libmikmod.so.2 => /usr/lib64/libmikmod.so.2 (0x00002aaaaacc6000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaaaf10000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00002aaaab114000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaab334000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaab54e000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00002aaaab89e000)
$ ldd /usr/lib64/libmikmod.so.2
libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaaad1b000)
libc.so.6 => /lib64/libc.so.6 (0x00002aaaaaf1f000)
No signs of libasound, libesd or whatever.
In a config menu of the mikmod GUI, there is
nothing but a disk writer output.
mikmod -d num doesn't seem to help either.
Am I missing something, or is it really that
it was built without any sound support at all?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. play something with mikmod
2. listen to the silence
Silence, disk writing (wav) at best.
mikmod and libmikmod doesn't have a direct dependencies to sound libraries
because mikmod dlopen()s available sound library (libasound, libgus, etc.) in
runtime automatically when the Configuration/Output Options/Driver is set to
Autodetect. Are you sure you have alsa-libs-devel or esound-devel installed?
Do you really mean I need the -devel packages
to only play the music?
$ rpm -q alsa-lib-devel
$ rpm -q esound-devel
I'll attach the strace log.
There are no signs of loading either libasound
or libesd. It seems to only try /dev/dsp and
Created attachment 159091 [details]
Ok, things are a bit clearer now. I assumed there are symbolic links to main
libraries missing while you used esd or alsa driver, because drv_alsa, drv_esd,
etc. tries to dlopen the libesd.so or libasound.so directly which are missing
without the -devel packages installed.
Yes, mikmod tries to open dsp devices and write to them directly. From the
strace output it looks like the /dev/dsp is already used by another process what
prevents mikmod to write in there:
4411 open("/dev/dsp", O_WRONLY) = -1 EBUSY (Device or resource busy)
In my case mikmod successfully opens /dev/dsp and plays:
open("/dev/dsp", O_WRONLY) = 4
Suggest to lsof | grep '/dev/dsp' to figure out what blocks the playback via dsp
on your side.
No deal. :)
Yes, I've noticed the EBUSY myself, but I don't
care since this is an alsa OSS emulation. I am not
interested in using an OSS emulation. The previous
versions of mikmod (in fc6 etc) used ESD or alsa
(with dmix), which are never busy and involve a
How can I get these to work? Getting it to work via
an OSS is not an intention.
By the way:
$ lsof | grep '/dev/dsp'
$ echo >/dev/dsp
bash: /dev/dsp: Device or resource busy
$ cat /dev/dsp
$ lsmod |grep snd_pcm_oss
snd_pcm_oss 53217 0
snd_mixer_oss 25537 3 snd_pcm_oss
snd_pcm 93129 4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd 71785 13
1. No process is hogging on /dev/dsp.
2. /dev/dsp is busy for writing.
3. /dev/dsp is _available_ for reading!
4. The usage count of /dev/dsp is 0, so the
device is unused.
This all is very suspecious. It looks like the
OSS emulation in F7 is broken itself and permits
only a recording, but not a playback.
This probably deserves another bug report, but
all the apps that use alsa or ESD, do not have
any problems. The OSS apps seem to no longer work,
but the only OSS app I can think of, is that broken
So the question still stays: why does the mikmod
no longer supports an alsa and ESD?
Sorry. I kinda forgot that the OSS emulation
doesn't work if someone uses the alsa sound
device. And that someone appeared to be esd.
So if I do "killall esd" then mikmod appears
This is no go of course.
Short self intro: I'm a co-mainter of mikmod and libmikmod.
As such I've been looking at fixing this bug, long story short, I succeeded
except that alsa is not supported (but esd now works again, and so does
pulseaudio which is the future of desktop sound on Fedora):
* Mon Feb 18 2008 Hans de Goede <email@example.com> 3.2.2-5
- Add BuildRequires esound-devel, so that the esd output driver gets build
- Replace completely braindead (hint to author, drink coffee first, then code)
esd non blocking patch with one that actually works. This fixes using mikmod
with pulseaudio (bz 247865)
- Note: this makes the 2 supported output devices oss and esd (and pulseaudio's
esd emulation) alsa is not supported, this requires a rewrite of the mikmod
alsa code which was written for alsa-0.5 and never updated for the new alsa
About alsa, fixing this requires a rewrite of the alsa output driver in mikmod,
which given how we are moving to pulseaudio, is a wontfix thing atm.
3.2.2-5 which fixes esd output is on its way to F-7 updates-testing, our updates
system will add a note here once it hits the repo including instructions howto
install this update from the updates-testing repository, please test this update
when available and let us know if it fixes things for you.
> - Replace completely braindead (hint to author, drink coffee first, then code)
Sorry, I am not a mikmod/esd developer and have
no idea about its internals. The patch was clearly
marked as a workaround:
I have made a simple patch that fixes a problem for me, maybe this
I'll attach it now.
Created an attachment
simple patch to work around the problem
and was intended mainly to show the problematic place.
I don't know how could the one mark the patch more
prominently to point that it was just a workaround,
not a real fix.
And it was there for 7 years already, I've completely
forgot it ever existed, and there was no one preventing
you from reviewing/rewriting it all these years long.
Thanks for fixing the problem though.
mikmod-3.2.2-6.fc7 has been submitted as an update for Fedora 7
mikmod-3.2.2-6.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update mikmod'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F7/FEDORA-2008-1871
mikmod-3.2.2-6.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.