174
174
for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
177
if (!strncmp(cc, "IDEV", (size_t) 4)) {
178
sscanf(ca, "%s", ab);
179
strcpy(cf_i_dev, ab);
177
if (!strncmp(cc, "IDEV", 4) &&
178
1 == sscanf(ca, "%99s", ab)) {
179
strncpy(cf_i_dev, ab, sizeof(cf_i_dev));
180
180
printf("idev <%s>\n", ab);
181
} else if (!strncmp(cc, "CDEV", (size_t) 4)) {
182
sscanf(ca, "%s", ab);
183
strcpy(cf_c_dev, ab);
181
} else if (!strncmp(cc, "CDEV", 4) &&
182
1 == sscanf(ca, "%99s", ab)) {
183
strncpy(cf_c_dev, ab, sizeof(cf_c_dev));
184
184
printf("cdev <%s>\n", ab);
185
} else if (!strncmp(cc, "AGC", (size_t) 3)) {
186
sscanf(ca, "%s", ab);
185
} else if (!strncmp(cc, "AGC", 3) &&
186
1 == sscanf(ca, "%99s", ab)) {
187
strncpy(cf_agc, ab, sizeof(cf_agc));
188
188
printf("agc <%s> %d\n", ab, i);
189
} else if (!strncmp(cc, "MONITOR", (size_t) 7)) {
190
sscanf(ca, "%s", ab);
191
strcpy(cf_monitor, ab);
189
} else if (!strncmp(cc, "MONITOR", 7) &&
190
1 == sscanf(ca, "%99s", ab)) {
191
strncpy(cf_monitor, ab, sizeof(cf_monitor));
192
192
printf("monitor <%s> %d\n", ab, mixer_name(ab, -1));
388
388
r = 0 ; /* setting to zero nicely mutes the channel */
392
rval = ioctl(ctl_fd, agc, &l);
395
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_LINE, &l);
397
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_MIC, &l);
391
if (cf_agc[0] != '\0')
392
rval = ioctl(ctl_fd, agc, &l);
395
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_LINE, &l);
397
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_MIC, &l);
400
399
printf("audio_gain: agc write: %s\n", strerror(errno));
404
403
if (o_mongain != mongain) {
408
407
printf("audio_gain: mongain %d/%d\n", mongain, l);
412
rval = ioctl(ctl_fd, monitor, &l );
414
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_VOLUME, &l);
410
if (cf_monitor[0] != '\0')
411
rval = ioctl(ctl_fd, monitor, &l );
413
rval = ioctl(ctl_fd, SOUND_MIXER_WRITE_VOLUME,
416
416
printf("audio_gain: mongain write: %s\n",
417
417
strerror(errno));