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