Simon Tremblay | 16 Aug 08:26

Configure and use dmix with a new ASoC driver

Hi, 

I don't know if there is something special I should do to be able to use dmix
with my new ASoC driver I made (TLV320AIC23b codec running on a AT91RM9200
 board).

The problem is when I try to use dmix with aplay, it doesn't work and I got
 this error message:

# aplay -v -D plug:dmix /media/usb0/tada.wav
aplay: main:545: audio open error: Operation not permitted
#

Listing of my /dev/snd:

# ls -al /dev/snd
drwxr-xr-x    2 root     root            0 Jan  1 00:01 .
drwxr-xr-x    7 root     root            0 Jan  1 00:01 ..
crw-rw----    1 root     audio    116,   0 Jan  1 00:01 controlC0
crw-rw----    1 root     audio    116,  16 Jan  1 00:01 pcmC0D0p

Notice I have a default /usr/share/alsa/alsa.conf file too. I'm running ALSA
1.0.15. Of course, it works well when I play a sound without the -D plug:dmix
parameter...

# aplay /media/usb0/tada.wav
at91-ssc:ssc_startup: SSC_SR=0x000004c3
armus_tlv320aic23b: pck1 started
asoc: aic23b <-> at91-ssc1 info:
asoc: rate mask 0x6fe
(Continue reading)

Mark Brown | 16 Aug 18:56
Gravatar

Re: Configure and use dmix with a new ASoC driver

On Sat, Aug 16, 2008 at 06:27:02AM +0000, Simon Tremblay wrote:

> # aplay -v -D plug:dmix /media/usb0/tada.wav
> aplay: main:545: audio open error: Operation not permitted

This doesn't ring any specific bells for me but since you are cross
building and can play without dmix I would be looking at installation
issues with your ALSA user space or a missing device file it needs.
stracing aplay may well provide a useful clue as to what's missing.
Simon Tremblay | 16 Aug 21:17

Re: Configure and use dmix with a new ASoC driver

Mark Brown <broonie <at> sirena.org.uk> writes:

> 
> On Sat, Aug 16, 2008 at 06:27:02AM +0000, Simon Tremblay wrote:
> 
> > # aplay -v -D plug:dmix /media/usb0/tada.wav
> > aplay: main:545: audio open error: Operation not permitted
> 
> This doesn't ring any specific bells for me but since you are cross
> building and can play without dmix I would be looking at installation
> issues with your ALSA user space or a missing device file it needs.
> stracing aplay may well provide a useful clue as to what's missing.
> 

Thanks for the help, I used strace on aplay and I think it's that ouput is wrong:

open("/usr/lib/libasound.so.2", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=712960, ...}) = 0
close(3)                                = 0
open("/etc/group", O_RDONLY)            = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbedc77a0) = -1 ENOTTY (Inappropriate
ioctl for device)
read(3, "root:x:0:\ndaemon:x:1:\nbin:x:2:\ns"..., 4096) = 204
close(3)                                = 0
SYS_299(0x56a4d5, 0x1, 0x3b0, 0xffffffff, 0x26d00) = 1966080
SYS_300(0x1e0000, 0, 0x102, 0xbedc7850, 0) = 0
SYS_300(0x1e0000, 0, 0x101, 0xbedc7850, 0) = 0
SYS_298(0x1e0000, 0xbedc788c, 0x2, 0x10, 0) = -1 EFBIG (File too large)
SYS_300(0x1e0000, 0, 0x100, 0, 0x26d00) = 0
SYS_299(0x56a4d5, 0x1, 0x3b0, 0xffffffff, 0x26d00) = 1998848
(Continue reading)

Mark Brown | 18 Aug 11:31
Gravatar

Re: Configure and use dmix with a new ASoC driver

On Sat, Aug 16, 2008 at 07:17:19PM +0000, Simon Tremblay wrote:

> Must I create a .conf file for my tlv320aic23b codec or it's ok if I don't have
> one?

You shouldn't need a specific configuration file for your card but you
will need the standard ALSA configuration files there.

Gmane