file = s;
}
err = snd_config_top(&top);
- if (err >= 0) {
- err = snd_input_stdio_open(&input, file, "r");
- if (err < 0) {
- snd_error(MIXER, "unable to open simple mixer configuration file '%s'", file);
- goto __error;
- }
- err = snd_config_load(top, input);
- snd_input_close(input);
- if (err < 0) {
- snd_error(MIXER, "%s may be old or corrupted: consider to remove or fix it", file);
- goto __error;
- }
- err = find_full(class, mixer, top, priv->device);
- if (err >= 0)
- goto __full;
+ if (err < 0)
+ goto __error;
+ err = snd_input_stdio_open(&input, file, "r");
+ if (err < 0) {
+ snd_error(MIXER, "unable to open simple mixer configuration file '%s'", file);
+ goto __error;
}
- if (err >= 0) {
- err = snd_ctl_open(&priv->ctl, priv->device, 0);
- if (err < 0) {
- snd_error(MIXER, "unable to open control device '%s': %s", priv->device, snd_strerror(err));
- goto __error;
- }
- err = snd_hctl_open_ctl(&priv->hctl, priv->ctl);
- if (err < 0)
- goto __error;
- err = snd_ctl_card_info_malloc(&priv->info);
- if (err < 0)
- goto __error;
- err = snd_ctl_card_info(priv->ctl, priv->info);
- if (err < 0)
- goto __error;
+ err = snd_config_load(top, input);
+ snd_input_close(input);
+ if (err < 0) {
+ snd_error(MIXER, "%s may be old or corrupted: consider to remove or fix it", file);
+ goto __error;
+ }
+ err = find_full(class, mixer, top, priv->device);
+ if (err >= 0)
+ goto __full;
+ err = snd_ctl_open(&priv->ctl, priv->device, 0);
+ if (err < 0) {
+ snd_error(MIXER, "unable to open control device '%s': %s", priv->device, snd_strerror(err));
+ goto __error;
}
+ err = snd_hctl_open_ctl(&priv->hctl, priv->ctl);
+ if (err < 0)
+ goto __error;
+ err = snd_ctl_card_info_malloc(&priv->info);
+ if (err < 0)
+ goto __error;
+ err = snd_ctl_card_info(priv->ctl, priv->info);
+ if (err < 0)
+ goto __error;
if (err >= 0)
err = find_module(class, top);
if (err >= 0)