• Home
  • Raw
  • Download

Lines Matching refs:ctl

508 static int wm8776_bit_switch_get(struct snd_kcontrol *ctl,  in wm8776_bit_switch_get()  argument
511 struct oxygen *chip = ctl->private_data; in wm8776_bit_switch_get()
513 u16 bit = ctl->private_value & 0xffff; in wm8776_bit_switch_get()
514 unsigned int reg_index = (ctl->private_value >> 16) & 0xff; in wm8776_bit_switch_get()
515 bool invert = (ctl->private_value >> 24) & 1; in wm8776_bit_switch_get()
522 static int wm8776_bit_switch_put(struct snd_kcontrol *ctl, in wm8776_bit_switch_put() argument
525 struct oxygen *chip = ctl->private_data; in wm8776_bit_switch_put()
527 u16 bit = ctl->private_value & 0xffff; in wm8776_bit_switch_put()
529 unsigned int reg_index = (ctl->private_value >> 16) & 0xff; in wm8776_bit_switch_put()
530 bool invert = (ctl->private_value >> 24) & 1; in wm8776_bit_switch_put()
544 static int wm8776_field_enum_info(struct snd_kcontrol *ctl, in wm8776_field_enum_info() argument
580 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_enum_info()
581 switch ((ctl->private_value >> 24) & 0x1f) { in wm8776_field_enum_info()
586 if (((ctl->private_value >> 20) & 0xf) == 0) { in wm8776_field_enum_info()
587 if (ctl->private_value & LC_CONTROL_LIMITER) in wm8776_field_enum_info()
592 if (ctl->private_value & LC_CONTROL_LIMITER) in wm8776_field_enum_info()
607 static int wm8776_field_volume_info(struct snd_kcontrol *ctl, in wm8776_field_volume_info() argument
612 info->value.integer.min = (ctl->private_value >> 8) & 0xf; in wm8776_field_volume_info()
613 info->value.integer.max = (ctl->private_value >> 12) & 0xf; in wm8776_field_volume_info()
617 static void wm8776_field_set_from_ctl(struct snd_kcontrol *ctl) in wm8776_field_set_from_ctl() argument
619 struct oxygen *chip = ctl->private_data; in wm8776_field_set_from_ctl()
631 if (!(ctl->private_value & mode)) in wm8776_field_set_from_ctl()
634 value = ctl->private_value & 0xf; in wm8776_field_set_from_ctl()
635 min = (ctl->private_value >> 8) & 0xf; in wm8776_field_set_from_ctl()
636 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_set_from_ctl()
637 mask = (ctl->private_value >> 16) & 0xf; in wm8776_field_set_from_ctl()
638 shift = (ctl->private_value >> 20) & 0xf; in wm8776_field_set_from_ctl()
639 reg_index = (ctl->private_value >> 24) & 0x1f; in wm8776_field_set_from_ctl()
640 invert = (ctl->private_value >> 29) & 0x1; in wm8776_field_set_from_ctl()
650 static int wm8776_field_set(struct snd_kcontrol *ctl, unsigned int value) in wm8776_field_set() argument
652 struct oxygen *chip = ctl->private_data; in wm8776_field_set()
656 min = (ctl->private_value >> 8) & 0xf; in wm8776_field_set()
657 max = (ctl->private_value >> 12) & 0xf; in wm8776_field_set()
661 changed = value != (ctl->private_value & 0xf); in wm8776_field_set()
663 ctl->private_value = (ctl->private_value & ~0xf) | value; in wm8776_field_set()
664 wm8776_field_set_from_ctl(ctl); in wm8776_field_set()
670 static int wm8776_field_enum_get(struct snd_kcontrol *ctl, in wm8776_field_enum_get() argument
673 value->value.enumerated.item[0] = ctl->private_value & 0xf; in wm8776_field_enum_get()
677 static int wm8776_field_volume_get(struct snd_kcontrol *ctl, in wm8776_field_volume_get() argument
680 value->value.integer.value[0] = ctl->private_value & 0xf; in wm8776_field_volume_get()
684 static int wm8776_field_enum_put(struct snd_kcontrol *ctl, in wm8776_field_enum_put() argument
687 return wm8776_field_set(ctl, value->value.enumerated.item[0]); in wm8776_field_enum_put()
690 static int wm8776_field_volume_put(struct snd_kcontrol *ctl, in wm8776_field_volume_put() argument
693 return wm8776_field_set(ctl, value->value.integer.value[0]); in wm8776_field_volume_put()
696 static int wm8776_hp_vol_info(struct snd_kcontrol *ctl, in wm8776_hp_vol_info() argument
706 static int wm8776_hp_vol_get(struct snd_kcontrol *ctl, in wm8776_hp_vol_get() argument
709 struct oxygen *chip = ctl->private_data; in wm8776_hp_vol_get()
721 static int wm8776_hp_vol_put(struct snd_kcontrol *ctl, in wm8776_hp_vol_put() argument
724 struct oxygen *chip = ctl->private_data; in wm8776_hp_vol_put()
760 static int wm8776_input_mux_get(struct snd_kcontrol *ctl, in wm8776_input_mux_get() argument
763 struct oxygen *chip = ctl->private_data; in wm8776_input_mux_get()
765 unsigned int mux_bit = ctl->private_value; in wm8776_input_mux_get()
772 static int wm8776_input_mux_put(struct snd_kcontrol *ctl, in wm8776_input_mux_put() argument
775 struct oxygen *chip = ctl->private_data; in wm8776_input_mux_put()
778 unsigned int mux_bit = ctl->private_value; in wm8776_input_mux_put()
810 static int wm8776_input_vol_info(struct snd_kcontrol *ctl, in wm8776_input_vol_info() argument
820 static int wm8776_input_vol_get(struct snd_kcontrol *ctl, in wm8776_input_vol_get() argument
823 struct oxygen *chip = ctl->private_data; in wm8776_input_vol_get()
835 static int wm8776_input_vol_put(struct snd_kcontrol *ctl, in wm8776_input_vol_put() argument
838 struct oxygen *chip = ctl->private_data; in wm8776_input_vol_put()
855 static int wm8776_level_control_info(struct snd_kcontrol *ctl, in wm8776_level_control_info() argument
865 static int wm8776_level_control_get(struct snd_kcontrol *ctl, in wm8776_level_control_get() argument
868 struct oxygen *chip = ctl->private_data; in wm8776_level_control_get()
882 struct snd_kcontrol *ctl, unsigned int mode) in activate_control() argument
886 if (ctl->private_value & mode) in activate_control()
890 if ((ctl->vd[0].access & SNDRV_CTL_ELEM_ACCESS_INACTIVE) != access) { in activate_control()
891 ctl->vd[0].access ^= SNDRV_CTL_ELEM_ACCESS_INACTIVE; in activate_control()
892 snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_INFO, &ctl->id); in activate_control()
896 static int wm8776_level_control_put(struct snd_kcontrol *ctl, in wm8776_level_control_put() argument
899 struct oxygen *chip = ctl->private_data; in wm8776_level_control_put()
908 changed = value->value.enumerated.item[0] != ctl->private_value; in wm8776_level_control_put()
910 ctl->private_value = value->value.enumerated.item[0]; in wm8776_level_control_put()
942 static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info) in hpf_info() argument
951 static int hpf_get(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_get() argument
953 struct oxygen *chip = ctl->private_data; in hpf_get()
961 static int hpf_put(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_put() argument
963 struct oxygen *chip = ctl->private_data; in hpf_put()
1170 struct snd_kcontrol *ctl; in add_lc_controls() local
1175 ctl = snd_ctl_new1(&lc_controls[i], chip); in add_lc_controls()
1176 if (!ctl) in add_lc_controls()
1178 err = snd_ctl_add(chip->card, ctl); in add_lc_controls()
1181 data->lc_controls[i] = ctl; in add_lc_controls()
1190 struct snd_kcontrol *ctl; in xonar_ds_mixer_init() local
1194 ctl = snd_ctl_new1(&ds_controls[i], chip); in xonar_ds_mixer_init()
1195 if (!ctl) in xonar_ds_mixer_init()
1197 err = snd_ctl_add(chip->card, ctl); in xonar_ds_mixer_init()
1200 if (!strcmp(ctl->id.name, "Line Capture Switch")) in xonar_ds_mixer_init()
1201 data->line_adcmux_control = ctl; in xonar_ds_mixer_init()
1202 else if (!strcmp(ctl->id.name, "Mic Capture Switch")) in xonar_ds_mixer_init()
1203 data->mic_adcmux_control = ctl; in xonar_ds_mixer_init()
1214 struct snd_kcontrol *ctl; in xonar_hdav_slim_mixer_init() local
1218 ctl = snd_ctl_new1(&hdav_slim_controls[i], chip); in xonar_hdav_slim_mixer_init()
1219 if (!ctl) in xonar_hdav_slim_mixer_init()
1221 err = snd_ctl_add(chip->card, ctl); in xonar_hdav_slim_mixer_init()