LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-09-2005, 07:24 AM   #1
MatesL
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Rep: Reputation: 0
Broken Pipe with ALSA


Dear forum,

i've created a programm for audio streaming via network. But there's a problem with audio playback. Sometimes (~70%) when i start my application the writei() call returns the "broken pipe" error code. Can anybody tell me, what this is about? And what does "broken pipe" mean anyway?

thanks in advance

Michael
 
Old 11-09-2005, 09:09 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: Kennesaw, GA
Distribution: Ubuntu
Posts: 8,502

Rep: Reputation: 110Reputation: 110
Broken Pipe usually indicates that the connection between the two ends has been lost.
 
Old 11-09-2005, 01:22 PM   #3
MatesL
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Ok, thats plausible.

But I'm wondering why this happens.

Is it possible I'm not writing new data fast enough, so that the buffer gets empty?
 
Old 11-09-2005, 08:17 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 47
not that i know alot about it but that errno is EPIPE
when sockets were introduced in 4.2BSD, pipes were reimplemented as sockets.
A process tried to read or write to a pipe where the other end of the pipe no longer exists.

you might want to try send() it's a little easier to controll than write.

generally i think read() will block until there is some data to return so you have to syncronize in some way
 
Old 11-10-2005, 03:44 AM   #5
MatesL
LQ Newbie
 
Registered: Nov 2005
Posts: 3

Original Poster
Rep: Reputation: 0
I don't get it, let's see if you mean the same thing.

my code looks like:

Code:
while (1) {
   udp->receive(buf1);
   decode(buf1,buf2);
   err = snd_pcm_writei(handle, buf2, length);
   if (err == -EAGAIN)
       xrun_recovery(handle);
}

here snd_pcm_writei returns EAGAIN ("Broken Pipe").

Last edited by MatesL; 11-10-2005 at 03:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken pipe? Nubian Linux - Newbie 2 08-16-2005 08:56 AM
broken pipe in mozilla? cubfan425 Linux - Newbie 1 03-15-2004 09:06 AM
Broken pipe ? Red evil Linux - Software 1 01-16-2004 05:01 AM
Broken Pipe Cynthia Blue Linux - Newbie 0 12-30-2002 02:31 PM
ls - Broken pipe vcheah Linux - Software 2 10-30-2002 08:10 PM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration