lkml.org 
[lkml]   [1998]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sb16 duplex and quake
On Tue, 20 Oct 1998, Daniel J. Rodriksson wrote:

>Found the problem
>
>Quake is opening the device for both read and write
>( maybe a conference amongst the participants was in mind ? )

This trivial fullduplex proggy that was working fine with my sb-duplex
patch doesn' t work with your one (and so with 126):

#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/soundcard.h>

#define BUFSIZE 1024
void main(void)
{
int format = AFMT_S16_LE;
/* int speed = 8000;*/
char buf[BUFSIZE];
int fds[2];
int dsp = open("/dev/dsp",O_RDWR);
if (ioctl(dsp, SNDCTL_DSP_SETFMT, &format)==-1) {
perror("SNDCTL_DSP_SETFMT\n");
exit(1);
}
/* if (ioctl(dsp, SNDCTL_DSP_SPEED, &speed)==-1) {
perror("SNDCTL_DSP_SPEED\n");
exit(1);
}*/
pipe(fds);
if(fork())
for (;;) {
read(dsp,buf,BUFSIZE);
write(fds[1],buf,BUFSIZE);
}
else
for (;;) {
read(fds[0],buf,BUFSIZE);
write(dsp,buf,BUFSIZE);
}
}
While it _not_ works I get many:

Oct 25 19:20:55 dragon kernel: Sound: DMA (input) timed out - IRQ/DRQ config error?

Andrea Arcangeli



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.411 / U:0.256 seconds]
©2003-2014 Jasper Spaans. Advertise on this site