van der Linden wrote:
> Jan,
> 
> I have two real-time requirements:
> 
> 1.  I have to get audio from ALSA and deliver it to a custom FPGA driver and 
> vice versa each 5 miliseconds.
>      So, I will set the chunk size for ALSA in such a way I get 5 ms audio 
> samples. From the FPGA I also get chunks of 5ms.
> 
>      There may be some jitter in delivering between ALSA and FPGA but think 
> of one or two miliseconds.

That sounds more than feasible.

> 
> 2. I want to receive 5ms audio from ALSA and after filtering and processing 
> it I have to sent it back to ALSA.
>     This must be done within 10ms.
> 
> We tested the real-time patches but the interrupt latency was not good 
> enough on our Blackfin 537 DSP (measured with a latency measuring tool).
> With Xenomai installed the latency tool showed very good response. So I want 
> to go the Xenomai way.

Yeah, there is no -rt in sight for Blackfin, thus going this way makes
sense. But you won't get around porting basic ALSA support into the
Xenomai domain. However, this can be fairly simply, provided a straight
audio controller design.

> 
> So therefor I like to know more about the Xenomai / Linux interaction and 
> the performance measuring method (see original mailing).

Regarding Xenomai/Linux interaction, there are basically two patterns:

 - Lock-less queues in shared memory between both sides.

 - A Xenomai "borderline" thread at low priority that interacts with
   other Xenomai threads in primary mode (e.g. via message queues or
   using shared memory and Xenomai mutexes, semaphores, etc.), then
   switches to secondary mode for its Linux tasks (like socket access)
   but without holding any lock at this point(!), and finally starts the
   loop all over again. Note that domain switching takes place
   automatically, you only have to take care of a clean design
   (RT/non-RT separation).

One warning regarding I-pipe/Xenomai on Blackfin, though: the last time
I checked we still had some issue in the patch that can cause scheduling
artifacts on the Linux side (but not for Xenomai!). This may not bite
you in your scenario, and I know of quite a few Blackfin applications
based on Xenomai which are fine as well, but one should be aware of this.

HTH,
Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to