I think the dma transfers that are happening due to writing to the
uSD/eMMC are causing high latency in the IRQ's, which therefore stops
data being pulled out of the buffer and as such overrunning.
I think there are a couple of factors to it in all honesty and this is
just a quick fix, but to really fix it I think whatever IRQ is hogging
the scheduler needs to be fixed.
I mentioned in my email the file that I was hacking in order to increase
the buffer:
sound/soc/davinci/davinci-pcm.c
Which is part of the kernel. I am using 3.13, but i expect it will apply
to 3.8 or whatever you are running too.
Cheers,
On 16/01/2014 20:40, ezequiel esteban wrote:
That's interesting, increasing the buffer size in the arecord or rec
command (sox) seems also to work... but i dont understand how... could
be DMA interrupts issues?. I'm doing some heavy audio analysis while
recording and i get a few hundreds miliseconds of lost audio due to the
overruns (per minute), isn't much but it could be better.
What files of the source code are you checking?
Regards
2014/1/16 Jack Mitchell <[email protected]
<mailto:[email protected]>>
On 13/01/14 19:04, Jack Mitchell wrote:
> On 13/01/2014 18:40, eze_rg wrote:
>> The best "temporary solution" that worked for me was using SoX for
>> recording audio (instead of the "arecord" command). I get just a few
>> buffer overruns, once in a while....
>> But, definitely, this is not a solution. It would be nice if someone
>> could clarify this issue.
>>
>> Regards,
>>
>> Ezequiel
>
> Thanks Ezequiel, I'm currently chasing this down at a kernel driver
> level so will update if I manage to get anywhere. Good (?) to
hear that
> I'm not the only one with problems.
>
I managed to fix my issues by hacking the buffer size of the driver in
the kernel. There is something still not quite right with the
implementation as the max_buffer_bytes seems to be calculated wrong
somewhere, but I can't seem to find where.
So, if you are interested in helping fix your buffer xrun problems I
would suggest changing the buffer_bytes_max value of the
snd_pcm_hardware capture struct in sound/soc/davinci/davinci-pcm.c,
256*1024 will give you 64K of buffer, rather than the current 32K.
Cheers,
--
Jack Mitchell ([email protected] <mailto:[email protected]>)
Embedded Systems Engineer
Cambridgeshire, UK
http://www.embed.me.uk
--
--
Jack Mitchell ([email protected])
Embedded Systems Engineer
http://www.embed.me.uk
--
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.