2011-08-19 09:51:27     Problem with concurrently playing audio on one device

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

2011-08-19 09:51:27     Problem with concurrently playing audio on one device

Rob Maris (GERMANY)

Message: 103042   

 

As of last production state of my linux distribution (2.6.34.7) it was possible to have e.g. two aplay programs active with sound of both players intermixed. Currently I'm testing an upgrade to 2.6.38.1 (because of prior memory leaks), and encounter the following report when aplay is concurrently started:

 

aplay: main:550: audio open error: Device or resource busy

 

When I use the dummy device instead of the real device, no such error occurs. So I'd suggest that the AD73311 driver updates over time are responsible for this limitation. On the other hand, a dummy device does not consume resources - which could also explain why it operates correctly.

 

Can anybody confirm whether this is a limitation or not, regardless which 'real' audio device is used?. This would help localize the problem.

 

QuoteReplyEditDelete

 

 

2011-08-24 02:01:50     Re: Problem with concurrently playing audio on one device

Rob Maris (GERMANY)

Message: 103101   

Scott, can you check what cat /proc/asound/cards says with your board?

 

I'm having a nameless configuration where I believe that the alsalibs associated AD73311.conf will not actually be associated. And in this conf file, a dmix property is specified..

 

root:  /> cat /proc/asound/cards

0 [bf5xxad73311 ]: - bf5xx_ad73311

bf5xx_ad73311

 

The correct result (from production kernel)

 

root:  /> cat /proc/asound/cards

0 [bf5xxad73311 ]: AD73311 - bf5xx_ad73311

bf5xx_ad73311 (AD73311)

 

-Rob

 

 

 

QuoteReplyEditDelete

 

 

2011-08-24 06:05:29     Re: Problem with concurrently playing audio on one device

Scott Jiang (CHINA)

Message: 103110   

 

ALSA have changed card name, codec name doesn't display. This name has no relationship with your config.

QuoteReplyEditDelete

 

 

2011-08-24 16:57:26     Re: Problem with concurrently playing audio on one device

Rob Maris (GERMANY)

Message: 103114   

 

Hi Scott, would you please mind to do the test with two concurrent aplay commands and check whether it works or not?

 

-Rob

QuoteReplyEditDelete

 

 

2011-08-24 18:50:58     Re: Problem with concurrently playing audio on one device

Cameron Barfield (UNITED STATES)

Message: 103118   

 

Rob, does your sound device have MMAP enabled? The side effect of a "workaround" given to me in a previous thread was that it broke DMIX because the workaround disabled MMAP support.

QuoteReplyEditDelete

 

 

2011-08-24 21:33:54     Re: Problem with concurrently playing audio on one device

Scott Jiang (CHINA)

Message: 103119   

 

dmix plugin must need mmap method. ALSA changes a  lot, many things working well before can't work now.

 

I can't use aplay twice, I have asked maintainer. He said we need dmix, but we already have.

QuoteReplyEditDelete

 

 

2011-08-30 05:15:02     Re: Problem with concurrently playing audio on one device

Rob Maris (GERMANY)

Message: 103201   

 

Cameron: You refer to your ALSA memory leak thread, I suggest. In order to be sure, I checked the status of the bf5xx-i2s-pcm.c file. As expected: no such workaround was found in my source code.

 

Scott: I see that you're actually updating uclinux-dist to alsa 1.0.24. At a first glance, no changes are related to ad73311 compared to the former 1.0.18 that operates correcly with alsa kernel 1.0.22. Question: are you going to try to re-establish correct dmix operation?

QuoteReplyEditDelete

 

 

2011-08-30 06:03:37     Re: Problem with concurrently playing audio on one device

Scott Jiang (CHINA)

Message: 103202   

 

Yes, I'm debugging this bug. open system call don't have O_APPEND flag now, it's strange. Anyway, I update alsa lib and utils to the latest version first.

QuoteReplyEditDelete

 

 

2011-08-31 23:24:25     Re: Problem with concurrently playing audio on one device

Scott Jiang (CHINA)

Message: 103205   

 

Rob Maris, I have fixed this bug. But I need to discuss with the alsa maintainer how to fix it properly. It takes some time.

QuoteReplyEditDelete

 

 

2011-09-27 05:50:18     Re: Problem with concurrently playing audio on one device

Scott Jiang (CHINA)

Message: 103579   

 

After a long time discussion, alsa gives a solution. I have upstreamed patches.

Attachments

    Outcomes