Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: alsa-devel mailing list <alsa-devel@alsa-project.org>
Subject: Re: Implementing sync start
Date: Mon, 10 Aug 2009 09:40:58 +0200	[thread overview]
Message-ID: <4A7FCF0A.1000806@ladisch.de> (raw)
In-Reply-To: <9e4733910908091919o617eb1b8r44436cd87a6873ff@mail.gmail.com>

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

  reply	other threads:[~2009-08-10  7:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-08 18:16 Implementing sync start Jon Smirl
2009-08-09  3:07 ` Jon Smirl
2009-08-10  2:13   ` Jon Smirl
2009-08-10  2:19     ` Jon Smirl
2009-08-10  7:40       ` Clemens Ladisch [this message]
2009-08-10 11:45         ` Jon Smirl
2009-08-10 11:57           ` Clemens Ladisch
2009-08-10 12:24             ` Jon Smirl
2009-08-10 12:29               ` Clemens Ladisch
2009-08-10 12:41                 ` Jon Smirl
2009-08-10 12:43                   ` Mark Brown
2009-08-10 12:46                     ` Jon Smirl
2009-08-10 13:30                       ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A7FCF0A.1000806@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=jonsmirl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox