[alsa-devel] Inappropriate ioctl for device on alsalib with uclibc and arm platform

Takashi Iwai tiwai at suse.de
Tue Nov 20 14:58:36 CET 2007


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


More information about the Alsa-devel mailing list