[alsa-devel] Problems with 32 bit apps on 64 bit OS using dmix and snd-ioctl32

Takashi Iwai tiwai at suse.de
Thu Sep 6 12:51:42 CEST 2007

At Thu, 06 Sep 2007 11:26:35 +0100,
James Pearson wrote:
> Takashi Iwai wrote:
> > Hm, maybe it's better to specify 2.6.16 or so for SND_SOC in
> > alsa-driver/kconfig-vers.  Could you check whether it works?
> Yes, this works - after I figured out that I needed to regenerate the 
> configure script after changing kconfig-vers ...
> alsa-driver 1.0.15rc1 now builds OK on RHEL4/CentOS4 (with a patched 
> misc/ac97_bus.c and SND_SOC set to 2.6.16 in kconfig-vers)

Thanks for confirmation.  I'll fix this on HG tree later.

> >>However, with these 1.0.15rc1 modules installed, and using 
> >>alsa-lib-1.0.15rc1, I get exactly the same problem with 32 bit apps:
> >>
> >>Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
> >>aplay: pcm_write:1268: write error: Invalid argument
> >>
> >>amd dmesg has:
> >>
> >>ioctl32(aplay:6228): Unknown cmd fd(3) cmd(40045402){00} arg(ffffac98) 
> >>on /dev/snd/timer
> >>ioctl32(aplay:6228): Unknown cmd fd(5) cmd(c008551a){00} arg(0806ccd0) 
> >>on /dev/snd/controlC0
> >>ioctl32(aplay:6228): Unknown cmd fd(5) cmd(c008551b){00} arg(0806ccd0) 
> >>on /dev/snd/controlC0
> >>ioctl32(aplay:6228): Unknown cmd fd(3) cmd(000054a0){00} arg(00000325) 
> >>on /dev/snd/timer
> > 
> > 
> > Do you use the latest alsa-lib, too?
> > The old alsa-lib tries only the old ioctl, of course...
> Yes, I've installed the 32 bit and 64 bit alsa-lib-1.0.15rc1 packages - 
> and I still get the above errors ...
> Do I need to build alsa-lib with any special options? I configured 
> alsa-lib using:
>   configure --enable-static=yes --datadir=/etc
> As this is how the 1.0.6 alsa-lib RHEL4 RPM was configured.

You shouldn't use --enable-static for the dynamic library.
Yes, usually it's OK, but alsa-lib has some special handling for
static binding, so it cannot be built with dynamic lib together.

Thus, for 64bit version,

	% ./configure --datadir=/etc --libdir=/usr/lib64

for 32bit version,

	% ./configure --datadir=/etc

And make sure that all sound apps are killed once (otherwise the old
configured dmix instance may remain undead and conflict with the new

> Does building alsa-lib depend on the alsa-driver version installed? - as 
> I built the 32 bit version on a 'stock' CentOS4/RHEL4 install that 
> didn't have the alsa-driver 1.0.15rc1 installed - would this make a 
> difference?

alsa-lib has backward compatibility, so it should work with the older
drivers.  The kernel ABI is usually kept, but some exceptional cases
like this timer ioctl changes can be supported only by the newer
alsa-lib.  But, in principle, it's safer to update both alsa-driver
and alsa-lib.

Also, it's recommended to keep the same version for both 32 and 64bit
alsa-lib, too, especially about dmix stuff.


More information about the Alsa-devel mailing list