View Single Post
Old 07-06-2012, 07:44 AM   #39
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Okay so I found out first genuine implementation bug.

BUG: (noted at http://elinux.org/RidgeRun_LeopardBoard_SDK_Hints

To Check for this simply run

arecord -D 'plughw' -r 8000 -f S16_LE -c 2 | aplay -D 'plughw'

nothing happens, now try

aplay somefile.wav

THEN (GET READY TO TURN THE VOLUME DOWN)

arecord -D 'plughw' -r 8000 -f S16_LE -c 2 | aplay -D 'plughw'


now you can see the pipe works correctly
This seems to be as the result of a "'division by zero' in kernel error " on other systems so that's probably a good lead.

I think we may have a possible link to a solution (well roughly)

Code:
 Solutions to known issues
'division by zero' in kernel error when I try to use ALSA input

This is a known issue that has been discussed on the ASOC mailing list. 
The problem is that the function davinci_pcm_enqueue_dma performs this operations:

data_type = prtd->params->data_type;
count = period_size / data_type;

The first time, data_type is set to zero, so we get the error Division by zero in kernel. 
This is the reason why the pipe arecord | aplay works after running arecord or aplay first.

Apply the Media:Asoc-davinci-pcm.patch 
<http://elinux.org/images/9/95/Asoc-davinci-pcm.patch> 
to the kernel 2.6.29 to resolve this issue.
So I will have a look at that at some point but good to know I have a quick fix for instancing the soundcard, at our command, in full-duplex now at least.

so happy days there.

FULL-DUPLEX is GO (okay with some wangles and a reliant on two native apps but it should pave the way for some interesting piping hey Geekmaster

THIS IS THE REASON THE OTHER VOIP APPLICATION DIDN'T WORK I THINK
I am thinking of making it run through dmix0 now. that may have value.

in the interim. aplay > blank.wav; causes the card to snap out of it, it would seem

Last edited by twobob; 07-09-2012 at 10:34 PM. Reason: typos as per, horrible formatting - added partial workaround
twobob is offline   Reply With Quote