/* resetds16 -- calls AIO_RESET repeatedly to unhang "frozen" play or record routines. This doesn't always work (depending on the state of the device when it hung). Hopefully will never have to be used -- bgg */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "aireg.h" #include "aivar.h" #include #include #include "sfheader.h" #include main() { int devfd,i=100; struct aud_conv stuff; if ((devfd = open("/dev/ai0",0,2)) < 0) { fprintf(stderr,"can't open ds16 for reset...\n"); return(-1); } while(i--) ioctl(devfd,AIO_RESET); close(devfd); }