mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-11 05:33:43 -04:00
mixer: abst - reshuffle snd_mixer_simple_basic_register code to be more logical
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
b97a11ecf0
commit
f0679e5de2
1 changed files with 28 additions and 30 deletions
|
|
@ -305,7 +305,8 @@ int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
|
||||||
file = s;
|
file = s;
|
||||||
}
|
}
|
||||||
err = snd_config_top(&top);
|
err = snd_config_top(&top);
|
||||||
if (err >= 0) {
|
if (err < 0)
|
||||||
|
goto __error;
|
||||||
err = snd_input_stdio_open(&input, file, "r");
|
err = snd_input_stdio_open(&input, file, "r");
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_error(MIXER, "unable to open simple mixer configuration file '%s'", file);
|
snd_error(MIXER, "unable to open simple mixer configuration file '%s'", file);
|
||||||
|
|
@ -320,8 +321,6 @@ int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
|
||||||
err = find_full(class, mixer, top, priv->device);
|
err = find_full(class, mixer, top, priv->device);
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
goto __full;
|
goto __full;
|
||||||
}
|
|
||||||
if (err >= 0) {
|
|
||||||
err = snd_ctl_open(&priv->ctl, priv->device, 0);
|
err = snd_ctl_open(&priv->ctl, priv->device, 0);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_error(MIXER, "unable to open control device '%s': %s", priv->device, snd_strerror(err));
|
snd_error(MIXER, "unable to open control device '%s': %s", priv->device, snd_strerror(err));
|
||||||
|
|
@ -336,7 +335,6 @@ int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
|
||||||
err = snd_ctl_card_info(priv->ctl, priv->info);
|
err = snd_ctl_card_info(priv->ctl, priv->info);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto __error;
|
goto __error;
|
||||||
}
|
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
err = find_module(class, top);
|
err = find_module(class, top);
|
||||||
if (err >= 0)
|
if (err >= 0)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue