* Sound Programming and Signals @ 2002-06-13 19:41 Chuck Winters 2002-06-13 21:48 ` Glynn Clements 0 siblings, 1 reply; 3+ messages in thread From: Chuck Winters @ 2002-06-13 19:41 UTC (permalink / raw) To: linux-c-programming I am trying to write a program which get a SIGIO signal from a sound device, and then selects on the fd to decide if the device can accept write, read, exception data. The problem is that it doesn't seem like the device every raises a SIGIO signal. If I do a kill -SIGIO <test_pid>, my handler runs. Anyone have any ideas? Chuck ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Sound Programming and Signals 2002-06-13 19:41 Sound Programming and Signals Chuck Winters @ 2002-06-13 21:48 ` Glynn Clements 2002-06-14 1:25 ` chuckw 0 siblings, 1 reply; 3+ messages in thread From: Glynn Clements @ 2002-06-13 21:48 UTC (permalink / raw) To: Chuck Winters; +Cc: linux-c-programming Chuck Winters wrote: > I am trying to write a program which get a SIGIO signal from a > sound device, and then selects on the fd to decide if the device > can accept write, read, exception data. The problem is that > it doesn't seem like the device every raises a SIGIO signal. If > I do a kill -SIGIO <test_pid>, my handler runs. Anyone have any ideas? 1. Did you set the O_ASYNC flag on the descriptor, either in the call to open(), or with a subsequent call to fcntl(fd, F_SETFL, O_ASYNC)? 2. Did you set the target process ID with fcntl(fd, F_SETOWN, pid)? If you have done both of these, but you still don't receive SIGIO, then I would suspect that it's a limitation of the sound card driver. -- Glynn Clements <glynn.clements@virgin.net> ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Sound Programming and Signals 2002-06-13 21:48 ` Glynn Clements @ 2002-06-14 1:25 ` chuckw 0 siblings, 0 replies; 3+ messages in thread From: chuckw @ 2002-06-14 1:25 UTC (permalink / raw) To: linux-c-programming On Thu, Jun 13, 2002 at 10:48:00PM +0100, Glynn Clements wrote: > > Chuck Winters wrote: > > > I am trying to write a program which get a SIGIO signal from a > > sound device, and then selects on the fd to decide if the device > > can accept write, read, exception data. The problem is that > > it doesn't seem like the device every raises a SIGIO signal. If > > I do a kill -SIGIO <test_pid>, my handler runs. Anyone have any ideas? > > 1. Did you set the O_ASYNC flag on the descriptor, either in the call > to open(), or with a subsequent call to fcntl(fd, F_SETFL, O_ASYNC)? I used fcntl(fd, F_SETFL, f_flags|F_ASYNC) after I used the F_SETOWN fcntl. > > 2. Did you set the target process ID with fcntl(fd, F_SETOWN, pid)? > > If you have done both of these, but you still don't receive SIGIO, > then I would suspect that it's a limitation of the sound card driver. That really sucks then. I thought all the drivers would support that. Thanks Chuck ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-06-14 1:25 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-06-13 19:41 Sound Programming and Signals Chuck Winters 2002-06-13 21:48 ` Glynn Clements 2002-06-14 1:25 ` chuckw
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox