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