From: Takashi Iwai <tiwai@suse.de>
To: Georgi Georgiev <chutz@gg3.net>
Cc: alsa-devel@alsa-project.org
Subject: Re: snd-ioctl32 is failing on x86_64 (no crashes, just errors)
Date: Mon, 10 Jan 2005 14:39:35 +0100 [thread overview]
Message-ID: <s5hwtultnc8.wl@alsa2.suse.de> (raw)
In-Reply-To: <20050110123342.GA243173@lion.gg3.net>
[-- Attachment #1: Type: text/plain, Size: 2778 bytes --]
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
[-- Attachment #2: Type: text/plain, Size: 586 bytes --]
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.. */
next prev parent reply other threads:[~2005-01-10 13:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-06 13:06 snd-ioctl32 is failing on x86_64 (no crashes, just errors) Georgi Georgiev
2005-01-07 10:45 ` Takashi Iwai
2005-01-08 7:40 ` Georgi Georgiev
2005-01-10 11:26 ` Takashi Iwai
2005-01-10 12:33 ` Georgi Georgiev
2005-01-10 13:39 ` Takashi Iwai [this message]
2005-01-10 16:15 ` Georgi Georgiev
2005-01-11 13:11 ` Takashi Iwai
2005-01-12 2:24 ` Georgi Georgiev
2005-01-12 11:20 ` Takashi Iwai
2005-01-14 6:13 ` Juergen Kreileder
2005-01-14 10:26 ` Takashi Iwai
2005-01-14 10:59 ` Juergen Kreileder
2005-01-14 11:01 ` Takashi Iwai
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=s5hwtultnc8.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=chutz@gg3.net \
/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.