Lines Matching refs:ucontrol
120 struct snd_ctl_elem_value *ucontrol) in onyx_snd_vol_get() argument
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()
137 struct snd_ctl_elem_value *ucontrol) in onyx_snd_vol_put() argument
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()
196 struct snd_ctl_elem_value *ucontrol) in onyx_snd_inputgain_get() argument
205 ucontrol->value.integer.value[0] = in onyx_snd_inputgain_get()
212 struct snd_ctl_elem_value *ucontrol) in onyx_snd_inputgain_put() argument
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()
250 struct snd_ctl_elem_value *ucontrol) in onyx_snd_capture_source_get() argument
259 ucontrol->value.enumerated.item[0] = !!(v&ONYX_ADC_INPUT_MIC); in onyx_snd_capture_source_get()
278 struct snd_ctl_elem_value *ucontrol) in onyx_snd_capture_source_put() argument
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()
310 struct snd_ctl_elem_value *ucontrol) in onyx_snd_mute_get() argument
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()
326 struct snd_ctl_elem_value *ucontrol) in onyx_snd_mute_put() argument
339 if (!ucontrol->value.integer.value[0]) in onyx_snd_mute_put()
341 if (!ucontrol->value.integer.value[1]) in onyx_snd_mute_put()
367 struct snd_ctl_elem_value *ucontrol) in onyx_snd_single_bit_get() argument
380 ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity; in onyx_snd_single_bit_get()
386 struct snd_ctl_elem_value *ucontrol) in onyx_snd_single_bit_put() argument
406 if (!!ucontrol->value.integer.value[0] ^ polarity) in onyx_snd_single_bit_put()
467 struct snd_ctl_elem_value *ucontrol) in onyx_spdif_mask_get() argument
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()
488 struct snd_ctl_elem_value *ucontrol) in onyx_spdif_get() argument
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()
511 struct snd_ctl_elem_value *ucontrol) in onyx_spdif_put() argument
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()