Skip to contentSkip to conversation

function snd_mixer_load failed: Inappropriate ioctl for device

DISCUSSION Salatiel Filho 2 participants 4 messages Dec 13, 2007 – Jan 7, 2008

lore
Share & tools
lore
#0 lore raw

*** please let me in the to or cc fields. I am not on the list ***

I am having a big trouble to make sound work on my ARM machine. I am running debian 4.

# uname -a
Linux LS-GL7D6 2.6.16.57-arm2 #7 Wed Dec 12 18:14:51 BRT 2007 armv5tejl GNU/Linux

# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

Modules load successfully

# lsmod
Module                  Size  Used by
snd_pcm_oss            47680  0
snd_mixer_oss          15040  1 snd_pcm_oss
snd_usb_audio          79904  0
snd_pcm                75877  2 snd_pcm_oss,snd_usb_audio
snd_timer              20164  1 snd_pcm
snd_page_alloc          8264  1 snd_pcm
snd_usb_lib            15808  1 snd_usb_audio
snd_rawmidi            21376  1 snd_usb_lib
snd_seq_device          7116  1 snd_rawmidi
snd_hwdep               7460  1 snd_usb_audio
snd                    54368  9
snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore               7684  1 snd
nfs                   102044  0
lockd                  61780  1 nfs
sunrpc                142808  3 nfs,lockd
dm_mod                 48176  0
usbhid                 38628  0
# cat /proc/asound/cards
 0 [default        ]: USB-Audio - C-Media USB Headphone Set
                     C-Media USB Headphone Set   at
usb-ehci_platform.4523-1, full speed
# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

but everytime i try to use alsamixer i get:

# alsamixer
alsamixer: function snd_mixer_load failed: Inappropriate ioctl for device
# aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: xrun:1090: read/write error, state = PREPARED
# strace alsamixer
...
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/usr//share/alsa/alsa.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8611, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
read(3, "#\n#  ALSA library configuration "..., 4096) = 4096
read(3, "r\n\t\t\t\tname defaults.pcm.device\n\t"..., 4096) = 4096
read(3, "{\n\t\t\t@func refer\n\t\t\tname default"..., 4096) = 419
read(3, "", 4096)                       = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
access("/etc/asound.conf", R_OK)        = -1 ENOENT (No such file or directory)
access("/root/.asoundrc", R_OK)         = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da64)  = 0
ioctl(3, UI_DEV_CREATE, 0xbec2db2c)     = 0
close(3)                                = 0
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da44)  = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_CONNECTINFO, 0xbec2d86c) = 0
ioctl(3, USBDEVFS_IOCTL, 0xbec2d42c)    = -1 ENOTTY (Inappropriate
ioctl for device)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(1, "\n", 1
)                       = 1
write(2, "alsamixer: function snd_mixer_lo"..., 74alsamixer: function
snd_mixer_load failed: Inappropriate ioctl for device
) = 74
munmap(0x40017000, 4096)                = 0
io_submit(0x2, 0, 0x8 <unfinished ... exit status 2>

any help?

The same card works ok on my x86 machine using . So the problem is not the card but something else.

Signature · 5 lines
[]'s
Salatiel

"O maior prazer do inteligente é bancar o  idiota
   diante de um  idiota que banca o inteligente".
#1 lore raw

At Wed, 12 Dec 2007 21:45:26 -0300,

Quoted 111 lines · Salatiel Filho

*** please let me in the to or cc fields. I am not on the list ***

I am having a big trouble to make sound work on my ARM machine. I am running debian 4.

# uname -a
Linux LS-GL7D6 2.6.16.57-arm2 #7 Wed Dec 12 18:14:51 BRT 2007 armv5tejl GNU/Linux

# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

Modules load successfully

# lsmod
Module                  Size  Used by
snd_pcm_oss            47680  0
snd_mixer_oss          15040  1 snd_pcm_oss
snd_usb_audio          79904  0
snd_pcm                75877  2 snd_pcm_oss,snd_usb_audio
snd_timer              20164  1 snd_pcm
snd_page_alloc          8264  1 snd_pcm
snd_usb_lib            15808  1 snd_usb_audio
snd_rawmidi            21376  1 snd_usb_lib
snd_seq_device          7116  1 snd_rawmidi
snd_hwdep               7460  1 snd_usb_audio
snd                    54368  9
snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore               7684  1 snd
nfs                   102044  0
lockd                  61780  1 nfs
sunrpc                142808  3 nfs,lockd
dm_mod                 48176  0
usbhid                 38628  0
# cat /proc/asound/cards
 0 [default        ]: USB-Audio - C-Media USB Headphone Set
                     C-Media USB Headphone Set   at
usb-ehci_platform.4523-1, full speed
# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

but everytime i try to use alsamixer i get:

# alsamixer
alsamixer: function snd_mixer_load failed: Inappropriate ioctl for device
# aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: xrun:1090: read/write error, state = PREPARED
# strace alsamixer
...
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/usr//share/alsa/alsa.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8611, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
read(3, "#\n#  ALSA library configuration "..., 4096) = 4096
read(3, "r\n\t\t\t\tname defaults.pcm.device\n\t"..., 4096) = 4096
read(3, "{\n\t\t\t@func refer\n\t\t\tname default"..., 4096) = 419
read(3, "", 4096)                       = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
access("/etc/asound.conf", R_OK)        = -1 ENOENT (No such file or directory)
access("/root/.asoundrc", R_OK)         = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da64)  = 0
ioctl(3, UI_DEV_CREATE, 0xbec2db2c)     = 0
close(3)                                = 0
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da44)  = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_CONNECTINFO, 0xbec2d86c) = 0
ioctl(3, USBDEVFS_IOCTL, 0xbec2d42c)    = -1 ENOTTY (Inappropriate
ioctl for device)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(1, "\n", 1
)                       = 1
write(2, "alsamixer: function snd_mixer_lo"..., 74alsamixer: function
snd_mixer_load failed: Inappropriate ioctl for device
) = 74
munmap(0x40017000, 4096)                = 0
io_submit(0x2, 0, 0x8 <unfinished ... exit status 2>
Quoted 6 lines

any help?

The same card works ok on my x86 machine using . So the problem is not the card but something else.

Likely the difference of struct size due to different compiler or compiler options.

Takashi

#2 lore raw
Quoted 117 lines · Takashi Iwai

At Wed, 12 Dec 2007 21:45:26 -0300,

Quoted 115 lines · Salatiel Filho

*** please let me in the to or cc fields. I am not on the list ***

I am having a big trouble to make sound work on my ARM machine. I am running debian 4.

# uname -a
Linux LS-GL7D6 2.6.16.57-arm2 #7 Wed Dec 12 18:14:51 BRT 2007 armv5tejl GNU/Linux

# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

Modules load successfully

# lsmod
Module                  Size  Used by
snd_pcm_oss            47680  0
snd_mixer_oss          15040  1 snd_pcm_oss
snd_usb_audio          79904  0
snd_pcm                75877  2 snd_pcm_oss,snd_usb_audio
snd_timer              20164  1 snd_pcm
snd_page_alloc          8264  1 snd_pcm
snd_usb_lib            15808  1 snd_usb_audio
snd_rawmidi            21376  1 snd_usb_lib
snd_seq_device          7116  1 snd_rawmidi
snd_hwdep               7460  1 snd_usb_audio
snd                    54368  9
snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore               7684  1 snd
nfs                   102044  0
lockd                  61780  1 nfs
sunrpc                142808  3 nfs,lockd
dm_mod                 48176  0
usbhid                 38628  0
# cat /proc/asound/cards
 0 [default        ]: USB-Audio - C-Media USB Headphone Set
                     C-Media USB Headphone Set   at
usb-ehci_platform.4523-1, full speed
# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

but everytime i try to use alsamixer i get:

# alsamixer
alsamixer: function snd_mixer_load failed: Inappropriate ioctl for device
# aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: xrun:1090: read/write error, state = PREPARED
# strace alsamixer
...
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/usr//share/alsa/alsa.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8611, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
read(3, "#\n#  ALSA library configuration "..., 4096) = 4096
read(3, "r\n\t\t\t\tname defaults.pcm.device\n\t"..., 4096) = 4096
read(3, "{\n\t\t\t@func refer\n\t\t\tname default"..., 4096) = 419
read(3, "", 4096)                       = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
access("/etc/asound.conf", R_OK)        = -1 ENOENT (No such file or directory)
access("/root/.asoundrc", R_OK)         = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da64)  = 0
ioctl(3, UI_DEV_CREATE, 0xbec2db2c)     = 0
close(3)                                = 0
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da44)  = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_CONNECTINFO, 0xbec2d86c) = 0
ioctl(3, USBDEVFS_IOCTL, 0xbec2d42c)    = -1 ENOTTY (Inappropriate
ioctl for device)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(1, "\n", 1
)                       = 1
write(2, "alsamixer: function snd_mixer_lo"..., 74alsamixer: function
snd_mixer_load failed: Inappropriate ioctl for device
) = 74
munmap(0x40017000, 4096)                = 0
io_submit(0x2, 0, 0x8 <unfinished ... exit status 2>

any help?

Quoted 9 lines
Quoted 2 lines

The same card works ok on my x86 machine using . So the problem is not the card but something else.

Likely the difference of struct size due to different compiler or compiler options.

Takashi

I have compiled kernel/alsa drivers/alsa mixer using the same compiler on the same machine.

Signature · 5 lines
[]'s
Salatiel

"O maior prazer do inteligente é bancar o  idiota
   diante de um  idiota que banca o inteligente".
#3 lore raw

At Mon, 24 Dec 2007 23:29:52 -0300,

Quoted 126 lines · Salatiel Filho
Quoted 124 lines · Takashi Iwai

At Wed, 12 Dec 2007 21:45:26 -0300,

Quoted 111 lines · Salatiel Filho

*** please let me in the to or cc fields. I am not on the list ***

I am having a big trouble to make sound work on my ARM machine. I am running debian 4.

# uname -a
Linux LS-GL7D6 2.6.16.57-arm2 #7 Wed Dec 12 18:14:51 BRT 2007 armv5tejl GNU/Linux

# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

Modules load successfully

# lsmod
Module                  Size  Used by
snd_pcm_oss            47680  0
snd_mixer_oss          15040  1 snd_pcm_oss
snd_usb_audio          79904  0
snd_pcm                75877  2 snd_pcm_oss,snd_usb_audio
snd_timer              20164  1 snd_pcm
snd_page_alloc          8264  1 snd_pcm
snd_usb_lib            15808  1 snd_usb_audio
snd_rawmidi            21376  1 snd_usb_lib
snd_seq_device          7116  1 snd_rawmidi
snd_hwdep               7460  1 snd_usb_audio
snd                    54368  9
snd_pcm_oss,snd_mixer_oss,snd_usb_audio,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore               7684  1 snd
nfs                   102044  0
lockd                  61780  1 nfs
sunrpc                142808  3 nfs,lockd
dm_mod                 48176  0
usbhid                 38628  0
# cat /proc/asound/cards
 0 [default        ]: USB-Audio - C-Media USB Headphone Set
                     C-Media USB Headphone Set   at
usb-ehci_platform.4523-1, full speed
# cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.15.
Compiled on Dec 12 2007 for kernel 2.6.16.57-arm2.

but everytime i try to use alsamixer i get:

# alsamixer
alsamixer: function snd_mixer_load failed: Inappropriate ioctl for device
# aplay test.wav
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: xrun:1090: read/write error, state = PREPARED
# strace alsamixer
...
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/usr//share/alsa/alsa.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8611, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
read(3, "#\n#  ALSA library configuration "..., 4096) = 4096
read(3, "r\n\t\t\t\tname defaults.pcm.device\n\t"..., 4096) = 4096
read(3, "{\n\t\t\t@func refer\n\t\t\tname default"..., 4096) = 419
read(3, "", 4096)                       = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40017000, 4096)                = 0
access("/etc/asound.conf", R_OK)        = -1 ENOENT (No such file or directory)
access("/root/.asoundrc", R_OK)         = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da64)  = 0
ioctl(3, UI_DEV_CREATE, 0xbec2db2c)     = 0
close(3)                                = 0
stat64("/usr//share/alsa/alsa.conf", {st_mode=S_IFREG|0644,
st_size=8611, ...}) = 0
open("/dev/snd/controlC0", O_RDONLY)    = 3
close(3)                                = 0
open("/dev/snd/controlC0", O_RDWR)      = 3
ioctl(3, USBDEVFS_CONTROL, 0xbec2da44)  = 0
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_RELEASEINTERFACE, 0xbec2dac0) = 0
ioctl(3, USBDEVFS_CONNECTINFO, 0xbec2d86c) = 0
ioctl(3, USBDEVFS_IOCTL, 0xbec2d42c)    = -1 ENOTTY (Inappropriate
ioctl for device)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x40017000
write(1, "\n", 1
)                       = 1
write(2, "alsamixer: function snd_mixer_lo"..., 74alsamixer: function
snd_mixer_load failed: Inappropriate ioctl for device
) = 74
munmap(0x40017000, 4096)                = 0
io_submit(0x2, 0, 0x8 <unfinished ... exit status 2>
Quoted 6 lines

any help?

The same card works ok on my x86 machine using . So the problem is not the card but something else.

Likely the difference of struct size due to different compiler or compiler options.

Quoted 5 lines
Quoted 2 lines

Takashi

I have compiled kernel/alsa drivers/alsa mixer using the same compiler on the same machine.

Hm, but the strace indicates something like the struct size mismatch. Try to build with --with-debug=detect option and see the kernel message.

Takashi