Lines Matching refs:value
91 unsigned int reg, unsigned int value) in wm8776_write_spi() argument
98 (reg << 9) | value); in wm8776_write_spi()
102 unsigned int reg, unsigned int value) in wm8776_write_i2c() argument
105 (reg << 1) | (value >> 8), value); in wm8776_write_i2c()
109 unsigned int reg, unsigned int value) in wm8776_write() argument
115 wm8776_write_spi(chip, reg, value); in wm8776_write()
117 wm8776_write_i2c(chip, reg, value); in wm8776_write()
120 value &= ~WM8776_UPDATE; in wm8776_write()
121 data->wm8776_regs[reg] = value; in wm8776_write()
126 unsigned int reg, unsigned int value) in wm8776_write_cached() argument
131 value != data->wm8776_regs[reg]) in wm8776_write_cached()
132 wm8776_write(chip, reg, value); in wm8776_write_cached()
136 unsigned int reg, unsigned int value) in wm8766_write() argument
145 (reg << 9) | value); in wm8766_write()
149 value &= ~WM8766_UPDATE; in wm8766_write()
150 data->wm8766_regs[reg] = value; in wm8766_write()
155 unsigned int reg, unsigned int value) in wm8766_write_cached() argument
160 value != data->wm8766_regs[reg]) in wm8766_write_cached()
161 wm8766_write(chip, reg, value); in wm8766_write_cached()
498 struct snd_ctl_elem_value *value) in wm8776_bit_switch_get() argument
506 value->value.integer.value[0] = in wm8776_bit_switch_get()
512 struct snd_ctl_elem_value *value) in wm8776_bit_switch_put() argument
524 if (value->value.integer.value[0] ^ invert) in wm8776_bit_switch_put()
601 info->value.integer.min = (ctl->private_value >> 8) & 0xf; in wm8776_field_volume_info()
602 info->value.integer.max = (ctl->private_value >> 12) & 0xf; in wm8776_field_volume_info()
610 unsigned int value, reg_index, mode; in wm8776_field_set_from_ctl() local
623 value = ctl->private_value & 0xf; in wm8776_field_set_from_ctl()
632 value = max - (value - min); in wm8776_field_set_from_ctl()
635 reg_value |= value << shift; in wm8776_field_set_from_ctl()
639 static int wm8776_field_set(struct snd_kcontrol *ctl, unsigned int value) in wm8776_field_set() argument
647 if (value < min || value > max) in wm8776_field_set()
650 changed = value != (ctl->private_value & 0xf); in wm8776_field_set()
652 ctl->private_value = (ctl->private_value & ~0xf) | value; in wm8776_field_set()
660 struct snd_ctl_elem_value *value) in wm8776_field_enum_get() argument
662 value->value.enumerated.item[0] = ctl->private_value & 0xf; in wm8776_field_enum_get()
667 struct snd_ctl_elem_value *value) in wm8776_field_volume_get() argument
669 value->value.integer.value[0] = ctl->private_value & 0xf; in wm8776_field_volume_get()
674 struct snd_ctl_elem_value *value) in wm8776_field_enum_put() argument
676 return wm8776_field_set(ctl, value->value.enumerated.item[0]); in wm8776_field_enum_put()
680 struct snd_ctl_elem_value *value) in wm8776_field_volume_put() argument
682 return wm8776_field_set(ctl, value->value.integer.value[0]); in wm8776_field_volume_put()
690 info->value.integer.min = 0x79 - 60; in wm8776_hp_vol_info()
691 info->value.integer.max = 0x7f; in wm8776_hp_vol_info()
696 struct snd_ctl_elem_value *value) in wm8776_hp_vol_get() argument
702 value->value.integer.value[0] = in wm8776_hp_vol_get()
704 value->value.integer.value[1] = in wm8776_hp_vol_get()
711 struct snd_ctl_elem_value *value) in wm8776_hp_vol_put() argument
718 to_update = (value->value.integer.value[0] != in wm8776_hp_vol_put()
721 to_update |= (value->value.integer.value[1] != in wm8776_hp_vol_put()
724 if (value->value.integer.value[0] == value->value.integer.value[1]) { in wm8776_hp_vol_put()
727 value->value.integer.value[0] | in wm8776_hp_vol_put()
730 value->value.integer.value[0] | WM8776_HPZCEN; in wm8776_hp_vol_put()
732 value->value.integer.value[0] | WM8776_HPZCEN; in wm8776_hp_vol_put()
737 value->value.integer.value[0] | in wm8776_hp_vol_put()
742 value->value.integer.value[1] | in wm8776_hp_vol_put()
750 struct snd_ctl_elem_value *value) in wm8776_input_mux_get() argument
756 value->value.integer.value[0] = in wm8776_input_mux_get()
762 struct snd_ctl_elem_value *value) in wm8776_input_mux_put() argument
773 if (value->value.integer.value[0]) { in wm8776_input_mux_put()
804 info->value.integer.min = 0xa5; in wm8776_input_vol_info()
805 info->value.integer.max = 0xff; in wm8776_input_vol_info()
810 struct snd_ctl_elem_value *value) in wm8776_input_vol_get() argument
816 value->value.integer.value[0] = in wm8776_input_vol_get()
818 value->value.integer.value[1] = in wm8776_input_vol_get()
825 struct snd_ctl_elem_value *value) in wm8776_input_vol_put() argument
832 changed = (value->value.integer.value[0] != in wm8776_input_vol_put()
834 (value->value.integer.value[1] != in wm8776_input_vol_put()
837 value->value.integer.value[0] | WM8776_ZCA); in wm8776_input_vol_put()
839 value->value.integer.value[1] | WM8776_ZCA); in wm8776_input_vol_put()
855 struct snd_ctl_elem_value *value) in wm8776_level_control_get() argument
861 value->value.enumerated.item[0] = 0; in wm8776_level_control_get()
864 value->value.enumerated.item[0] = 1; in wm8776_level_control_get()
866 value->value.enumerated.item[0] = 2; in wm8776_level_control_get()
886 struct snd_ctl_elem_value *value) in wm8776_level_control_put() argument
894 if (value->value.enumerated.item[0] >= 3) in wm8776_level_control_put()
897 changed = value->value.enumerated.item[0] != ctl->private_value; in wm8776_level_control_put()
899 ctl->private_value = value->value.enumerated.item[0]; in wm8776_level_control_put()
902 switch (value->value.enumerated.item[0]) { in wm8776_level_control_put()
940 static int hpf_get(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_get() argument
945 value->value.enumerated.item[0] = in hpf_get()
950 static int hpf_put(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value) in hpf_put() argument
959 if (!value->value.enumerated.item[0]) in hpf_put()