mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:45:42 +01:00
Set the device name for smixer_options
This commit is contained in:
parent
3121251d82
commit
734cb04e08
1 changed files with 5 additions and 4 deletions
|
@ -121,7 +121,7 @@ static int info(void)
|
||||||
error("Mixer open error: %s", snd_strerror(err));
|
error("Mixer open error: %s", snd_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if ((err = snd_mixer_attach(mhandle, card)) < 0) {
|
if (smixer_level == 0 && (err = snd_mixer_attach(mhandle, card)) < 0) {
|
||||||
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
||||||
snd_mixer_close(mhandle);
|
snd_mixer_close(mhandle);
|
||||||
return err;
|
return err;
|
||||||
|
@ -771,7 +771,7 @@ static int selems(int level)
|
||||||
error("Mixer %s open error: %s", card, snd_strerror(err));
|
error("Mixer %s open error: %s", card, snd_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if ((err = snd_mixer_attach(handle, card)) < 0) {
|
if (smixer_level == 0 && (err = snd_mixer_attach(handle, card)) < 0) {
|
||||||
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
||||||
snd_mixer_close(handle);
|
snd_mixer_close(handle);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1142,7 +1142,7 @@ static int sset(unsigned int argc, char *argv[], int roflag)
|
||||||
error("Mixer %s open error: %s\n", card, snd_strerror(err));
|
error("Mixer %s open error: %s\n", card, snd_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if ((err = snd_mixer_attach(handle, card)) < 0) {
|
if (smixer_level == 0 && (err = snd_mixer_attach(handle, card)) < 0) {
|
||||||
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
||||||
snd_mixer_close(handle);
|
snd_mixer_close(handle);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1424,7 +1424,7 @@ static int sevents(int argc ATTRIBUTE_UNUSED, char *argv[] ATTRIBUTE_UNUSED)
|
||||||
error("Mixer %s open error: %s", card, snd_strerror(err));
|
error("Mixer %s open error: %s", card, snd_strerror(err));
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
if ((err = snd_mixer_attach(handle, card)) < 0) {
|
if (smixer_level == 0 && (err = snd_mixer_attach(handle, card)) < 0) {
|
||||||
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
error("Mixer attach %s error: %s", card, snd_strerror(err));
|
||||||
snd_mixer_close(handle);
|
snd_mixer_close(handle);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1545,6 +1545,7 @@ int main(int argc, char *argv[])
|
||||||
help();
|
help();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
smixer_options.device = card;
|
||||||
if (argc - optind <= 0) {
|
if (argc - optind <= 0) {
|
||||||
return selems(LEVEL_BASIC | level) ? 1 : 0;
|
return selems(LEVEL_BASIC | level) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue