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 Sun, 25 Oct 1998, Andrea Arcangeli wrote:

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

The process sleep in the read(/dev/dsp). I can' t record at 16 bit.

#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 dsp = open("/dev/dsp",O_RDWR);
int fd = creat("/tmp/prova.raw", 0600);
#if 1
if (ioctl(dsp, SNDCTL_DSP_SETFMT, &format)==-1) {
perror("SNDCTL_DSP_SETFMT\n");
exit(1);
}
#endif
/* if (ioctl(dsp, SNDCTL_DSP_SPEED, &speed)==-1) {
perror("SNDCTL_DSP_SPEED\n");
exit(1);
}*/
for (;;) {
read(dsp,buf,BUFSIZE);
write(fd,buf,BUFSIZE);
}
}


With #if 0 everything works as expected instead. I could have missed
something in the schedule_timeout() update (it' s not in the stock
kernel). Could you try if running the proggy above on your sb16 put
something in /tmp/prova.raw?

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.173 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site