mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
mixer: change code formatting for selem_write_main()
This commit applies code format according to typical and moderate rule. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
2a6af83d73
commit
116dafcadc
1 changed files with 6 additions and 3 deletions
|
|
@ -588,8 +588,10 @@ static int selem_write_main(snd_mixer_elem_t *elem)
|
|||
return err;
|
||||
}
|
||||
if (s->ctls[CTL_GLOBAL_SWITCH].elem) {
|
||||
if (s->ctls[CTL_PLAYBACK_SWITCH].elem && s->ctls[CTL_CAPTURE_SWITCH].elem)
|
||||
err = elem_write_switch_constant(s, CTL_GLOBAL_SWITCH, 1);
|
||||
if (s->ctls[CTL_PLAYBACK_SWITCH].elem &&
|
||||
s->ctls[CTL_CAPTURE_SWITCH].elem)
|
||||
err = elem_write_switch_constant(s, CTL_GLOBAL_SWITCH,
|
||||
1);
|
||||
else
|
||||
err = elem_write_switch(s, SM_PLAY, CTL_GLOBAL_SWITCH);
|
||||
if (err < 0)
|
||||
|
|
@ -633,7 +635,8 @@ static int selem_write_main(snd_mixer_elem_t *elem)
|
|||
return err;
|
||||
for (idx = 0; idx < c->values; idx++) {
|
||||
if (s->str[SM_CAPT].sw & (1 << idx))
|
||||
snd_ctl_elem_value_set_enumerated(ctl, idx, s->capture_item);
|
||||
snd_ctl_elem_value_set_enumerated(ctl,
|
||||
idx, s->capture_item);
|
||||
}
|
||||
if ((err = snd_hctl_elem_write(c->elem, ctl)) < 0)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue