All of lore.kernel.org
 help / color / mirror / Atom feed
From: Federico Fuga <f.fuga@people.it>
To: alsa-devel@alsa-project.org
Subject: Inappropriate ioctl for device on alsalib with uclibc and arm platform
Date: Mon, 19 Nov 2007 16:21:39 +0100	[thread overview]
Message-ID: <4741AA03.5070903@people.it> (raw)

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
ioctl for device)
write(2, "alsactl", 7alsactl)                  = 7


but aplay see all the board and seems to work properly:

# aplay  -l
**** List of PLAYBACK Hardware Devices ****
card 0: EMX270 [EM-X270], device 0: AC97 HiFi AC97 HiFi-AC97-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: EMX270 [EM-X270], device 1: AC97 Aux AC97 Aux-AC97-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
# aplay -L
default:CARD=EMX270
    EM-X270,
    Default Audio Device
null
    Discard all samples (playback) or generate zero samples (capture)
# speaker-test

speaker-test 1.0.14

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 8 to 32768
Period size range from 8 to 2040
Using max buffer size 32768
Periods = 4
was set period_size = 1024
was set buffer_size = 32768
 0 - Front Left
Time per period = 2.528627
 0 - Front Left
Time per period = 2.999174

But I hear no sound (the levels are all off).
In a similar installation based on glibc (Armstrong linux) with the same
version of kernel, alsa and all other stuff works correctly.

root@em-x270:~$ cat /proc/asound/devices
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 24: [ 0- 0]: digital audio capture
 33:        : timer


The device nodes in /dev/sound are created by udev, and major/minor codes and permissions seems ok.
Can you give me some hint on how to solve this issue?

Thank you in advance

ing. Federico Fuga

             reply	other threads:[~2007-11-19 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19 15:21 Federico Fuga [this message]
2007-11-20 13:58 ` Inappropriate ioctl for device on alsalib with uclibc and arm platform Takashi Iwai
2007-11-20 16:51   ` Federico Fuga
2007-11-21 10:11     ` Takashi Iwai
2007-11-23 17:49       ` Federico Fuga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4741AA03.5070903@people.it \
    --to=f.fuga@people.it \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.