From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: snd-ioctl32 is failing on x86_64 (no crashes, just errors) Date: Mon, 10 Jan 2005 14:39:35 +0100 Message-ID: References: <20050106130649.GA253131@lion.gg3.net> <20050108074026.GA8595@lion.gg3.net> <20050110123342.GA243173@lion.gg3.net> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Mon_Jan_10_14:39:35_2005-1" Return-path: Received: from Cantor.suse.de (mail-ex.suse.de [195.135.220.2]) by alsa.alsa-project.org (ALSA's E-mail Delivery System) with ESMTP id 5CCE929B for ; Mon, 10 Jan 2005 14:39:36 +0100 (MET) In-Reply-To: <20050110123342.GA243173@lion.gg3.net> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Georgi Georgiev Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org --Multipart_Mon_Jan_10_14:39:35_2005-1 Content-Type: text/plain; charset=US-ASCII At Mon, 10 Jan 2005 21:33:42 +0900, Georgi Georgiev wrote: > > maillog: 10/01/2005-12:26:28(+0100): Takashi Iwai types > > At Sat, 8 Jan 2005 16:40:27 +0900, Georgi Georgiev wrote: > > > > It's SNDRV_CTL_IOCTL_ELEM_READ. Could you check which place returns > > -EINVAL in _snd_ioctl32_ctl_elem_value in > > alsa-kernel/core/ioctl32/ioctl32.c? > > It says: > > /* FIXME: indirect access is not supported */ > if (data->indirect) { > err = -EINVAL; > goto __end; > } > > There is another one shortly after this: > > switch (type) { > ... > default: > printk(KERN_ERR "snd_ioctl32_ctl_elem_value: unknown type %d\n", type); > err = -EINVAL; > goto __end; > } I know :) Also, the return value from snd_ctl_elem_read() can be -EINVAL. My question was which of them returns indeed in your case... > Seeing the printk I checked my logs: > > Jan 10 21:08:24 lion ioctl32(amixer:243138): Unknown cmd fd(3) cmd(c2c45512){02} arg(ffffc610) on /dev/snd/controlC0 > Jan 10 21:08:27 lion ioctl32(amixer:243139): Unknown cmd fd(3) cmd(c2c45512){02} arg(ffffc600) on /dev/snd/controlC0 > Jan 10 21:21:06 lion ioctl32(amixer:243280): Unknown cmd fd(3) cmd(c2c45512){02} arg(ffffc670) on /dev/snd/controlC0 > Jan 10 21:21:09 lion ioctl32(amixer:243281): Unknown cmd fd(3) cmd(c2c45512){02} arg(ffffc670) on /dev/snd/controlC0 > > though the error message is quite different than the printk above, it > could still be helpful. ... or, this can be the real problem. It looks the struct size doesn't match. Could you try the attached patch? > I also don't see any differences between ioctl32.c from CVS and > 1.0.8rc2. CVS version is at rev.1.26 and tagged as v1-0-8rc1. Yes. No change since then. > > > > ALSA ioctl32 in 2.6.10 or older is buggy. Try to avoid it. > > > > > > Avoid using ioctl32? I don't have much of a choice since it doesn't work > > > anyway. It would be nice to get some sound on flash pages and wine, > > > though. > > > > Yes, but the code in 2.6.10 may crash your system. > > (On x86-64, this might work, though...) > > > > > 2.6.10 or older pretty much covers every kernel out there. What kernel > > > version is it OK to test this with? > > > > The one in latest alsa-driver (alsa-kernel) tree. > > I think Linus's bk and mm trees have included already fixes. > > The most important point that I did not get -- your advice about > avoiding ioctl32 is a different point of concern, that is completely > unrelated to the current problem, is it? I wrote to avoid the one on 2.6.10 (or older) since it's broken. I did NOT mean to avoid the one on the latest ALSA tree. This should get fixed ASAP, of course. Takashi --Multipart_Mon_Jan_10_14:39:35_2005-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/core/ioctl32/ioctl32.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/ioctl32/ioctl32.c,v retrieving revision 1.30 diff -u -r1.30 ioctl32.c --- alsa-kernel/core/ioctl32/ioctl32.c 15 Dec 2004 15:26:24 -0000 1.30 +++ alsa-kernel/core/ioctl32/ioctl32.c 10 Jan 2005 13:36:49 -0000 @@ -238,7 +238,7 @@ struct sndrv_aes_iec958 iec958; } value; unsigned char reserved[128]; -}; +}_ _attribute__((packed)); /* hmm, it's so hard to retrieve the value type from the control id.. */ --Multipart_Mon_Jan_10_14:39:35_2005-1-- ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt