From: James Pearson <james-p@moving-picture.com>
To: alsa-devel@alsa-project.org
Subject: Problems with 32 bit apps on 64 bit OS using dmix and snd-ioctl32
Date: Wed, 05 Sep 2007 12:10:40 +0100 [thread overview]
Message-ID: <46DE8EB0.90208@moving-picture.com> (raw)
I've already sent this to the alsa-user list, but may be this a better
place to ask:
I have a problem using 32 bit (i386) playback applications on a 64 bit
(x86_64) CentOS4/RHEL4 based kernel (based on kernel 2.6.9).
I've installed alsa-driver, alsa-lib and alsa-utils 1.0.13 (newer
versions of alsa-driver don't build with this kernel)
If I try to run a 32 bit copy of aplay on a 64 bit machine that doesn't
support hardware mixing (e.g. HDA NVidia) - i.e. uses dmix by default, I
get:
aplay: pcm_write:1268: write error: Invalid argument
and /var/log/messages reports:
Sep 4 16:45:37 wstemp-b kernel: ioctl32(aplay:28133): Unknown cmd fd(3)
cmd(40045402){00} arg(ffffae88) on /dev/snd/timer
Sep 4 16:45:37 wstemp-b kernel: ioctl32(aplay:28133): Unknown cmd fd(5)
cmd(c008551a){00} arg(080678a0) on /dev/snd/controlC0
Sep 4 16:45:37 wstemp-b kernel: ioctl32(aplay:28133): Unknown cmd fd(5)
cmd(c008551b){00} arg(080678a0) on /dev/snd/controlC0
Sep 4 16:45:37 wstemp-b kernel: ioctl32(aplay:28133): Unknown cmd fd(3)
cmd(000054a0){00} arg(00000320) on /dev/snd/timer
I've done some searching to find a solution - and found out that in more
recent kernels, snd-ioctl32 has been obsoleted - and if I do use a more
modern kernel, then using a 32 bit version of aplay works OK on a newer
64 bit kernel.
However, for other (not sound related) reasons, I need to run the
RHEL4/CentOS4 2.6.9 kernel ...
I had a look at the alsa-driver code, and acore/ioctl32/timer32_new.c
contains:
#if 0
/* ** FIXME **
* The following four entries are disabled because they conflict
* with the TCOC* definitions.
* Unfortunately, the current ioctl32 wrapper uses a single
* hash table for all devices. Once when the wrapper is fixed
* with the table based on devices, they'll be back again.
*/
MAP_COMPAT(SNDRV_TIMER_IOCTL_START),
MAP_COMPAT(SNDRV_TIMER_IOCTL_STOP),
MAP_COMPAT(SNDRV_TIMER_IOCTL_CONTINUE),
MAP_COMPAT(SNDRV_TIMER_IOCTL_PAUSE),
#endif
If I change the '#if 0' to '#if 1', recompile and reload with this new
snd-ioctl32 module, then the 32 bit aplay works without an error ...
although /var/log/messages still reports:
Sep 4 17:05:26 wstemp-b kernel: ioctl32(aplay:28926): Unknown cmd fd(3)
cmd(40045402){00} arg(ffffadb8) on /dev/snd/timer
Sep 4 17:05:26 wstemp-b kernel: ioctl32(aplay:28926): Unknown cmd fd(5)
cmd(c008551a){00} arg(080678a0) on /dev/snd/controlC0
Sep 4 17:05:26 wstemp-b kernel: ioctl32(aplay:28926): Unknown cmd fd(5)
cmd(c008551b){00} arg(080678a0) on /dev/snd/controlC0
... but at least I get sound out!
So, what is the danger of using these 'disabled' ioctls?
I can't find any reference to 'TCOC* definitions' - what are these ???
Thanks
James Pearson
next reply other threads:[~2007-09-05 11:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-05 11:10 James Pearson [this message]
2007-09-05 12:51 ` Problems with 32 bit apps on 64 bit OS using dmix and snd-ioctl32 Takashi Iwai
2007-09-05 14:38 ` James Pearson
2007-09-05 15:23 ` Takashi Iwai
2007-09-05 15:36 ` James Pearson
2007-09-05 16:11 ` Takashi Iwai
2007-09-05 16:54 ` James Pearson
2007-09-05 17:11 ` Takashi Iwai
2007-09-06 10:26 ` James Pearson
2007-09-06 10:51 ` Takashi Iwai
2007-09-06 11:56 ` James Pearson
2007-09-06 12:08 ` Takashi Iwai
2007-09-06 12:15 ` James Pearson
2007-09-06 13:06 ` Takashi Iwai
2007-09-11 21:56 ` James Pearson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46DE8EB0.90208@moving-picture.com \
--to=james-p@moving-picture.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.