From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 0/3] pcm_file report EIO when fail to write to debug file Date: Wed, 03 Jul 2019 14:23:59 +0200 Message-ID: References: <1561987518-2828-1-git-send-email-amiartus@de.adit-jv.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 909F8F800F6 for ; Wed, 3 Jul 2019 14:23:59 +0200 (CEST) In-Reply-To: <1561987518-2828-1-git-send-email-amiartus@de.adit-jv.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Adam Miartus Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Mon, 01 Jul 2019 15:25:15 +0200, Adam Miartus wrote: > > Previously, I introduced a patch that may return EPIPE error when pcm_file > plugin fails to write to output file for some reason. > > The purpose of reporting the error was to evade assert in code to allow > API user error handling and recovery, or more clarity in debugging. > > Failing to write to a file usually means bad file descriptor, running > out of free memory, insufficient file permissions or in case file > is a pipe there may be other reasons preventing the write operation. > All these are not easily recoverable by restaring playback as EPIPE > error which is used to signal XRUN might suggest. Therefore, use EIO > to signal a different kind of error. > > write_wav_header function is refactored a bit for more detailed > error handling in case of failed write operation. > > Adam Miartus (3): > pcm_file: use EIO instead of EPIPE when failing to write output file > pcm_file: improve error checking in write_wav_header function > pcm_file: in case of failed write clear file buffer variables I applied patches 1 and 3. Could you resubmit patch 2 after correction? thanks, Takashi