From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: snd_pcm_close hangs Date: Mon, 10 Jun 2002 16:22:27 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from Cantor.suse.de (ns.suse.de [213.95.15.193]) by alsa.alsa-project.org (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id QAA20959 for ; Mon, 10 Jun 2002 16:22:32 +0200 In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Tim Goetze Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 4 Jun 2002 23:10:20 +0200 (CEST), Tim Goetze wrote: > > Takashi Iwai wrote: > > [...] > > >so far, so good.. > > > >> calling snd_pcm_close() takes a few seconds during which i see > >> this: > >> > >> [~] cat /proc/asound/ice/pcm0p/sub0/status > >> state: DRAINING > >> trigger_time: 1023125380.999721 > >> tstamp : 1023125381.905192 > >> delay : -39746 > >> avail : 40002 > >> avail_max : 40002 > >> ----- > >> hw_ptr : 40002 > >> appl_ptr : 256 > > > >the minus delay value is definitely wrong. > >something weird goes there... > >could you check sw_params during this happens? > > yes i could, but i won't if you don't insist (they don't change anyway > iirc). instead i have done some more investigations: > > remember capture + play are linked, and audio data has been written. > now draining the playback stream *always* fails in the way already > described. oh, then it's related with the linkage... > consequences: if you close capture first and then playback, things > work ok. if you unlink the streams before closing them, things work > ok, and the order of closing does not matter. > > i have attached testing boilerplate code that you can use to > reproduce the error. thanks, i'll test this later. Takashi _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink