Lines Matching refs:control

245 	struct control *control;
262 control = &controls[focus_control_index];
264 if (control->flags & TYPE_ENUM) {
265 err = snd_mixer_selem_get_enum_item(control->elem, ffs(control->enum_channel_bits) - 1, &index);
267 err = snd_mixer_selem_get_enum_item_name(control->elem, index, sizeof buf - 1, buf);
270 } else if (control->flags & (TYPE_PVOLUME | TYPE_CVOLUME)) {
273 if (control->flags & TYPE_PVOLUME)
277 if (!(control->flags & HAS_VOLUME_1)) {
278 err = get_vol_func(control->elem, control->volume_channels[0], &db);
285 err = get_vol_func(control->elem, control->volume_channels[0], &db);
287 err = get_vol_func(control->elem, control->volume_channels[1], &db2);
296 } else if (control->flags & TYPE_PSWITCH) {
297 if (!(control->flags & HAS_PSWITCH_1)) {
298 err = snd_mixer_selem_get_playback_switch(control->elem, control->pswitch_channels[0], &sw);
302 err = snd_mixer_selem_get_playback_switch(control->elem, control->pswitch_channels[0], &sw);
304 err = snd_mixer_selem_get_playback_switch(control->elem, control->pswitch_channels[1], &sw2);
308 } else if (control->flags & TYPE_CSWITCH) {
309 if (!(control->flags & HAS_CSWITCH_1)) {
310 err = snd_mixer_selem_get_capture_switch(control->elem, control->cswitch_channels[0], &sw);
314 err = snd_mixer_selem_get_capture_switch(control->elem, control->cswitch_channels[0], &sw);
316 err = snd_mixer_selem_get_capture_switch(control->elem, control->cswitch_channels[1], &sw2);
321 item_info = casprintf("%s%s", control->name, value_info ? value_info : "");
405 struct control *control;
417 control = &controls[control_index];
421 if (control->flags & IS_ACTIVE)
425 if (control->flags & (TYPE_PVOLUME | TYPE_CVOLUME)) {
433 control->flags & TYPE_PSWITCH ? ACS_LTEE : ACS_LLCORNER);
437 control->flags & TYPE_PSWITCH ? ACS_RTEE : ACS_LRCORNER);
438 } else if (control->flags & TYPE_PSWITCH) {
444 if (control->flags & TYPE_PSWITCH) {
452 if (control->flags & (TYPE_PVOLUME | TYPE_CVOLUME)) {
455 if (control->flags & TYPE_PVOLUME)
459 volumes[0] = get_vol_func(control->elem, control->volume_channels[0]);
460 if (control->flags & HAS_VOLUME_1)
461 volumes[1] = get_vol_func(control->elem, control->volume_channels[1]);
465 if (control->flags & IS_ACTIVE)
472 ch = ' ' | (control->flags & IS_ACTIVE ?
476 if (!(control->flags & IS_ACTIVE))
493 if (control->flags & IS_ACTIVE)
495 if (!(control->flags & HAS_VOLUME_1)) {
501 if (control->flags & IS_ACTIVE)
504 if (control->flags & IS_ACTIVE)
510 if (control->flags & TYPE_PSWITCH) {
511 err = snd_mixer_selem_get_playback_switch(control->elem, control->pswitch_channels[0], &switches[0]);
512 if (err >= 0 && (control->flags & HAS_PSWITCH_1))
513 err = snd_mixer_selem_get_playback_switch(control->elem, control->pswitch_channels[1], &switches[1]);
518 if (control->flags & IS_ACTIVE)
523 ? _("O")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_nomute : 0)
525 : _("M")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_mute : 0));
528 ? _("O")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_nomute : 0)
529 : _("M")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_mute : 0));
534 if (control->flags & TYPE_CSWITCH) {
535 err = snd_mixer_selem_get_capture_switch(control->elem, control->cswitch_channels[0], &switches[0]);
536 if (err >= 0 && (control->flags & HAS_CSWITCH_1))
537 err = snd_mixer_selem_get_capture_switch(control->elem, control->cswitch_channels[1], &switches[1]);
542 if (control->flags & IS_ACTIVE)
548 if (control->flags & IS_ACTIVE)
557 if (control->flags & IS_ACTIVE)
566 if (control->flags & IS_ACTIVE)
574 if (control->flags & TYPE_ENUM) {
575 err = snd_mixer_selem_get_enum_item(control->elem, ffs(control->enum_channel_bits) - 1, &index);
578 err = snd_mixer_selem_get_enum_item_name(control->elem, index, sizeof buf - 1, buf);
581 if (control->flags & IS_ACTIVE)
593 if (control->flags & IS_ACTIVE)
598 if (control->flags & IS_ACTIVE)
603 display_string_centered_in_control(name_y, col, control->name, control_name_width);
607 if (control->flags & IS_MULTICH) {
608 switch (control->flags & MULTICH_MASK) {