Re: Implementing sync start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> 		if (sub != substream)
> 			snd_pcm_trigger_done(substream, sub);

You can just call snd_pcm_trigger_done() for every substream you handle.

> 		...
> 	}
> 	return 0;

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


Best regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux