Comment 14 for bug 310760

Revision history for this message
Martin Pitt (pitti) wrote :

Keeping notes about my analysis and some facts; please ignore.

arecord does in both cases (hopefully I decoded the ioctls correctly):
open("/dev/snd/controlC1", O_RDONLY) = 3
close(3) = 0
open("/dev/snd/controlC1", O_RDWR) = 3
ioctl(3, USBDEVFS_CONTROL, 0xbfbfc454) = 0
ioctl(3, 0x40045532, 0xbfbfc474) = 0
open("/dev/snd/pcmC1D0c", O_RDWR|O_NONBLOCK) = 4
close(3) = 0
ioctl(4, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0xbfbfc2d4) = 0
fcntl64(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
ioctl(4, AGPIOC_INFO, 0xbfbfc2d0) = 0
ioctl(4, AGPIOC_RELEASE or APM_IOC_SUSPEND, 0xbfbfc2c8) = 0
fcntl64(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(4, F_SETFL, O_RDWR) = 0
ioctl(4, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0xbfbfc790) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0 # SNDRV_PCM_IOCTL_HW_REFINE
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbf9e70) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4110, 0xbfbfa400) = 0
ioctl(4, 0xc25c4111, 0xbfbfa400) = 0 # SNDRV_PCM_IOCTL_HW_PARAMS
ioctl(4, 0xc0684113, 0xbfbfa2c0) = 0
ioctl(4, 0x4140, 0) = 0 # SNDRV_PCM_IOCTL_PREPARE

arecord if it works:
ioctl(4, 0x800c4151, 0xbfbfa6a0) = 0 # SNDRV_PCM_IOCTL_READI_FRAMES

arecord if it fails:
[... ioctl(4, 0xc0684113, 0xbf9db8a0) = 0 ... ]
ioctl(4, 0x800c4151, 0xbf9dbc80) = -1 EIO (Input/output error)

hal does not access /dev:
egrep '(open|ioctl).*dev/snd' hal.strace

... but proc:
open("/proc/asound/cards", O_RDONLY|O_LARGEFILE) = 13
open("/proc/asound/card1/pcm0p/info", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/proc/asound/card1/pcm0c/info", O_RDONLY|O_LARGEFILE) = 16
open("/proc/asound/card0/pcm0p/info", O_RDONLY|O_LARGEFILE) = 16

this is from hald/linux/device.c, sound_add(), called if a new device is discovered (also at hald start), and fd gets closed. This is just an informational operation, I don't believe that this causes the issue.

arecord on 8.04.1 with hald running works for me, both with and without pulseaudio. mixer_applet2 is the only thing holding open /dev/snd/controlC0.