Lines Matching +full:0 +full:x7f

71 	for (id = 0; id < 7; id++) {  in stac9460_dac_mute_all()
72 if (*change_mask & (0x01 << id)) { in stac9460_dac_mute_all()
73 if (id == 0) in stac9460_dac_mute_all()
78 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
82 *change_mask = *change_mask | (0x01 << id); in stac9460_dac_mute_all()
84 *change_mask = *change_mask & ~(0x01 << id); in stac9460_dac_mute_all()
90 for (id = 0; id < 3; id++) { in stac9460_dac_mute_all()
91 if (*change_mask & (0x01 << (id + 7))) { in stac9460_dac_mute_all()
92 if (id == 0) in stac9460_dac_mute_all()
97 new = (~mute << 7 & 0x80) | (old & ~0x80); in stac9460_dac_mute_all()
101 *change_mask = *change_mask | (0x01 << id); in stac9460_dac_mute_all()
103 *change_mask = *change_mask & ~(0x01 << id); in stac9460_dac_mute_all()
125 id = 0; in stac9460_dac_mute_get()
134 ucontrol->value.integer.value[0] = (~val >> 7) & 0x1; in stac9460_dac_mute_get()
137 return 0; in stac9460_dac_mute_get()
151 new = (~ucontrol->value.integer.value[0] << 7 & 0x80) | in stac9460_dac_mute_put()
152 (old & ~0x80); in stac9460_dac_mute_put()
165 new = (~ucontrol->value.integer.value[0] << 7 & 0x80) | in stac9460_dac_mute_put()
166 (old & ~0x80); in stac9460_dac_mute_put()
186 uinfo->value.integer.min = 0; /* mute */ in stac9460_dac_vol_info()
187 uinfo->value.integer.max = 0x7f; /* 0dB */ in stac9460_dac_vol_info()
188 return 0; in stac9460_dac_vol_info()
200 id = 0; in stac9460_dac_vol_get()
206 vol = stac9460_get(ice, idx) & 0x7f; in stac9460_dac_vol_get()
208 vol = stac9460_2_get(ice, idx - 6) & 0x7f; in stac9460_dac_vol_get()
209 ucontrol->value.integer.value[0] = 0x7f - vol; in stac9460_dac_vol_get()
210 return 0; in stac9460_dac_vol_get()
223 nvol = ucontrol->value.integer.value[0] & 0x7f; in stac9460_dac_vol_put()
225 ovol = 0x7f - (tmp & 0x7f); in stac9460_dac_vol_put()
228 stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80)); in stac9460_dac_vol_put()
229 stac9460_2_put(ice, idx, (0x7f - nvol) | (tmp & 0x80)); in stac9460_dac_vol_put()
234 nvol = ucontrol->value.integer.value[0] & 0x7f; in stac9460_dac_vol_put()
239 ovol = 0x7f - (tmp & 0x7f); in stac9460_dac_vol_put()
243 stac9460_put(ice, idx, (0x7f - nvol) | in stac9460_dac_vol_put()
244 (tmp & 0x80)); in stac9460_dac_vol_put()
246 stac9460_2_put(ice, idx-6, (0x7f - nvol) | in stac9460_dac_vol_put()
247 (tmp & 0x80)); in stac9460_dac_vol_put()
266 if (id == 0) { in stac9460_adc_mute_get()
267 for (i = 0; i < 2; ++i) { in stac9460_adc_mute_get()
269 ucontrol->value.integer.value[i] = ~val>>7 & 0x1; in stac9460_adc_mute_get()
272 for (i = 0; i < 2; ++i) { in stac9460_adc_mute_get()
274 ucontrol->value.integer.value[i] = ~val>>7 & 0x1; in stac9460_adc_mute_get()
277 return 0; in stac9460_adc_mute_get()
289 if (id == 0) { in stac9460_adc_mute_put()
290 for (i = 0; i < 2; ++i) { in stac9460_adc_mute_put()
293 new = (~ucontrol->value.integer.value[i]<<7&0x80) | in stac9460_adc_mute_put()
294 (old&~0x80); in stac9460_adc_mute_put()
300 for (i = 0; i < 2; ++i) { in stac9460_adc_mute_put()
303 new = (~ucontrol->value.integer.value[i]<<7&0x80) | in stac9460_adc_mute_put()
304 (old&~0x80); in stac9460_adc_mute_put()
321 uinfo->value.integer.min = 0; /* 0dB */ in stac9460_adc_vol_info()
322 uinfo->value.integer.max = 0x0f; /* 22.5dB */ in stac9460_adc_vol_info()
323 return 0; in stac9460_adc_vol_info()
334 if (id == 0) { in stac9460_adc_vol_get()
335 for (i = 0; i < 2; ++i) { in stac9460_adc_vol_get()
337 vol = stac9460_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
338 ucontrol->value.integer.value[i] = 0x0f - vol; in stac9460_adc_vol_get()
341 for (i = 0; i < 2; ++i) { in stac9460_adc_vol_get()
343 vol = stac9460_2_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
344 ucontrol->value.integer.value[i] = 0x0f - vol; in stac9460_adc_vol_get()
347 return 0; in stac9460_adc_vol_get()
359 if (id == 0) { in stac9460_adc_vol_put()
360 for (i = 0; i < 2; ++i) { in stac9460_adc_vol_put()
362 nvol = ucontrol->value.integer.value[i] & 0x0f; in stac9460_adc_vol_put()
363 ovol = 0x0f - stac9460_get(ice, reg); in stac9460_adc_vol_put()
364 change = ((ovol & 0x0f) != nvol); in stac9460_adc_vol_put()
366 stac9460_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
367 (ovol & ~0x0f)); in stac9460_adc_vol_put()
370 for (i = 0; i < 2; ++i) { in stac9460_adc_vol_put()
372 nvol = ucontrol->value.integer.value[i] & 0x0f; in stac9460_adc_vol_put()
373 ovol = 0x0f - stac9460_2_get(ice, reg); in stac9460_adc_vol_put()
374 change = ((ovol & 0x0f) != nvol); in stac9460_adc_vol_put()
376 stac9460_2_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
377 (ovol & ~0x0f)); in stac9460_adc_vol_put()
403 if (id == 0) in stac9460_mic_sw_get()
407 ucontrol->value.enumerated.item[0] = (val >> 7) & 0x1; in stac9460_mic_sw_get()
408 return 0; in stac9460_mic_sw_get()
419 if (id == 0) in stac9460_mic_sw_put()
423 new = (ucontrol->value.enumerated.item[0] << 7 & 0x80) | (old & ~0x80); in stac9460_mic_sw_put()
426 if (id == 0) in stac9460_mic_sw_put()
444 if (rate == 0) /* no hint - S/PDIF input is master, simply return */ in stac9460_set_rate_val()
447 new = 0x08; /* 256x, base rate mode */ in stac9460_set_rate_val()
449 new = 0x11; /* 256x, mid rate mode */ in stac9460_set_rate_val()
451 new = 0x12; /* 128x, high rate mode */ in stac9460_set_rate_val()
460 changed = 0xFFFF; in stac9460_set_rate_val()
461 stac9460_dac_mute_all(ice, 0, &changed); in stac9460_set_rate_val()
462 /*printk(KERN_DEBUG "Rate change: %d, new MC: 0x%02x\n", rate, new);*/ in stac9460_set_rate_val()
474 static const DECLARE_TLV_DB_SCALE(db_scale_dac, -19125, 75, 0);
475 static const DECLARE_TLV_DB_SCALE(db_scale_adc, 0, 150, 0);
559 for (i = 0; i < ARRAY_SIZE(stac9640_controls); i++) { in wtm_add_controls()
562 if (err < 0) in wtm_add_controls()
565 return 0; in wtm_add_controls()
571 STAC946X_RESET, 0, in wtm_init()
572 STAC946X_MASTER_CLOCKING, 0x11, in wtm_init()
594 stac9460_put(ice, p[0], p[1]); in wtm_init()
595 stac9460_2_put(ice, p[0], p[1]); in wtm_init()
598 return 0; in wtm_init()
603 [ICE_EEP2_SYSCONF] = 0x67, /*SYSCONF: clock 192KHz, mpu401,
605 [ICE_EEP2_ACLINK] = 0x80, /* ACLINK : I2S */
606 [ICE_EEP2_I2S] = 0xf8, /* I2S: vol; 96k, 24bit, 192k */
607 [ICE_EEP2_SPDIF] = 0xc1, /*SPDIF: out-en, spidf ext out*/
608 [ICE_EEP2_GPIO_DIR] = 0x9f,
609 [ICE_EEP2_GPIO_DIR1] = 0xff,
610 [ICE_EEP2_GPIO_DIR2] = 0x7f,
611 [ICE_EEP2_GPIO_MASK] = 0x9f,
612 [ICE_EEP2_GPIO_MASK1] = 0xff,
613 [ICE_EEP2_GPIO_MASK2] = 0x7f,
614 [ICE_EEP2_GPIO_STATE] = 0x16,
615 [ICE_EEP2_GPIO_STATE1] = 0x80,
616 [ICE_EEP2_GPIO_STATE2] = 0x00,