All of lore.kernel.org
 help / color / mirror / Atom feed
* Problems with 32 bit apps on 64 bit OS using dmix and snd-ioctl32
@ 2007-09-05 11:10 James Pearson
  2007-09-05 12:51 ` Takashi Iwai
  0 siblings, 1 reply; 15+ messages in thread
From: James Pearson @ 2007-09-05 11:10 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-09-11 21:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-05 11:10 Problems with 32 bit apps on 64 bit OS using dmix and snd-ioctl32 James Pearson
2007-09-05 12:51 ` 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

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.