Lines Matching full:ctl
499 static int wm8776_bit_switch_get(struct snd_kcontrol *ctl, in wm8776_bit_switch_get() argument
502 struct oxygen *chip = ctl->private_data; in wm8776_bit_switch_get()
504 u16 bit = ctl->private_value & 0xffff; in wm8776_bit_switch_get()
505 unsigned int reg_index = (ctl->private_value >> 16) & 0xff; in wm8776_bit_switch_get()
506 bool invert = (ctl->private_value >> 24) & 1; in wm8776_bit_switch_get()
513 static int wm8776_bit_switch_put(struct snd_kcontrol *ctl, in wm8776_bit_switch_put() argument
516 struct oxygen *chip = ctl->private_data; in wm8776_bit_switch_put()
518 u16 bit = ctl->private_value & 0xffff; in wm8776_bit_switch_put()
520 unsigned int reg_index = (ctl->private_value >> 16) & 0xff; in wm8776_bit_switch_put()
521 bool invert = (ctl->private_value >> 24) & 1; in wm8776_bit_switch_put()
535 static int wm8776_field_enum_info(struct snd_kcontrol *ctl, in wm8776_field_enum_info() argument
571 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_enum_info()
572 switch ((ctl->private_value >> 24) & 0x1f) { in wm8776_field_enum_info()
577 if (((ctl->private_value >> 20) & 0xf) == 0) { in wm8776_field_enum_info()
578 if (ctl->private_value & LC_CONTROL_LIMITER) in wm8776_field_enum_info()
583 if (ctl->private_value & LC_CONTROL_LIMITER) in wm8776_field_enum_info()
598 static int wm8776_field_volume_info(struct snd_kcontrol *ctl, in wm8776_field_volume_info() argument
603 info->value.integer.min = (ctl->private_value >> 8) & 0xf; in wm8776_field_volume_info()
604 info->value.integer.max = (ctl->private_value >> 12) & 0xf; in wm8776_field_volume_info()
608 static void wm8776_field_set_from_ctl(struct snd_kcontrol *ctl) in wm8776_field_set_from_ctl() argument
610 struct oxygen *chip = ctl->private_data; in wm8776_field_set_from_ctl()
622 if (!(ctl->private_value & mode)) in wm8776_field_set_from_ctl()
625 value = ctl->private_value & 0xf; in wm8776_field_set_from_ctl()
626 min = (ctl->private_value >> 8) & 0xf; in wm8776_field_set_from_ctl()
627 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_set_from_ctl()
628 mask = (ctl->private_value >> 16) & 0xf; in wm8776_field_set_from_ctl()
629 shift = (ctl->private_value >> 20) & 0xf; in wm8776_field_set_from_ctl()
630 reg_index = (ctl->private_value >> 24) & 0x1f; in wm8776_field_set_from_ctl()
631 invert = (ctl->private_value >> 29) & 0x1; in wm8776_field_set_from_ctl()
641 static int wm8776_field_set(struct snd_kcontrol *ctl, unsigned int value) in wm8776_field_set() argument
643 struct oxygen *chip = ctl->private_data; in wm8776_field_set()
647 min = (ctl->private_value >> 8) & 0xf; in wm8776_field_set()
648 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_set()
652 changed = value != (ctl->private_value & 0xf); in wm8776_field_set()
654 ctl->private_value = (ctl->private_value & ~0xf) | value; in wm8776_field_set()
655 wm8776_field_set_from_ctl(ctl); in wm8776_field_set()
661 static int wm8776_field_enum_get(struct snd_kcontrol *ctl, in wm8776_field_enum_get() argument
664 value->value.enumerated.item[0] = ctl->private_value & 0xf; in wm8776_field_enum_get()
668 static int wm8776_field_volume_get(struct snd_kcontrol *ctl, in wm8776_field_volume_get() argument
671 value->value.integer.value[0] = ctl->private_value & 0xf; in wm8776_field_volume_get()
675 static int wm8776_field_enum_put(struct snd_kcontrol *ctl, in wm8776_field_enum_put() argument
678 return wm8776_field_set(ctl, value->value.enumerated.item[0]); in wm8776_field_enum_put()
681 static int wm8776_field_volume_put(struct snd_kcontrol *ctl, in wm8776_field_volume_put() argument
684 return wm8776_field_set(ctl, value->value.integer.value[0]); in wm8776_field_volume_put()
687 static int wm8776_hp_vol_info(struct snd_kcontrol *ctl, in wm8776_hp_vol_info() argument
697 static int wm8776_hp_vol_get(struct snd_kcontrol *ctl, in wm8776_hp_vol_get() argument
700 struct oxygen *chip = ctl->private_data; in wm8776_hp_vol_get()
712 static int wm8776_hp_vol_put(struct snd_kcontrol *ctl, in wm8776_hp_vol_put() argument
715 struct oxygen *chip = ctl->private_data; in wm8776_hp_vol_put()
751 static int wm8776_input_mux_get(struct snd_kcontrol *ctl, in wm8776_input_mux_get() argument
754 struct oxygen *chip = ctl->private_data; in wm8776_input_mux_get()
756 unsigned int mux_bit = ctl->private_value; in wm8776_input_mux_get()
763 static int wm8776_input_mux_put(struct snd_kcontrol *ctl, in wm8776_input_mux_put() argument
766 struct oxygen *chip = ctl->private_data; in wm8776_input_mux_put()
769 unsigned int mux_bit = ctl->private_value; in wm8776_input_mux_put()
801 static int wm8776_input_vol_info(struct snd_kcontrol *ctl, in wm8776_input_vol_info() argument
811 static int wm8776_input_vol_get(struct snd_kcontrol *ctl, in wm8776_input_vol_get() argument
814 struct oxygen *chip = ctl->private_data; in wm8776_input_vol_get()
826 static int wm8776_input_vol_put(struct snd_kcontrol *ctl, in wm8776_input_vol_put() argument
829 struct oxygen *chip = ctl->private_data; in wm8776_input_vol_put()
846 static int wm8776_level_control_info(struct snd_kcontrol *ctl, in wm8776_level_control_info() argument
856 static int wm8776_level_control_get(struct snd_kcontrol *ctl, in wm8776_level_control_get() argument
859 struct oxygen *chip = ctl->private_data; in wm8776_level_control_get()
873 struct snd_kcontrol *ctl, unsigned int mode) in activate_control() argument
877 if (ctl->private_value & mode) in activate_control()
881 if ((ctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_INACTIVE) != access) { in activate_control()
882 ctl->vd[0].access ^= SNDRV_CTL_ELEM_ACCESS_INACTIVE; in activate_control()
883 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO, &ctl->id); in activate_control()
887 static int wm8776_level_control_put(struct snd_kcontrol *ctl, in wm8776_level_control_put() argument
890 struct oxygen *chip = ctl->private_data; in wm8776_level_control_put()
899 changed = value->value.enumerated.item[0] != ctl->private_value; in wm8776_level_control_put()
901 ctl->private_value = value->value.enumerated.item[0]; in wm8776_level_control_put()
933 static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info) in hpf_info() argument
942 static int hpf_get(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_get() argument
944 struct oxygen *chip = ctl->private_data; in hpf_get()
952 static int hpf_put(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_put() argument
954 struct oxygen *chip = ctl->private_data; in hpf_put()
1161 struct snd_kcontrol *ctl; in add_lc_controls() local
1166 ctl = snd_ctl_new1(&lc_controls[i], chip); in add_lc_controls()
1167 if (!ctl) in add_lc_controls()
1169 err = snd_ctl_add(chip->card, ctl); in add_lc_controls()
1172 data->lc_controls[i] = ctl; in add_lc_controls()
1181 struct snd_kcontrol *ctl; in xonar_ds_mixer_init() local
1185 ctl = snd_ctl_new1(&ds_controls[i], chip); in xonar_ds_mixer_init()
1186 if (!ctl) in xonar_ds_mixer_init()
1188 err = snd_ctl_add(chip->card, ctl); in xonar_ds_mixer_init()
1191 if (!strcmp(ctl->id.name, "Line Capture Switch")) in xonar_ds_mixer_init()
1192 data->line_adcmux_control = ctl; in xonar_ds_mixer_init()
1193 else if (!strcmp(ctl->id.name, "Mic Capture Switch")) in xonar_ds_mixer_init()
1194 data->mic_adcmux_control = ctl; in xonar_ds_mixer_init()
1205 struct snd_kcontrol *ctl; in xonar_hdav_slim_mixer_init() local
1209 ctl = snd_ctl_new1(&hdav_slim_controls[i], chip); in xonar_hdav_slim_mixer_init()
1210 if (!ctl) in xonar_hdav_slim_mixer_init()
1212 err = snd_ctl_add(chip->card, ctl); in xonar_hdav_slim_mixer_init()