View Single Post
Old 07-06-2012, 07:54 AM   #40
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
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
Hmm...
Disclaimer: I haven't read the above patch (yet).

That problem should not be "in the kernel" it should be "in the related kernel module".

We don't want to ask users to bspatch their kernel, but a module???
That should be easy, the modules are located in the main file system under /lib/modules.

It ***should*** be possible to re-build the corrected module and just replace it in the system file system image.

BUT ...
Just depending on an execution of "aplay" to "prime the pump" should do for now. (KeK isn't ready to rebuild kernel modules).
knc1 is offline   Reply With Quote