[alsa-devel] Implementing sync start

Jon Smirl jonsmirl at gmail.com
Mon Aug 10 13:45:35 CEST 2009


On Mon, Aug 10, 2009 at 3:40 AM, Clemens Ladisch<clemens at ladisch.de> wrote:
> Jon Smirl wrote:
>> Here's how I implemented sync start/stop.......
>
> Have a look at oxygen_trigger() in sound/pci/oxygen/oxygen_pcm.c for a
> working sync start/stop implementation.
>
>>       snd_pcm_group_for_each_entry(substream, sub) {
>>
>>               rtd = substream->private_data;
>
> There is no guarantee the all linked substreams belong to the same card
> or the same driver; you have to check that first and ignore streams you
> don't know about.

ok

>
>>               if (sub != substream)
>>                       snd_pcm_trigger_done(substream, sub);
>
> You can just call snd_pcm_trigger_done() for every substream you handle.

ok

>
>>               ...
>>       }
>>       return 0;
>
> There is no common code for the two substreams.
> Is your hardware actually capable of starting them at exactly the same
> time?

Sync start is working. This is in the loop and starts the streams:
   bcom_enable(s->bcom_task);
s is set to two different values in the loop.

I'm having problems with the drain error on stop.

>
>
> Best regards,
> Clemens
>



-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list