[alsa-devel] Opening (even read-only) of /dev/snd/pcmC0D0p says Operation not permitted

Sathish Kumar Balasubramaniam -ERS, HCL Tech b-sathishkumar at hcl.com
Wed May 7 16:08:27 CEST 2014

Ok. I found the issue.

Since the playback routing configuration is not set, it failed.
Once I set the playback routing configuration using amixer commands, aplay worked.

B.Sathish Kumar

From: Sathish Kumar Balasubramaniam -ERS, HCL Tech
Sent: Tuesday, May 06, 2014 10:11 PM
To: 'alsa-devel at alsa-project.org'
Subject: Opening (even read-only) of /dev/snd/pcmC0D0p says Operation not permitted


Please can anyone let me know how to debug more or fix the following issue

I tried to play a wav file using aplay. Its giving the following error

root at host# strace aplay a2002011001-e02.wav
execve("/usr/bin/aplay", ["aplay", "a2002011001-e02.wav"], [/* 15 vars */]) = 0
open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_CLOEXEC) = -1 EPERM (Operation not permitted)
close(3)                                = 0
write(2, "aplay: main:722: ", 17aplay: main:722: )       = 17
write(2, "audio open error: Operation not "..., 41audio open error: Operation not permitted) = 41
write(2, "\n", 1
)                       = 1

I tried to write a small program like the following

err = open("/dev/snd/pcmC0D0p", O_RDONLY);                              (I tried O_RDWR|O_NONBLOCK|O_CLOEXEC also)
printf("err = %d, errno = %s.\n", err, strerror(errno));

Even the above failed saying "err = -1, errno = Operation not permitted."

I am running these as user "root".

The following are my snd devices

root at host:~# ls -l /dev/snd/
total 0
drwxr-xr-x 2 root root       60 Jan  1  1970 by-path
crw-rw---- 1 root audio 116,  0 Jan  1  1970 controlC0
crw-rw---- 1 root audio 116, 24 Jan  1  1970 pcmC0D0c
crw-rw---- 1 root audio 116, 16 Jan  1  1970 pcmC0D0p
crw-rw---- 1 root audio 116, 33 Jan  1  1970 timer
root at host:~#

There is nothing present in my /etc/asound.conf
The following are few parameters in /usr/share/alsa/alsa.conf

defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000         # in us
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid audio
defaults.pcm.ipc_perm 0660

B.Sathish Kumar


The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.


More information about the Alsa-devel mailing list