Lines Matching refs:ice

49 static inline void stac9460_put(struct snd_ice1712 *ice, int reg,  in stac9460_put()  argument
52 snd_vt1724_write_i2c(ice, STAC9460_I2C_ADDR, reg, val); in stac9460_put()
55 static inline unsigned char stac9460_get(struct snd_ice1712 *ice, int reg) in stac9460_get() argument
57 return snd_vt1724_read_i2c(ice, STAC9460_I2C_ADDR, reg); in stac9460_get()
63 static inline void stac9460_2_put(struct snd_ice1712 *ice, int reg, in stac9460_2_put() argument
66 snd_vt1724_write_i2c(ice, STAC9460_2_I2C_ADDR, reg, val); in stac9460_2_put()
69 static inline unsigned char stac9460_2_get(struct snd_ice1712 *ice, int reg) in stac9460_2_get() argument
71 return snd_vt1724_read_i2c(ice, STAC9460_2_I2C_ADDR, reg); in stac9460_2_get()
78 static void stac9460_dac_mute_all(struct snd_ice1712 *ice, unsigned char mute, in stac9460_dac_mute_all() argument
91 old = stac9460_get(ice, idx); in stac9460_dac_mute_all()
95 stac9460_put(ice, idx, new); in stac9460_dac_mute_all()
110 old = stac9460_2_get(ice, idx); in stac9460_dac_mute_all()
114 stac9460_2_put(ice, idx, new); in stac9460_dac_mute_all()
130 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_get() local
131 struct wtm_spec *spec = ice->spec; in stac9460_dac_mute_get()
145 val = stac9460_get(ice, idx); in stac9460_dac_mute_get()
147 val = stac9460_2_get(ice, idx - 6); in stac9460_dac_mute_get()
157 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_mute_put() local
164 old = stac9460_get(ice, idx); in stac9460_dac_mute_put()
169 stac9460_put(ice, idx, new); in stac9460_dac_mute_put()
170 stac9460_2_put(ice, idx, new); in stac9460_dac_mute_put()
176 old = stac9460_get(ice, idx); in stac9460_dac_mute_put()
178 old = stac9460_2_get(ice, idx - 6); in stac9460_dac_mute_put()
184 stac9460_put(ice, idx, new); in stac9460_dac_mute_put()
186 stac9460_2_put(ice, idx - 6, new); in stac9460_dac_mute_put()
208 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_vol_get() local
220 vol = stac9460_get(ice, idx) & 0x7f; in stac9460_dac_vol_get()
222 vol = stac9460_2_get(ice, idx - 6) & 0x7f; in stac9460_dac_vol_get()
230 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_dac_vol_put() local
238 tmp = stac9460_get(ice, idx); in stac9460_dac_vol_put()
242 stac9460_put(ice, idx, (0x7f - nvol) | (tmp & 0x80)); in stac9460_dac_vol_put()
243 stac9460_2_put(ice, idx, (0x7f - nvol) | (tmp & 0x80)); in stac9460_dac_vol_put()
250 tmp = stac9460_get(ice, idx); in stac9460_dac_vol_put()
252 tmp = stac9460_2_get(ice, idx - 6); in stac9460_dac_vol_put()
257 stac9460_put(ice, idx, (0x7f - nvol) | in stac9460_dac_vol_put()
260 stac9460_2_put(ice, idx-6, (0x7f - nvol) | in stac9460_dac_vol_put()
275 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_mute_get() local
282 val = stac9460_get(ice, STAC946X_MIC_L_VOLUME + i); in stac9460_adc_mute_get()
287 val = stac9460_2_get(ice, STAC946X_MIC_L_VOLUME + i); in stac9460_adc_mute_get()
297 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_mute_put() local
306 old = stac9460_get(ice, reg); in stac9460_adc_mute_put()
311 stac9460_put(ice, reg, new); in stac9460_adc_mute_put()
316 old = stac9460_2_get(ice, reg); in stac9460_adc_mute_put()
321 stac9460_2_put(ice, reg, new); in stac9460_adc_mute_put()
343 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_vol_get() local
351 vol = stac9460_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
357 vol = stac9460_2_get(ice, reg) & 0x0f; in stac9460_adc_vol_get()
367 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_adc_vol_put() local
377 ovol = 0x0f - stac9460_get(ice, reg); in stac9460_adc_vol_put()
380 stac9460_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
387 ovol = 0x0f - stac9460_2_get(ice, reg); in stac9460_adc_vol_put()
390 stac9460_2_put(ice, reg, (0x0f - nvol) | in stac9460_adc_vol_put()
412 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_mic_sw_get() local
418 val = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_get()
420 val = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_get()
428 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); in stac9460_mic_sw_put() local
434 old = stac9460_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_put()
436 old = stac9460_2_get(ice, STAC946X_GENERAL_PURPOSE); in stac9460_mic_sw_put()
441 stac9460_put(ice, STAC946X_GENERAL_PURPOSE, new); in stac9460_mic_sw_put()
443 stac9460_2_put(ice, STAC946X_GENERAL_PURPOSE, new); in stac9460_mic_sw_put()
452 static void stac9460_set_rate_val(struct snd_ice1712 *ice, unsigned int rate) in stac9460_set_rate_val() argument
456 struct wtm_spec *spec = ice->spec; in stac9460_set_rate_val()
467 old = stac9460_get(ice, STAC946X_MASTER_CLOCKING); in stac9460_set_rate_val()
475 stac9460_dac_mute_all(ice, 0, &changed); in stac9460_set_rate_val()
477 stac9460_put(ice, STAC946X_MASTER_CLOCKING, new); in stac9460_set_rate_val()
478 stac9460_2_put(ice, STAC946X_MASTER_CLOCKING, new); in stac9460_set_rate_val()
482 stac9460_dac_mute_all(ice, 1, &changed); in stac9460_set_rate_val()
568 static int wtm_add_controls(struct snd_ice1712 *ice) in wtm_add_controls() argument
574 err = snd_ctl_add(ice->card, in wtm_add_controls()
575 snd_ctl_new1(&stac9640_controls[i], ice)); in wtm_add_controls()
582 static int wtm_init(struct snd_ice1712 *ice) in wtm_init() argument
593 ice->num_total_dacs = 8; in wtm_init()
594 ice->num_total_adcs = 4; in wtm_init()
595 ice->force_rdma1 = 1; in wtm_init()
601 ice->spec = spec; in wtm_init()
608 stac9460_put(ice, p[0], p[1]); in wtm_init()
609 stac9460_2_put(ice, p[0], p[1]); in wtm_init()
611 ice->gpio.set_pro_rate = stac9460_set_rate_val; in wtm_init()