From: Takashi Iwai Subject: Re: Inappropriate ioctl for device on alsalib with uclibc and arm platform Date: Tue, 20 Nov 2007 14:58:36 +0100 Message-ID: References: <4741AA03.5070903@people.it> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 6FDD424A25 for ; Tue, 20 Nov 2007 15:27:15 +0100 (CET) In-Reply-To: <4741AA03.5070903@people.it> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Federico Fuga Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 19 Nov 2007 16:21:39 +0100, Federico Fuga wrote: > > Hi, > > Maybe I am a little bit off-topic here, but I think this question may be related with a bug (maybe not in the alsa library, but I am a little confused now), so I apologize in advance. > I am building a uclibc-based system on arm board. > I have compiled the library 1.0.14a with uClibc 0.9.29 and kernel > 2.6.23.1 / kernel headers 2.6.22. > Settings the config params of mixer with "alsactl restore" fails with > an "inappropriate ioctl for device" error: > > # alsactl restore > alsactl: set_control:1159: Cannot write control '2:0:0:Speaker Playback > Volume:0' : Inappropriate ioctl for device > > while traceing with strace I see that: > > open("/usr/lib/libasound.so.2", O_RDONLY) = 4 > fstat(4, {st_mode=S_IFREG|0755, st_size=716844, ...}) = 0 > close(4) = 0 > open("/dev/snd/controlC0", O_RDONLY) = 4 > close(4) = 0 > open("/dev/snd/controlC0", O_RDWR) = 4 > ioctl(4, USBDEVFS_CONTROL, 0xbeab09ec) = 0 > ioctl(4, UI_DEV_CREATE, 0xbeab0ad0) = 0 > ioctl(4, USBDEVFS_CONNECTINFO, 0xbeab0654) = 0 > ioctl(4, USBDEVFS_HUB_PORTINFO, 0xbeab0768) = -1 ENOTTY (Inappropriate Looks like the definition of SNDRV_CTL_ICOTL_ELEM_WRITE doesn't match with the user-space and the kernel, most likely the size of struct snd_ctl_elem_value. This might be a word alignment issue. Takashi