Merged pcm2 branch.

This commit is contained in:
Jaroslav Kysela 2000-05-08 18:54:14 +00:00
parent 228bf51025
commit b77ca419f6
4 changed files with 535 additions and 512 deletions

View file

@ -242,7 +242,7 @@ static char *mixer_help_text =
" F1 show Help screen\n"
" F2 show /proc info screen\n"
" Return return to main screen\n"
" Space toggle Record facility\n"
" Space toggle Capture facility\n"
" Tab toggle ExactMode\n"
" m M mute both channels\n"
" < > mute left/right channel\n"
@ -1575,10 +1575,12 @@ mixer_iteration (void)
case KEY_NPAGE:
mixer_set_delta(-5);
break;
#if 0
case KEY_BEG:
case KEY_HOME:
mixer_set_delta(100);
break;
#endif
case KEY_LL:
case KEY_END:
mixer_set_delta(-100);

View file

@ -340,8 +340,8 @@ static const char *speaker_position(int position)
static char str[32];
switch (position) {
case SND_MIXER_VOICE_UNUSED:
return "Unused";
case SND_MIXER_VOICE_UNKNOWN:
return "Unknown";
case SND_MIXER_VOICE_MONO:
return "Mono";
case SND_MIXER_VOICE_LEFT:
@ -495,6 +495,7 @@ int show_element_info(void *handle, snd_mixer_eid_t *eid, const char *space)
error("Mixer %i/%i info error: %s", card, device, snd_strerror(err));
return -1;
}
printf("%sInput/output voices: %i/%i\n", space, info.input_voices, info.output_voices);
switch (info.eid.type) {
case SND_MIXER_ETYPE_INPUT:
case SND_MIXER_ETYPE_OUTPUT:
@ -503,17 +504,10 @@ int show_element_info(void *handle, snd_mixer_eid_t *eid, const char *space)
info.data.io.attrib & SND_MIXER_EIO_DIGITAL ? " digital" : "");
}
for (idx = 0; idx < info.data.io.voices; idx++) {
if (!info.data.io.pvoices[idx].vindex) {
printf("%sVoice %i: %s\n",
space,
idx,
speaker_position(info.data.io.pvoices[idx].voice));
} else {
printf("%sVoice %i: %i\n",
space,
idx,
info.data.io.pvoices[idx].voice);
}
speaker_position(info.data.io.pvoices[idx].position));
}
break;
case SND_MIXER_ETYPE_CAPTURE1:
@ -554,14 +548,6 @@ int show_element_info(void *handle, snd_mixer_eid_t *eid, const char *space)
default:
printf("unknown %i\n", info.data.switch3.type);
}
for (idx = 0; idx < info.data.switch3.voices; idx++) {
snd_mixer_voice_t voice = info.data.switch3.pvoices[idx];
if (voice.vindex) {
printf("%sVoice %i: %i\n", space, idx, voice.voice);
} else {
printf("%sSpeaker %i: %s\n", space, idx, speaker_position(voice.voice));
}
}
break;
case SND_MIXER_ETYPE_VOLUME1:
for (idx = 0; idx < info.data.volume1.range; idx++) {
@ -698,28 +684,17 @@ int show_element_contents(void *handle, snd_mixer_eid_t *eid, const char *space)
printf("%sSwitch is %s\n", space, element.data.switch2.sw ? "ON" : "OFF");
break;
case SND_MIXER_ETYPE_SWITCH3:
if (element.data.switch3.rsw != info.data.switch3.voices * info.data.switch3.voices) {
if (element.data.switch3.rsw != info.input_voices * info.output_voices) {
error("Switch3 !!!\n");
goto __end;
}
for (idx = 0; idx < element.data.switch3.rsw; idx++) {
snd_mixer_voice_t input, output;
int val = snd_mixer_get_bit(element.data.switch3.prsw, idx);
printf("%sInput <", space);
input = info.data.switch3.pvoices[idx / info.data.switch3.voices];
output = info.data.switch3.pvoices[idx % info.data.switch3.voices];
if (input.vindex) {
printf("voice %i", input.voice);
} else {
printf(speaker_position(input.voice));
}
printf("> Output <");
if (output.vindex) {
printf("voice %i", output.voice);
} else {
printf(speaker_position(output.voice));
}
printf(">: Switch is %s\n", val ? "ON" : "OFF");
printf("%sInput <%i> Output <%i>: Switch is %s\n",
space,
idx / info.input_voices,
idx % info.output_voices,
val ? "ON" : "OFF");
}
break;
case SND_MIXER_ETYPE_VOLUME1:

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,7 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_YACC
AM_PROG_LEX
AM_PATH_ALSA(0.5.5)
AM_PATH_ALSA(0.6.0)
dnl Checks for header files.
AC_HEADER_STDC