From: Takashi Iwai Subject: Re: Inappropriate ioctl for device on alsalib with uclibc and arm platform Date: Wed, 21 Nov 2007 11:11:12 +0100 Message-ID: References: <4741AA03.5070903@people.it> <4743108A.7050409@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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 855AB24A5C for ; Wed, 21 Nov 2007 11:45:39 +0100 (CET) In-Reply-To: <4743108A.7050409@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 Tue, 20 Nov 2007 17:51:22 +0100, Federico Fuga wrote: > > Takashi Iwai ha scritto: > > At Mon, 19 Nov 2007 16:21:39 +0100, > > Federico Fuga wrote: > > # 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. > > > > > > Hi Takashi, > > thank you for your response. I have tracked the problem to the kernel > space and found exactly what you say (structure size). I didn't think > about word alignment, I will try by changeing the gcc options. > Do you think I should look at the cross compiler or at the parameters > passed to gcc while compiling the alsa library? Well, I vaguely remember about the ARM cross-compiling problem. Checking the mail archive might help... Takashi