From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: Event flood on USB disconnect Date: Mon, 03 Oct 2011 23:50:41 +0200 Message-ID: <4E8A2E31.2080002@ladisch.de> References: <1317459007.6559.18.camel@snowflake> <4E89741B.3050602@colin.guthr.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by alsa0.perex.cz (Postfix) with ESMTP id 103B810394A for ; Mon, 3 Oct 2011 23:51:19 +0200 (CEST) In-Reply-To: <4E89741B.3050602@colin.guthr.ie> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Colin Guthrie Cc: Arun Raghavan , ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org Colin Guthrie wrote: > Would a POLLERR|POLLNVAL be received any time > when normal operations will continue afterwards? e.g. should we use this > error as an indicator to ignore it forever or, e.g., just for a finite > period of time like 1s. POLLERR means that the PCM device is in a state where it cannot transfer data. This typically happens on an xrun or when the device is unplugged, if the first system call after that event is poll() and not write(). The error handling should be the same (snd_pcm_prepare(), which might fail). A disconnected device returns POLLERR|POLLNVAL, while any other error state returns POLLOUT|POLLERR. Regards, Clemens