Lines Matching refs:value
68 static int onyx_read_register(struct onyx *onyx, u8 reg, u8 *value) in onyx_read_register() argument
73 *value = onyx->cache[reg-FIRSTREGISTER]; in onyx_read_register()
79 *value = (u8)v; in onyx_read_register()
80 onyx->cache[ONYX_REG_CONTROL-FIRSTREGISTER] = *value; in onyx_read_register()
84 static int onyx_write_register(struct onyx *onyx, u8 reg, u8 value) in onyx_write_register() argument
88 result = i2c_smbus_write_byte_data(onyx->i2c, reg, value); in onyx_write_register()
90 onyx->cache[reg-FIRSTREGISTER] = value; in onyx_write_register()
114 uinfo->value.integer.min = -128 + VOLUME_RANGE_SHIFT; in onyx_snd_vol_info()
115 uinfo->value.integer.max = -1 + VOLUME_RANGE_SHIFT; in onyx_snd_vol_info()
130 ucontrol->value.integer.value[0] = l + VOLUME_RANGE_SHIFT; in onyx_snd_vol_get()
131 ucontrol->value.integer.value[1] = r + VOLUME_RANGE_SHIFT; in onyx_snd_vol_get()
142 if (ucontrol->value.integer.value[0] < -128 + VOLUME_RANGE_SHIFT || in onyx_snd_vol_put()
143 ucontrol->value.integer.value[0] > -1 + VOLUME_RANGE_SHIFT) in onyx_snd_vol_put()
145 if (ucontrol->value.integer.value[1] < -128 + VOLUME_RANGE_SHIFT || in onyx_snd_vol_put()
146 ucontrol->value.integer.value[1] > -1 + VOLUME_RANGE_SHIFT) in onyx_snd_vol_put()
153 if (l + VOLUME_RANGE_SHIFT == ucontrol->value.integer.value[0] && in onyx_snd_vol_put()
154 r + VOLUME_RANGE_SHIFT == ucontrol->value.integer.value[1]) { in onyx_snd_vol_put()
160 ucontrol->value.integer.value[0] in onyx_snd_vol_put()
163 ucontrol->value.integer.value[1] in onyx_snd_vol_put()
190 uinfo->value.integer.min = 3 + INPUTGAIN_RANGE_SHIFT; in onyx_snd_inputgain_info()
191 uinfo->value.integer.max = 28 + INPUTGAIN_RANGE_SHIFT; in onyx_snd_inputgain_info()
205 ucontrol->value.integer.value[0] = in onyx_snd_inputgain_get()
217 if (ucontrol->value.integer.value[0] < 3 + INPUTGAIN_RANGE_SHIFT || in onyx_snd_inputgain_put()
218 ucontrol->value.integer.value[0] > 28 + INPUTGAIN_RANGE_SHIFT) in onyx_snd_inputgain_put()
224 n |= (ucontrol->value.integer.value[0] - INPUTGAIN_RANGE_SHIFT) in onyx_snd_inputgain_put()
259 ucontrol->value.enumerated.item[0] = !!(v&ONYX_ADC_INPUT_MIC); in onyx_snd_capture_source_get()
280 if (ucontrol->value.enumerated.item[0] > 1) in onyx_snd_capture_source_put()
283 ucontrol->value.enumerated.item[0]); in onyx_snd_capture_source_put()
319 ucontrol->value.integer.value[0] = !(c & ONYX_MUTE_LEFT); in onyx_snd_mute_get()
320 ucontrol->value.integer.value[1] = !(c & ONYX_MUTE_RIGHT); in onyx_snd_mute_get()
339 if (!ucontrol->value.integer.value[0]) in onyx_snd_mute_put()
341 if (!ucontrol->value.integer.value[1]) in onyx_snd_mute_put()
380 ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity; in onyx_snd_single_bit_get()
406 if (!!ucontrol->value.integer.value[0] ^ polarity) in onyx_snd_single_bit_put()
470 ucontrol->value.iec958.status[0] = 0x3e; in onyx_spdif_mask_get()
471 ucontrol->value.iec958.status[1] = 0xff; in onyx_spdif_mask_get()
473 ucontrol->value.iec958.status[3] = 0x3f; in onyx_spdif_mask_get()
474 ucontrol->value.iec958.status[4] = 0x0f; in onyx_spdif_mask_get()
495 ucontrol->value.iec958.status[0] = v & 0x3e; in onyx_spdif_get()
498 ucontrol->value.iec958.status[1] = v; in onyx_spdif_get()
501 ucontrol->value.iec958.status[3] = v & 0x3f; in onyx_spdif_get()
504 ucontrol->value.iec958.status[4] = v & 0x0f; in onyx_spdif_get()
518 v = (v & ~0x3e) | (ucontrol->value.iec958.status[0] & 0x3e); in onyx_spdif_put()
521 v = ucontrol->value.iec958.status[1]; in onyx_spdif_put()
525 v = (v & ~0x3f) | (ucontrol->value.iec958.status[3] & 0x3f); in onyx_spdif_put()
529 v = (v & ~0x0f) | (ucontrol->value.iec958.status[4] & 0x0f); in onyx_spdif_put()