Lines Matching +full:itu +full:- +full:r
2 * audio.c - audio interface for reference clock audio drivers
51 * 4.4BSD-Lite switched to an unsigned long ioctl arg. Detect common
102 ? -1
124 * util/audio-pcm program.
139 if ((fd = fopen(device, "r")) == NULL) {
143 if ((fd = fopen(device, "r")) == NULL) {
147 if ((fd = fopen(device, "r")) == NULL) {
165 i > 0 && isascii((unsigned char)line[i - 1]) && isspace((unsigned char)line[i - 1]);
167 line[--i] = '\0';
206 printf("monitor <%s> %d\n", ab, mixer_name(ab, -1));
215 * audio_init - open and initialize audio device
222 * (1) and encoding (ITU-T G.711 mu-law companded) have been set by
229 int unit /* device unit (0-3) */
291 if (ioctl(fd, AIOGSIZE, &s_size) == -1)
301 if (ioctl(fd, AIOSSIZE, &s_size) == -1)
311 if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &tmp) == -1)
318 if (ioctl(fd, AIOGFMT, &s_c_p) == -1)
327 if (ioctl(ctl_fd, SOUND_MIXER_READ_DEVMASK, &devmask) == -1)
329 if (ioctl(ctl_fd, SOUND_MIXER_READ_RECMASK, &recmask) == -1)
378 * audio_gain - adjust codec gains and port
382 int gain, /* volume level (gain) 0-255 */
383 int mongain, /* input to output mix (monitor gain) 0-255 */
388 static int o_mongain = -1;
389 static int o_port = -1;
392 int l, r;
398 r = l = 100 * gain / 255; /* Normalize to 0-100 */
405 r = 0 ; /* setting to zero nicely mutes the channel */
407 l |= r << 8;
416 if (-1 == rval) {
422 r = l = 100 * mongain / 255; /* Normalize to 0-100 */
427 l |= r << 8;
433 if (-1 == rval) {
448 if (rval == -1) {
455 if (ioctl(ctl_fd, SOUND_MIXER_READ_RECSRC, &l) == -1)
485 * audio_show - display audio parameters
497 if (ioctl(ctl_fd, SOUND_MIXER_READ_RECSRC, &recsrc) == -1)