mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
mixer: change code formatting for simple_add1()
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
43ac77e900
commit
98194d5f98
1 changed files with 14 additions and 9 deletions
|
|
@ -1527,8 +1527,10 @@ static int simple_add1(snd_mixer_class_t *class, const char *name,
|
||||||
simple->selem.id = id;
|
simple->selem.id = id;
|
||||||
simple->selem.ops = &simple_none_ops;
|
simple->selem.ops = &simple_none_ops;
|
||||||
err = snd_mixer_elem_new(&melem, SND_MIXER_ELEM_SIMPLE,
|
err = snd_mixer_elem_new(&melem, SND_MIXER_ELEM_SIMPLE,
|
||||||
get_compare_weight(snd_mixer_selem_id_get_name(simple->selem.id), snd_mixer_selem_id_get_index(simple->selem.id)),
|
get_compare_weight(
|
||||||
simple, selem_free);
|
snd_mixer_selem_id_get_name(simple->selem.id),
|
||||||
|
snd_mixer_selem_id_get_index(simple->selem.id)),
|
||||||
|
simple, selem_free);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_mixer_selem_id_free(id);
|
snd_mixer_selem_id_free(id);
|
||||||
free(simple);
|
free(simple);
|
||||||
|
|
@ -1541,11 +1543,12 @@ static int simple_add1(snd_mixer_class_t *class, const char *name,
|
||||||
}
|
}
|
||||||
if (simple->ctls[type].elem) {
|
if (simple->ctls[type].elem) {
|
||||||
SNDERR("helem (%s,'%s',%u,%u,%u) appears twice or more",
|
SNDERR("helem (%s,'%s',%u,%u,%u) appears twice or more",
|
||||||
snd_ctl_elem_iface_name(snd_hctl_elem_get_interface(helem)),
|
snd_ctl_elem_iface_name(
|
||||||
snd_hctl_elem_get_name(helem),
|
snd_hctl_elem_get_interface(helem)),
|
||||||
snd_hctl_elem_get_index(helem),
|
snd_hctl_elem_get_name(helem),
|
||||||
snd_hctl_elem_get_device(helem),
|
snd_hctl_elem_get_index(helem),
|
||||||
snd_hctl_elem_get_subdevice(helem));
|
snd_hctl_elem_get_device(helem),
|
||||||
|
snd_hctl_elem_get_subdevice(helem));
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto __error;
|
goto __error;
|
||||||
}
|
}
|
||||||
|
|
@ -1560,8 +1563,10 @@ static int simple_add1(snd_mixer_class_t *class, const char *name,
|
||||||
simple->ctls[type].max = snd_ctl_elem_info_get_items(info);
|
simple->ctls[type].max = snd_ctl_elem_info_get_items(info);
|
||||||
} else {
|
} else {
|
||||||
if (ctype == SND_CTL_ELEM_TYPE_INTEGER) {
|
if (ctype == SND_CTL_ELEM_TYPE_INTEGER) {
|
||||||
simple->ctls[type].min = snd_ctl_elem_info_get_min(info);
|
simple->ctls[type].min =
|
||||||
simple->ctls[type].max = snd_ctl_elem_info_get_max(info);
|
snd_ctl_elem_info_get_min(info);
|
||||||
|
simple->ctls[type].max =
|
||||||
|
snd_ctl_elem_info_get_max(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue