From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] Kernel crash Date: Fri, 17 Sep 2004 12:22:07 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20040911210212.317d930b.pochini@shiny.it> <20040913220729.466531ce.pochini@shiny.it> <20040915195008.33713acb.pochini@shiny.it> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Jaroslav Kysela Cc: Giuliano Pochini , alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Fri, 17 Sep 2004 08:54:40 +0200 (CEST), Jaroslav wrote: > > On Wed, 15 Sep 2004, Giuliano Pochini wrote: > > > snd_pcm_playback_drain() (when state=RUNNING) calls > > snd_pcm_change_state(DRAINING). When substreams are linked, it changes the > > state of all linked substreams *without* passing through > > snd_pcm_capture_drain(DRAINING). > > Guys, it's because Takashi changed the linked stream behaviour at some > time. The first definition for linked streams was that only start of all > stream was linked. The drain/drop operations were separated. No, it's because snd_pcm_*_drain() and snd_pcm_*_drop() call snd_pcm_start(), snd_pcm_stop() and snd_pcm_change_state() internally. These three functions change the state of all linked streams (the last one does even unconditionally). Well, hey, this was coded so since long long time ago ;) > The linking makes sense for hardware that support that. Otherwise, we can > start streams in most close time, but draining and dropping doesn't make > much sense, because different clocking sources for different cards will > produce jitter, thus there is no real sync and application must care. Agreed. I've assumed that drain/drop are supposed to be synchronous, but they should not. > I suggest to return back to state when only snd_pcm_start() > is synchronized. > > You can look to pcm_multi.c and test/latency.c - the drop/drain is called > for all streams. JACK does it, too. I'll rewrite the patch now... Takashi ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php