Lines Matching refs:rt715
104 static void rt715_get_gain(struct rt715_priv *rt715, unsigned int addr_h, in rt715_get_gain() argument
111 ret = regmap_read(rt715->regmap, addr_l, r_val); in rt715_get_gain()
118 ret = regmap_read(rt715->regmap, addr_h, l_val); in rt715_get_gain()
132 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_amp_gain_put() local
138 if (ucontrol->value.integer.value[i] != rt715->kctl_2ch_vol_ori[i]) { in rt715_set_amp_gain_put()
153 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_amp_gain_put()
156 regmap_write(rt715->regmap, in rt715_set_amp_gain_put()
160 rt715->kctl_2ch_vol_ori[0] = ucontrol->value.integer.value[0]; in rt715_set_amp_gain_put()
169 rt715->kctl_2ch_vol_ori[1] = ucontrol->value.integer.value[1]; in rt715_set_amp_gain_put()
182 regmap_write(rt715->regmap, addr_h, in rt715_set_amp_gain_put()
184 regmap_write(rt715->regmap, addr_l, in rt715_set_amp_gain_put()
189 regmap_write(rt715->regmap, addr_h, in rt715_set_amp_gain_put()
193 regmap_write(rt715->regmap, addr_l, in rt715_set_amp_gain_put()
202 rt715_get_gain(rt715, addr_h, addr_l, val_h, in rt715_set_amp_gain_put()
210 regmap_write(rt715->regmap, in rt715_set_amp_gain_put()
219 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_amp_gain_get() local
232 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_amp_gain_get()
255 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_main_switch_put() local
267 if (ucontrol->value.integer.value[i] != rt715->kctl_8ch_switch_ori[i]) in rt715_set_main_switch_put()
275 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_main_switch_put()
278 regmap_write(rt715->regmap, in rt715_set_main_switch_put()
283 rt715->kctl_8ch_switch_ori[j * 2] = in rt715_set_main_switch_put()
291 rt715->kctl_8ch_switch_ori[j * 2 + 1] = in rt715_set_main_switch_put()
302 regmap_write(rt715->regmap, addr_h, in rt715_set_main_switch_put()
304 regmap_write(rt715->regmap, addr_l, in rt715_set_main_switch_put()
309 regmap_write(rt715->regmap, addr_h, in rt715_set_main_switch_put()
313 regmap_write(rt715->regmap, addr_l, in rt715_set_main_switch_put()
317 rt715_get_gain(rt715, addr_h, addr_l, val_h, in rt715_set_main_switch_put()
326 regmap_write(rt715->regmap, in rt715_set_main_switch_put()
335 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_main_switch_get() local
348 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_main_switch_get()
363 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_main_vol_put() local
375 if (ucontrol->value.integer.value[i] != rt715->kctl_8ch_vol_ori[i]) in rt715_set_main_vol_put()
382 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_main_vol_put()
385 regmap_write(rt715->regmap, in rt715_set_main_vol_put()
390 rt715->kctl_8ch_vol_ori[j * 2] = ucontrol->value.integer.value[j * 2]; in rt715_set_main_vol_put()
399 rt715->kctl_8ch_vol_ori[j * 2 + 1] = in rt715_set_main_vol_put()
411 regmap_write(rt715->regmap, addr_h, in rt715_set_main_vol_put()
413 regmap_write(rt715->regmap, addr_l, in rt715_set_main_vol_put()
418 regmap_write(rt715->regmap, addr_h, in rt715_set_main_vol_put()
422 regmap_write(rt715->regmap, addr_l, in rt715_set_main_vol_put()
426 rt715_get_gain(rt715, addr_h, addr_l, val_h, in rt715_set_main_vol_put()
435 regmap_write(rt715->regmap, in rt715_set_main_vol_put()
444 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_main_vol_get() local
457 rt715_get_gain(rt715, addr_h, addr_l, val_h, &read_rl, &read_ll); in rt715_set_main_vol_get()
559 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_mux_get() local
566 ret = regmap_read(rt715->regmap, reg, &val); in rt715_mux_get()
592 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_mux_put() local
605 ret = regmap_read(rt715->regmap, reg, &val2); in rt715_mux_put()
619 regmap_write(rt715->regmap, reg, val); in rt715_mux_put()
765 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_set_bias_level() local
770 regmap_write(rt715->regmap, in rt715_set_bias_level()
778 regmap_write(rt715->regmap, in rt715_set_bias_level()
792 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_probe() local
795 if (!rt715->first_hw_init) in rt715_probe()
838 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_pcm_hw_params() local
850 if (!rt715->slave) in rt715_pcm_hw_params()
858 rt715_index_write(rt715->regmap, RT715_SDW_INPUT_SEL, 0xa500); in rt715_pcm_hw_params()
862 rt715_index_write(rt715->regmap, RT715_SDW_INPUT_SEL, 0xa000); in rt715_pcm_hw_params()
869 retval = sdw_stream_add_slave(rt715->slave, &stream_config, in rt715_pcm_hw_params()
920 regmap_write(rt715->regmap, RT715_MIC_ADC_FORMAT_H, val); in rt715_pcm_hw_params()
921 regmap_write(rt715->regmap, RT715_MIC_LINE_FORMAT_H, val); in rt715_pcm_hw_params()
922 regmap_write(rt715->regmap, RT715_MIX_ADC_FORMAT_H, val); in rt715_pcm_hw_params()
923 regmap_write(rt715->regmap, RT715_MIX_ADC2_FORMAT_H, val); in rt715_pcm_hw_params()
932 struct rt715_priv *rt715 = snd_soc_component_get_drvdata(component); in rt715_pcm_hw_free() local
936 if (!rt715->slave) in rt715_pcm_hw_free()
939 sdw_stream_remove_slave(rt715->slave, sdw_stream); in rt715_pcm_hw_free()
991 struct rt715_priv *rt715 = dev_get_drvdata(dev); in rt715_clock_config() local
994 clk_freq = (rt715->params.curr_dr_freq >> 1); in rt715_clock_config()
1019 regmap_write(rt715->regmap, 0xe0, value); in rt715_clock_config()
1020 regmap_write(rt715->regmap, 0xf0, value); in rt715_clock_config()
1028 struct rt715_priv *rt715; in rt715_init() local
1031 rt715 = devm_kzalloc(dev, sizeof(*rt715), GFP_KERNEL); in rt715_init()
1032 if (!rt715) in rt715_init()
1035 dev_set_drvdata(dev, rt715); in rt715_init()
1036 rt715->slave = slave; in rt715_init()
1037 rt715->regmap = regmap; in rt715_init()
1038 rt715->sdw_regmap = sdw_regmap; in rt715_init()
1040 regcache_cache_only(rt715->regmap, true); in rt715_init()
1046 rt715->hw_init = false; in rt715_init()
1047 rt715->first_hw_init = false; in rt715_init()
1076 struct rt715_priv *rt715 = dev_get_drvdata(dev); in rt715_io_init() local
1078 if (rt715->hw_init) in rt715_io_init()
1081 regcache_cache_only(rt715->regmap, false); in rt715_io_init()
1086 if (!rt715->first_hw_init) in rt715_io_init()
1092 rt715_reset(rt715->regmap); in rt715_io_init()
1095 regmap_write(rt715->regmap, RT715_SET_GAIN_LINE_ADC_H, 0xb080); in rt715_io_init()
1096 regmap_write(rt715->regmap, RT715_SET_GAIN_MIX_ADC_H, 0xb080); in rt715_io_init()
1098 regmap_write(rt715->regmap, RT715_SET_GAIN_MIC_ADC_H, 0xb080); in rt715_io_init()
1099 regmap_write(rt715->regmap, RT715_SET_GAIN_MIX_ADC2_H, 0xb080); in rt715_io_init()
1102 regmap_write(rt715->regmap, RT715_SET_PIN_DMIC1, 0x20); in rt715_io_init()
1103 regmap_write(rt715->regmap, RT715_SET_PIN_DMIC2, 0x20); in rt715_io_init()
1104 regmap_write(rt715->regmap, RT715_SET_PIN_DMIC3, 0x20); in rt715_io_init()
1105 regmap_write(rt715->regmap, RT715_SET_PIN_DMIC4, 0x20); in rt715_io_init()
1107 regmap_write(rt715->regmap, RT715_SET_STREAMID_LINE_ADC, 0x10); in rt715_io_init()
1108 regmap_write(rt715->regmap, RT715_SET_STREAMID_MIX_ADC, 0x10); in rt715_io_init()
1109 regmap_write(rt715->regmap, RT715_SET_STREAMID_MIC_ADC, 0x10); in rt715_io_init()
1110 regmap_write(rt715->regmap, RT715_SET_STREAMID_MIX_ADC2, 0x10); in rt715_io_init()
1112 regmap_write(rt715->regmap, RT715_SET_DMIC1_CONFIG_DEFAULT1, 0xd0); in rt715_io_init()
1113 regmap_write(rt715->regmap, RT715_SET_DMIC1_CONFIG_DEFAULT2, 0x11); in rt715_io_init()
1114 regmap_write(rt715->regmap, RT715_SET_DMIC1_CONFIG_DEFAULT3, 0xa1); in rt715_io_init()
1115 regmap_write(rt715->regmap, RT715_SET_DMIC1_CONFIG_DEFAULT4, 0x81); in rt715_io_init()
1116 regmap_write(rt715->regmap, RT715_SET_DMIC2_CONFIG_DEFAULT1, 0xd1); in rt715_io_init()
1117 regmap_write(rt715->regmap, RT715_SET_DMIC2_CONFIG_DEFAULT2, 0x11); in rt715_io_init()
1118 regmap_write(rt715->regmap, RT715_SET_DMIC2_CONFIG_DEFAULT3, 0xa1); in rt715_io_init()
1119 regmap_write(rt715->regmap, RT715_SET_DMIC2_CONFIG_DEFAULT4, 0x81); in rt715_io_init()
1120 regmap_write(rt715->regmap, RT715_SET_DMIC3_CONFIG_DEFAULT1, 0xd0); in rt715_io_init()
1121 regmap_write(rt715->regmap, RT715_SET_DMIC3_CONFIG_DEFAULT2, 0x11); in rt715_io_init()
1122 regmap_write(rt715->regmap, RT715_SET_DMIC3_CONFIG_DEFAULT3, 0xa1); in rt715_io_init()
1123 regmap_write(rt715->regmap, RT715_SET_DMIC3_CONFIG_DEFAULT4, 0x81); in rt715_io_init()
1124 regmap_write(rt715->regmap, RT715_SET_DMIC4_CONFIG_DEFAULT1, 0xd1); in rt715_io_init()
1125 regmap_write(rt715->regmap, RT715_SET_DMIC4_CONFIG_DEFAULT2, 0x11); in rt715_io_init()
1126 regmap_write(rt715->regmap, RT715_SET_DMIC4_CONFIG_DEFAULT3, 0xa1); in rt715_io_init()
1127 regmap_write(rt715->regmap, RT715_SET_DMIC4_CONFIG_DEFAULT4, 0x81); in rt715_io_init()
1130 regmap_write(rt715->regmap, RT715_SET_AUDIO_POWER_STATE, AC_PWRST_D3); in rt715_io_init()
1132 if (rt715->first_hw_init) in rt715_io_init()
1133 regcache_mark_dirty(rt715->regmap); in rt715_io_init()
1135 rt715->first_hw_init = true; in rt715_io_init()
1138 rt715->hw_init = true; in rt715_io_init()