Lines Matching defs:dsp_fd
49 static int dsp_fd = -1;
80 if (ioctl(dsp_fd, AUDIO_SETINFO, &info) == -1)
84 if (ioctl(dsp_fd, I_FLUSH, FLUSHR) == -1)
100 if (ioctl(dsp_fd, AUDIO_SETINFO, &info) == -1)
109 if (dsp_fd == -1)
113 FD_SET(dsp_fd, wfds);
115 FD_SET(dsp_fd, rfds);
116 if (dsp_fd > *n)
117 *n = dsp_fd;
123 if (FD_ISSET(dsp_fd, wfds))
125 if (FD_ISSET(dsp_fd, rfds))
134 if (dsp_fd != -1)
154 dsp_fd = open(dsp_dev, O_RDWR | O_NONBLOCK);
155 if (dsp_fd != -1)
159 if ((ioctl(dsp_fd, AUDIO_GETINFO, &info) == -1)
162 close(dsp_fd);
163 dsp_fd = -1;
167 if (dsp_fd == -1)
171 dsp_fd = open(dsp_dev, dsp_mode | O_NONBLOCK);
172 if (dsp_fd == -1)
186 close(dsp_fd);
187 dsp_fd = -1;
205 close(dsp_fd);
206 dsp_fd = -1;
225 ioctl(dsp_fd, I_FLUSH, FLUSHW);
228 ioctl(dsp_fd, AUDIO_FLUSH, NULL);
306 ioctl(dsp_fd, AUDIO_DRAIN, 0);
367 if (ioctl(dsp_fd, AUDIO_SETINFO, &info) == -1)
407 if (ioctl(dsp_fd, AUDIO_SETINFO, &info) == -1)
430 len = write(dsp_fd, out->p, (len > MAX_LEN) ? MAX_LEN : len);
455 if (ioctl(dsp_fd, AUDIO_GETINFO, &info) != -1)
471 len = read(dsp_fd, buffer, sizeof(buffer) / 2);