From: "RKHenry" Subject: RE: error: broken pipe Date: Sun, 15 May 2005 10:20:26 -0400 Message-ID: <000f01c55959$3e793760$6501a8c0@rkh> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org Thanks for that. I've also been getting "Broken Pipe" messages. I = suspected that it was due to overruns (my application is a capture application). = For now I've been ignoring return values and have been concentrating on = getting the thing to work. I see that I'll need to handle the return value, even though in my particular application I can simply ignore overruns.=20 Oh, and sorry for those spurious blank messages. Somehow my e-mail = client settings were accidentally changed and those were sent inadvertently. Robert Henry -----Original Message----- From: alsa-devel-admin@lists.sourceforge.net [mailto:alsa-devel-admin@lists.sourceforge.net] On Behalf Of Jaroslav = Kysela Sent: Sunday, May 15, 2005 5:02 AM To: Christian Konrad Cc: alsa-devel@lists.sourceforge.net Subject: Re: [Alsa-devel] error: broken pipe On Sat, 14 May 2005, Christian Konrad wrote: > Hi! >=20 > what exactly does this error mean? This is just a sine-genrator and it > uses the following code: >=20 > while( (pcmreturn =3D snd_pcm_writei(pcm_handle, data, frames)) < 0) > { > =09 > switch(pcmreturn) > { > case EBADFD: cout << "EBADFD" << endl; break; > case EPIPE: cout << "Buffer underrun." << endl; break; > case ESTRPIPE: cout << "suspend. " << endl; break;=09 > default: cout << snd_strerror(pcmreturn) << endl; > } > =09 > =09 > snd_pcm_prepare(pcm_handle); > } >=20 > The only error I get is broken pipe (returned by snd_strerror). It's correct. You should check for negative values (e.g. -EPIPE) in your = switch statement. Jaroslav ----- Jaroslav Kysela Linux Kernel Sound Maintainer ALSA Project, SUSE Labs ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=3D7393&alloc_id=3D16281&op=3Dclick _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click