Lines Matching refs:ice
35 static inline void stac9460_put(struct snd_ice1712 *ice, int reg, in stac9460_put() argument
38 snd_vt1724_write_i2c(ice, STAC9460_I2C_ADDR, reg, val); in stac9460_put()
41 static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) in stac9460_get() argument
43 return snd_vt1724_read_i2c(ice, STAC9460_I2C_ADDR, reg); in stac9460_get()
49 static inline void stac9460_2_put(struct snd_ice1712 *ice, int reg, in stac9460_2_put() argument
52 snd_vt1724_write_i2c(ice, STAC9460_2_I2C_ADDR, reg, val); in stac9460_2_put()
55 static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) in stac9460_2_get() argument
57 return snd_vt1724_read_i2c(ice, STAC9460_2_I2C_ADDR, reg); in stac9460_2_get()
64 static void stac9460_dac_mute_all(struct snd_ice1712 *ice, unsigned char mute, in stac9460_dac_mute_all() argument
77 old = stac9460_get(ice, idx); in stac9460_dac_mute_all()
81 stac9460_put(ice, idx, new); in stac9460_dac_mute_all()
96 old = stac9460_2_get(ice, idx); in stac9460_dac_mute_all()
100 stac9460_2_put(ice, idx, new); in stac9460_dac_mute_all()
116 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_get() local
117 struct wtm_spec *spec = ice->spec; in stac9460_dac_mute_get()
131 val = stac9460_get(ice, idx); in stac9460_dac_mute_get()
133 val = stac9460_2_get(ice, idx - 6); in stac9460_dac_mute_get()
143 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_put() local
150 old = stac9460_get(ice, idx); in stac9460_dac_mute_put()
155 stac9460_put(ice, idx, new); in stac9460_dac_mute_put()
156 stac9460_2_put(ice, idx, new); in stac9460_dac_mute_put()
162 old = stac9460_get(ice, idx); in stac9460_dac_mute_put()
164 old = stac9460_2_get(ice, idx - 6); in stac9460_dac_mute_put()
170 stac9460_put(ice, idx, new); in stac9460_dac_mute_put()
172 stac9460_2_put(ice, idx - 6, new); in stac9460_dac_mute_put()
194 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_vol_get() local
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()
216 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_vol_put() local
224 tmp = stac9460_get(ice, idx); 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()
236 tmp = stac9460_get(ice, idx); in stac9460_dac_vol_put()
238 tmp = stac9460_2_get(ice, idx - 6); in stac9460_dac_vol_put()
243 stac9460_put(ice, idx, (0x7f - nvol) | in stac9460_dac_vol_put()
246 stac9460_2_put(ice, idx-6, (0x7f - nvol) | in stac9460_dac_vol_put()
261 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_mute_get() local
268 val = stac9460_get(ice, STAC946X_MIC_L_VOLUME + i); in stac9460_adc_mute_get()
273 val = stac9460_2_get(ice, STAC946X_MIC_L_VOLUME + i); in stac9460_adc_mute_get()
283 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_mute_put() local
292 old = stac9460_get(ice, reg); in stac9460_adc_mute_put()
297 stac9460_put(ice, reg, new); in stac9460_adc_mute_put()
302 old = stac9460_2_get(ice, reg); in stac9460_adc_mute_put()
307 stac9460_2_put(ice, reg, new); in stac9460_adc_mute_put()
329 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_vol_get() local
337 vol = stac9460_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
343 vol = stac9460_2_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
353 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_vol_put() local
363 ovol = 0x0f - stac9460_get(ice, reg); in stac9460_adc_vol_put()
366 stac9460_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
373 ovol = 0x0f - stac9460_2_get(ice, reg); in stac9460_adc_vol_put()
376 stac9460_2_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
398 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_mic_sw_get() local
404 val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_get()
406 val = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_get()
414 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_mic_sw_put() local
420 old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_put()
422 old = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_put()
427 stac9460_put(ice, STAC946X_GENERAL_PURPOSE, new); in stac9460_mic_sw_put()
429 stac9460_2_put(ice, STAC946X_GENERAL_PURPOSE, new); in stac9460_mic_sw_put()
438 static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate) in stac9460_set_rate_val() argument
442 struct wtm_spec *spec = ice->spec; in stac9460_set_rate_val()
453 old = stac9460_get(ice, STAC946X_MASTER_CLOCKING); in stac9460_set_rate_val()
461 stac9460_dac_mute_all(ice, 0, &changed); in stac9460_set_rate_val()
463 stac9460_put(ice, STAC946X_MASTER_CLOCKING, new); in stac9460_set_rate_val()
464 stac9460_2_put(ice, STAC946X_MASTER_CLOCKING, new); in stac9460_set_rate_val()
468 stac9460_dac_mute_all(ice, 1, &changed); in stac9460_set_rate_val()
554 static int wtm_add_controls(struct snd_ice1712 *ice) in wtm_add_controls() argument
560 err = snd_ctl_add(ice->card, in wtm_add_controls()
561 snd_ctl_new1(&stac9640_controls[i], ice)); in wtm_add_controls()
568 static int wtm_init(struct snd_ice1712 *ice) in wtm_init() argument
579 ice->num_total_dacs = 8; in wtm_init()
580 ice->num_total_adcs = 4; in wtm_init()
581 ice->force_rdma1 = 1; in wtm_init()
587 ice->spec = spec; 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()
597 ice->gpio.set_pro_rate = stac9460_set_rate_val; in wtm_init()