2010-08-26 12:51:46     Blackfin dmix.

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-08-26 12:51:46     Blackfin dmix.

Matt Gilg (UNITED STATES)

Message: 92814   

 

When attempting to use dmix on the blackfin, I get the following output:

 

--------------------------------------------------------------------------------------------------

 

root:~> aplay -D dmix /mnt/permanent/scripts/8k16bitpcm.wav

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2161:(snd_pcm_open_conf)

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_direct.c:873:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1020:(snd_pcm_dmix_open) unable to initialize slave

aplay: main:550: audio open error: Invalid argument

root:~>

 

--------------------------------------------------------------------------------------------------

 

Does this seem to be a driver issue?  I am currently working with the ad1938.

 

If I skip the mmap check, I get the following:

 

----------------------------------------------------------------------------------------------------

 

root:~> aplay -D dmix /mnt/permanent/scripts/8k16bitpcm.wav

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2161:(snd_pcm_open_conf) attempting call _snd_pcm_dmix_open inside [builtin]

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2161:(snd_pcm_open_conf) attempting call _snd_pcm_hw_open inside [builtin]

ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_direct.c:871:(snd1_pcm_direct_initialize_slave) Skipping mmap check...

Playing WAVE '/mnt/permanent/scripts/8k16bitpcm.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono

aplay: set_params:904: Sample format non available

 

----------------------------------------------------------------------------------------------------

 

Skipping the check isn't a good option, and it certainly isn't the root issue.  Internally the check calls "snd_pcm_hw_params_set", and I've just done a recursive grep in the distro for that method and can't seem to locate it anywhere.  Obviously I'm missing something....

 

 

-Matt

QuoteReplyEditDelete

 

 

2010-08-26 13:31:51     Re: Blackfin dmix.

Mike Frysinger (UNITED STATES)

Message: 92815   

 

this is why the CONFIG_SND_BF5XX_MMAP_SUPPORT kernel option exists

QuoteReplyEditDelete

 

 

2010-08-26 16:38:02     Re: Blackfin dmix.

Matt Gilg (UNITED STATES)

Message: 92817   

 

Hi Mike, thanks for the response.  I should have mentioned this, but we aren't using the ac97 driver.  Is there a way to use dmix without using that driver?

 

-Matt

QuoteReplyEditDelete

 

 

2010-08-26 16:58:00     Re: Blackfin dmix.

Mike Frysinger (UNITED STATES)

Message: 92818   

 

yes and no.  the reason dmix has been done for only one interface is because of the overhead involved.  we have to spend time emulating the mmap interface which means memcpy's in the kernel.  so i'm pretty sure it could be ported to whatever machine driver you're using (which is that btw ?).  but until it is, dmix is only going to work with the ac97.  you could look at the existing ac97 driver and see about porting it yourself ...

 

i'm not terribly familiar with alsa/asoc though, so i'd have to let someone else quote the effort required.

QuoteReplyEditDelete

 

 

2010-08-26 17:44:31     Re: Blackfin dmix.

Matt Gilg (UNITED STATES)

Message: 92819   

 

Hi Mike, thanks for the info.  We are currently using the ad1938, and the driver is very similar to that of the ad1836.

 

If someone could give some insight to the amount of effort a port would take, it would be much appreciated.

 

 

 

-Matt

QuoteReplyEditDelete

 

 

2010-08-26 17:58:18     Re: Blackfin dmix.

Mike Frysinger (UNITED STATES)

Message: 92820   

 

ok, but that isnt the transport.  what i was referring to was bf5xx-tdm which is what the ad1938 hooks up to.

 

you probably want to look at bf5xx-ac97-pcm.c, see how the CONFIG_SND_BF5XX_MMAP_SUPPORT is interwoven, and then apply similar code to bf5xx-tdm-pcm.c.

QuoteReplyEditDelete

 

 

2010-08-30 11:05:47     Re: Blackfin dmix.

Matt Gilg (UNITED STATES)

Message: 92930   

 

Can't seem to locate bf5xx-tdm-pcm.c, any idea where it might be?  Our driver seems to use bf53x_sport.c/h, but I see no mention of that particular file (bf5xx-tdm-pcm.c) anywhere in the distribution.

 

I must be misunderstanding something.

 

-Matt

QuoteReplyEditDelete

 

 

2010-08-30 11:13:11     Re: Blackfin dmix.

Adam Rosenberg (UNITED STATES)

Message: 92931   

 

You can find bf5xx-tdm-pcm.c here:

 

uclinux-dist/linux-2.6.x/sound/soc/blackfin/

 

-Adam

QuoteReplyEditDelete

 

 

2010-08-30 11:21:51     Re: Blackfin dmix.

Matt Gilg (UNITED STATES)

Message: 92932   

Hi Adam, that is where I expected it to exist, but here is a listing of that directory:

 

gilgm@dev-server:~/Blackfin/uClinux/linux-2.6.x/sound/soc/blackfin$ ls

bf5xx-ac97.c      bf5xx-ac97-pcm.h  bf5xx-ad73311.c  bf5xx-i2s-pcm.c  bf5xx-sport.h    Kconfig        snd-bf5xx-ac97.mod.c

bf5xx-ac97.h      bf5xx-ac97-pcm.o  bf5xx-i2s.c      bf5xx-i2s-pcm.h  bf5xx-ssm2602.c  Makefile       snd-bf5xx-ac97.o

bf5xx-ac97-pcm.c  bf5xx-ad1980.c    bf5xx-i2s.h      bf5xx-sport.c    built-in.o       modules.order

 

kernel:    Linux release 2.6.28.10-ADI-2009R1.1-svn3992

 

-Matt

 

 

QuoteReplyEditDelete

 

 

2010-08-30 11:28:35     Re: Blackfin dmix.

Adam Rosenberg (UNITED STATES)

Message: 92933   

 

I guess it is only in the SVN trunk.   I don't see it in the 2009R1.1-RC4 release that I was using before I switched to using trunk.

 

-Adam

Attachments

    Outcomes