Lines Matching +full:0 +full:x1f
42 static const DECLARE_TLV_DB_SCALE(es8375_adc_osr_gain_tlv, -3100, 100, 0);
43 static const DECLARE_TLV_DB_SCALE(es8375_adc_volume_tlv, -9550, 50, 0);
44 static const DECLARE_TLV_DB_SCALE(es8375_adc_automute_attn_tlv, 0, 100, 0);
45 static const DECLARE_TLV_DB_SCALE(es8375_adc_dmic_volume_tlv, 0, 600, 0);
46 static const DECLARE_TLV_DB_SCALE(es8375_dac_volume_tlv, -9550, 50, 0);
47 static const DECLARE_TLV_DB_SCALE(es8375_dac_vppscale_tlv, -388, 12, 0);
48 static const DECLARE_TLV_DB_SCALE(es8375_dac_automute_attn_tlv, 0, 400, 0);
49 static const DECLARE_TLV_DB_SCALE(es8375_automute_ng_tlv, -9600, 600, 0);
111 ADC_OSR_GAIN_SHIFT_0, ES8375_ADC_OSR_GAIN_MAX, 0,
113 SOC_SINGLE("ADC Invert Switch", ES8375_ADC1, ADC_INV_SHIFT_6, 1, 0),
114 SOC_SINGLE("ADC RAM Clear", ES8375_ADC1, ADC_RAMCLR_SHIFT_5, 1, 0),
118 0, es8375_adc_dmic_volume_tlv),
122 0, es8375_adc_volume_tlv),
124 ADC_AUTOMUTE_SHIFT_7, 1, 0),
128 0, es8375_automute_ng_tlv),
131 0, es8375_adc_automute_attn_tlv),
134 SOC_SINGLE("DAC DSM Mute Switch", ES8375_DAC1, DAC_DSMMUTE_SHIFT_7, 1, 0),
135 SOC_SINGLE("DAC DEM Mute Switch", ES8375_DAC1, DAC_DEMMUTE_SHIFT_6, 1, 0),
136 SOC_SINGLE("DAC Invert Switch", ES8375_DAC1, DAC_INV_SHIFT_5, 1, 0),
137 SOC_SINGLE("DAC RAM Clear", ES8375_DAC1, DAC_RAMCLR_SHIFT_4, 1, 0),
141 0, es8375_dac_volume_tlv),
144 0, es8375_dac_vppscale_tlv),
146 DAC_AUTOMUTE_EN_SHIFT_7, 1, 0),
149 0, es8375_automute_ng_tlv),
153 0, es8375_dac_automute_attn_tlv),
159 SND_SOC_DAPM_PGA("PGA", SND_SOC_NOPM, 0, 0, NULL, 0),
160 SND_SOC_DAPM_ADC("Mono ADC", NULL, SND_SOC_NOPM, 0, 0),
161 SND_SOC_DAPM_AIF_OUT("AIF1TX", "AIF1 Capture", 0, ES8375_SDP2,
164 SND_SOC_DAPM_MUX("ADC MUX", SND_SOC_NOPM, 0, 0, &es8375_dmic_mux_controls),
166 SND_SOC_DAPM_AIF_IN("AIF1RX", "AIF1 Playback", 0, ES8375_SDP,
167 SND_SOC_NOPM, 0),
168 SND_SOC_DAPM_DAC("Mono DAC", NULL, SND_SOC_NOPM, 0, 0),
201 {32, 256000, 8000, 0x05, 0x34, 0xDD, 0x55, 0x1F, 0x00, 0x95, 0x00, 0x1F, 2, 2},
202 {32, 512000, 16000, 0x05, 0x34, 0xDD, 0x55, 0x1F, 0x00, 0x94, 0x00, 0x1F, 2, 2},
203 {32, 1536000, 48000, 0x05, 0x33, 0xD5, 0x55, 0x1F, 0x00, 0x93, 0x00, 0x1F, 2, 2},
204 {36, 288000, 8000, 0x05, 0x34, 0xDD, 0x55, 0x23, 0x08, 0x95, 0x00, 0x1F, 2, 2},
205 {36, 576000, 16000, 0x05, 0x34, 0xDD, 0x55, 0x23, 0x08, 0x94, 0x00, 0x1F, 2, 2},
206 {36, 1728000, 48000, 0x05, 0x33, 0xD5, 0x55, 0x23, 0x08, 0x93, 0x00, 0x1F, 2, 2},
207 {48, 384000, 8000, 0x05, 0x14, 0x5D, 0x55, 0x17, 0x20, 0x94, 0x00, 0x28, 2, 2},
208 {48, 768000, 16000, 0x05, 0x14, 0x5D, 0x55, 0x17, 0x20, 0x94, 0x00, 0x28, 2, 2},
209 {48, 2304000, 48000, 0x05, 0x11, 0x53, 0x55, 0x17, 0x20, 0x92, 0x00, 0x28, 2, 2},
210 {50, 400000, 8000, 0x05, 0x14, 0x5D, 0x55, 0x18, 0x24, 0x94, 0x00, 0x27, 2, 2},
211 {50, 800000, 16000, 0x05, 0x14, 0x5D, 0x55, 0x18, 0x24, 0x94, 0x00, 0x27, 2, 2},
212 {50, 2400000, 48000, 0x05, 0x11, 0x53, 0x55, 0x18, 0x24, 0x92, 0x00, 0x27, 2, 2},
213 {64, 512000, 8000, 0x05, 0x14, 0x5D, 0x33, 0x1F, 0x00, 0x94, 0x00, 0x1F, 2, 2},
214 {64, 1024000, 16000, 0x05, 0x13, 0x55, 0x33, 0x1F, 0x00, 0x93, 0x00, 0x1F, 2, 2},
215 {64, 3072000, 48000, 0x05, 0x11, 0x53, 0x33, 0x1F, 0x00, 0x92, 0x00, 0x1F, 2, 2},
216 {72, 576000, 8000, 0x05, 0x14, 0x5D, 0x33, 0x23, 0x08, 0x94, 0x00, 0x1F, 2, 2},
217 {72, 1152000, 16000, 0x05, 0x13, 0x55, 0x33, 0x23, 0x08, 0x93, 0x00, 0x1F, 2, 2},
218 {72, 3456000, 48000, 0x05, 0x11, 0x53, 0x33, 0x23, 0x08, 0x92, 0x00, 0x1F, 2, 2},
219 {96, 768000, 8000, 0x15, 0x34, 0xDD, 0x55, 0x1F, 0x00, 0x94, 0x00, 0x1F, 2, 2},
220 {96, 1536000, 16000, 0x15, 0x34, 0xDD, 0x55, 0x1F, 0x00, 0x93, 0x00, 0x1F, 2, 2},
221 {96, 4608000, 48000, 0x15, 0x33, 0xD5, 0x55, 0x1F, 0x00, 0x92, 0x00, 0x1F, 2, 2},
222 {100, 800000, 8000, 0x05, 0x03, 0x35, 0x33, 0x18, 0x24, 0x94, 0x00, 0x27, 2, 2},
223 {100, 1600000, 16000, 0x05, 0x03, 0x35, 0x33, 0x18, 0x24, 0x93, 0x00, 0x27, 2, 2},
224 {100, 4800000, 48000, 0x03, 0x00, 0x31, 0x33, 0x18, 0x24, 0x92, 0x00, 0x27, 2, 2},
225 {128, 1024000, 8000, 0x05, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x93, 0x01, 0x1F, 2, 2},
226 {128, 2048000, 16000, 0x03, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x01, 0x1F, 2, 2},
227 {128, 6144000, 48000, 0x03, 0x00, 0x31, 0x11, 0x1F, 0x00, 0x92, 0x01, 0x1F, 2, 2},
228 {144, 1152000, 8000, 0x05, 0x03, 0x35, 0x11, 0x23, 0x08, 0x93, 0x01, 0x1F, 2, 2},
229 {144, 2304000, 16000, 0x03, 0x01, 0x33, 0x11, 0x23, 0x08, 0x92, 0x01, 0x1F, 2, 2},
230 {144, 6912000, 48000, 0x03, 0x00, 0x31, 0x11, 0x23, 0x08, 0x92, 0x01, 0x1F, 2, 2},
231 {192, 1536000, 8000, 0x15, 0x14, 0x5D, 0x33, 0x1F, 0x00, 0x93, 0x02, 0x1F, 2, 2},
232 {192, 3072000, 16000, 0x15, 0x13, 0x55, 0x33, 0x1F, 0x00, 0x92, 0x02, 0x1F, 2, 2},
233 {192, 9216000, 48000, 0x15, 0x11, 0x53, 0x33, 0x1F, 0x00, 0x92, 0x02, 0x1F, 2, 2},
234 {250, 12000000, 48000, 0x25, 0x11, 0x53, 0x55, 0x18, 0x24, 0x92, 0x04, 0x27, 2, 2},
235 {256, 2048000, 8000, 0x0D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x03, 0x1F, 2, 2},
236 {256, 4096000, 16000, 0x0B, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x03, 0x1F, 2, 2},
237 {256, 12288000, 48000, 0x0B, 0x00, 0x31, 0x11, 0x1F, 0x00, 0x92, 0x03, 0x1F, 2, 2},
238 {384, 3072000, 8000, 0x15, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x05, 0x1F, 2, 2},
239 {384, 6144000, 16000, 0x13, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x05, 0x1F, 2, 2},
240 {384, 18432000, 48000, 0x13, 0x00, 0x31, 0x11, 0x1F, 0x00, 0x92, 0x05, 0x1F, 2, 2},
241 {400, 19200000, 48000, 0x1B, 0x00, 0x31, 0x33, 0x18, 0x24, 0x92, 0x04, 0x27, 2, 2},
242 {500, 24000000, 48000, 0x23, 0x00, 0x31, 0x33, 0x18, 0x24, 0x92, 0x04, 0x27, 2, 2},
243 {512, 4096000, 8000, 0x1D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x07, 0x1F, 2, 2},
244 {512, 8192000, 16000, 0x1B, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x07, 0x1F, 2, 2},
245 {512, 24576000, 48000, 0x1B, 0x00, 0x31, 0x11, 0x1F, 0x00, 0x92, 0x07, 0x1F, 2, 2},
246 {768, 6144000, 8000, 0x2D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x0B, 0x1F, 2, 2},
247 {768, 12288000, 16000, 0x2B, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x0B, 0x1F, 2, 2},
248 {1024, 8192000, 8000, 0x3D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x0F, 0x1F, 2, 2},
249 {1024, 16384000, 16000, 0x3B, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x0F, 0x1F, 2, 2},
250 {1152, 9216000, 8000, 0x45, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x0F, 0x1F, 2, 2},
251 {1152, 18432000, 16000, 0x43, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x0F, 0x1F, 2, 2},
252 {1200, 9600000, 8000, 0x5D, 0x03, 0x35, 0x33, 0x18, 0x24, 0x92, 0x11, 0x27, 2, 2},
253 {1200, 19200000, 16000, 0x5D, 0x03, 0x35, 0x33, 0x18, 0x24, 0x92, 0x11, 0x27, 2, 2},
254 {1536, 12288000, 8000, 0x5D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x17, 0x1F, 2, 2},
255 {1536, 24576000, 16000, 0x5B, 0x01, 0x33, 0x11, 0x1F, 0x00, 0x92, 0x17, 0x1F, 2, 2},
256 {2048, 16384000, 8000, 0x7D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x1F, 0x1F, 2, 2},
257 {2304, 18432000, 8000, 0x8D, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x23, 0x1F, 2, 2},
258 {2400, 19200000, 8000, 0xBD, 0x03, 0x35, 0x33, 0x18, 0x24, 0x92, 0x25, 0x27, 2, 2},
259 {3072, 24576000, 8000, 0xBD, 0x03, 0x35, 0x11, 0x1F, 0x00, 0x92, 0x2F, 0x1F, 2, 2},
260 {32, 3072000, 96000, 0x05, 0x11, 0x53, 0x55, 0x0F, 0x00, 0x92, 0x00, 0x37, 2, 2},
261 {64, 6144000, 96000, 0x03, 0x00, 0x31, 0x33, 0x0F, 0x00, 0x92, 0x00, 0x37, 2, 2},
262 {96, 9216000, 96000, 0x15, 0x11, 0x53, 0x55, 0x0F, 0x00, 0x92, 0x00, 0x37, 2, 2},
263 {128, 12288000, 96000, 0x0B, 0x00, 0x31, 0x33, 0x0F, 0x00, 0x92, 0x01, 0x37, 2, 2},
271 for (i = 0; i < ARRAY_SIZE(coeff_div); i++) { in get_coeff()
273 vddd_det = ~(coeff_div[i].dvdd_vol ^ vddd) & 0x01; in get_coeff()
274 dmic_det = ~(coeff_div[i].dmic_sel ^ dmic) & 0x01; in get_coeff()
275 vddd_det |= ~(coeff_div[i].dvdd_vol % 2) & 0x01; in get_coeff()
276 dmic_det |= ~(coeff_div[i].dmic_sel % 2) & 0x01; in get_coeff()
292 u8 dmic_enable, iface = 0; in es8375_hw_params()
298 ES8375_MCLK_SEL, 0x80, 0x80); in es8375_hw_params()
304 dmic_enable = regv >> 7 & 0x01; in es8375_hw_params()
320 if (coeff < 0) { in es8375_hw_params()
345 iface |= 0x0c; in es8375_hw_params()
348 iface |= 0x04; in es8375_hw_params()
353 iface |= 0x10; in es8375_hw_params()
357 regmap_update_bits(es8375->regmap, ES8375_SDP, 0x1c, iface); in es8375_hw_params()
359 return 0; in es8375_hw_params()
370 return 0; in es8375_set_sysclk()
385 0x80, 0x80); in es8375_set_dai_fmt()
388 es8375->mastermode = 0; in es8375_set_dai_fmt()
390 0x80, 0x00); in es8375_set_dai_fmt()
398 codeciface &= 0xFC; in es8375_set_dai_fmt()
403 codeciface &= 0xFC; in es8375_set_dai_fmt()
404 codeciface |= 0x01; in es8375_set_dai_fmt()
407 codeciface &= 0xDC; in es8375_set_dai_fmt()
408 codeciface |= 0x03; in es8375_set_dai_fmt()
411 codeciface &= 0xDC; in es8375_set_dai_fmt()
412 codeciface |= 0x23; in es8375_set_dai_fmt()
422 iface &= 0xFE; in es8375_set_dai_fmt()
423 codeciface &= 0xDF; in es8375_set_dai_fmt()
426 iface |= 0x01; in es8375_set_dai_fmt()
427 codeciface |= 0x20; in es8375_set_dai_fmt()
430 iface |= 0x01; in es8375_set_dai_fmt()
431 codeciface &= 0xDF; in es8375_set_dai_fmt()
434 iface &= 0xFE; in es8375_set_dai_fmt()
435 codeciface |= 0x20; in es8375_set_dai_fmt()
444 return 0; in es8375_set_dai_fmt()
460 regmap_write(es8375->regmap, ES8375_CSM1, 0xA6); in es8375_set_bias_level()
465 regmap_write(es8375->regmap, ES8375_CSM1, 0x96); in es8375_set_bias_level()
471 return 0; in es8375_set_bias_level()
481 regmap_update_bits(es8375->regmap, ES8375_SDP, 0x40, 0x40); in es8375_mute()
483 regmap_update_bits(es8375->regmap, ES8375_SDP2, 0x20, 0x20); in es8375_mute()
486 regmap_update_bits(es8375->regmap, ES8375_SDP, 0x40, 0x00); in es8375_mute()
488 regmap_update_bits(es8375->regmap, ES8375_SDP2, 0x20, 0x00); in es8375_mute()
491 return 0; in es8375_mute()
530 regmap_write(es8375->regmap, ES8375_CLK_MGR10, 0x95); in es8375_init()
531 regmap_write(es8375->regmap, ES8375_CLK_MGR3, 0x48); in es8375_init()
532 regmap_write(es8375->regmap, ES8375_DIV_SPKCLK, 0x18); in es8375_init()
533 regmap_write(es8375->regmap, ES8375_CLK_MGR4, 0x02); in es8375_init()
534 regmap_write(es8375->regmap, ES8375_CLK_MGR5, 0x05); in es8375_init()
535 regmap_write(es8375->regmap, ES8375_CSM1, 0x82); in es8375_init()
536 regmap_write(es8375->regmap, ES8375_VMID_CHARGE2, 0x20); in es8375_init()
537 regmap_write(es8375->regmap, ES8375_VMID_CHARGE3, 0x20); in es8375_init()
538 regmap_write(es8375->regmap, ES8375_DAC_CAL, 0x28); in es8375_init()
539 regmap_write(es8375->regmap, ES8375_ANALOG_SPK1, 0xFC); in es8375_init()
540 regmap_write(es8375->regmap, ES8375_ANALOG_SPK2, 0xE0); in es8375_init()
541 regmap_write(es8375->regmap, ES8375_VMID_SEL, 0xFE); in es8375_init()
542 regmap_write(es8375->regmap, ES8375_ANALOG1, 0xB8); in es8375_init()
543 regmap_write(es8375->regmap, ES8375_SYS_CTRL2, 0x03); in es8375_init()
544 regmap_write(es8375->regmap, ES8375_CLK_MGR2, 0x16); in es8375_init()
545 regmap_write(es8375->regmap, ES8375_RESET1, 0x00); in es8375_init()
547 regmap_write(es8375->regmap, ES8375_CLK_MGR3, 0x00); in es8375_init()
548 regmap_write(es8375->regmap, ES8375_CSM1, 0x86); in es8375_init()
549 regmap_write(es8375->regmap, ES8375_CLK_MGR4, 0x0B); in es8375_init()
550 regmap_write(es8375->regmap, ES8375_CLK_MGR5, 0x00); in es8375_init()
551 regmap_write(es8375->regmap, ES8375_CLK_MGR6, 0x31); in es8375_init()
552 regmap_write(es8375->regmap, ES8375_CLK_MGR7, 0x11); in es8375_init()
553 regmap_write(es8375->regmap, ES8375_CLK_MGR8, 0x1F); in es8375_init()
554 regmap_write(es8375->regmap, ES8375_CLK_MGR9, 0x00); in es8375_init()
555 regmap_write(es8375->regmap, ES8375_ADC_OSR_GAIN, 0x1F); in es8375_init()
556 regmap_write(es8375->regmap, ES8375_ADC2, 0x00); in es8375_init()
557 regmap_write(es8375->regmap, ES8375_DAC2, 0x00); in es8375_init()
558 regmap_write(es8375->regmap, ES8375_DAC_OTP, 0x88); in es8375_init()
559 regmap_write(es8375->regmap, ES8375_ANALOG_SPK2, 0xE7); in es8375_init()
560 regmap_write(es8375->regmap, ES8375_ANALOG2, 0xF0); in es8375_init()
561 regmap_write(es8375->regmap, ES8375_ANALOG3, 0x40); in es8375_init()
562 regmap_write(es8375->regmap, ES8375_CLK_MGR2, 0xFE); in es8375_init()
564 regmap_update_bits(es8375->regmap, ES8375_SDP, 0x40, 0x40); in es8375_init()
565 regmap_update_bits(es8375->regmap, ES8375_SDP2, 0x20, 0x20); in es8375_init()
572 regmap_write(es8375->regmap, ES8375_CSM1, 0x96); in es8375_suspend()
575 return 0; in es8375_suspend()
588 if (reg == 0x00) in es8375_resume()
595 return 0; in es8375_resume()
602 es8375->mastermode = 0; in es8375_codec_probe()
606 return 0; in es8375_codec_probe()
654 if (ret != 0) in es8375_read_device_properities()
658 for (i = 0; i < ARRAY_SIZE(es8375_core_supplies); i++) in es8375_read_device_properities()
685 return 0; in es8375_read_device_properities()
708 if (ret < 0) { in es8375_i2c_probe()
714 if (val != 0x83) { in es8375_i2c_probe()
721 if (val != 0x75) { in es8375_i2c_probe()
728 if (ret != 0) { in es8375_i2c_probe()
743 regmap_write(es8375->regmap, ES8375_CSM1, 0x3C); in es8375_i2c_shutdown()
744 regmap_write(es8375->regmap, ES8375_CLK_MGR3, 0x48); in es8375_i2c_shutdown()
745 regmap_write(es8375->regmap, ES8375_CSM2, 0x80); in es8375_i2c_shutdown()
746 regmap_write(es8375->regmap, ES8375_CSM1, 0x3E); in es8375_i2c_shutdown()
747 regmap_write(es8375->regmap, ES8375_CLK_MGR10, 0x15); in es8375_i2c_shutdown()
748 regmap_write(es8375->regmap, ES8375_SYS_CTRL2, 0x0C); in es8375_i2c_shutdown()
749 regmap_write(es8375->regmap, ES8375_RESET1, 0x00); in es8375_i2c_shutdown()
750 regmap_write(es8375->regmap, ES8375_CSM2, 0x00); in es8375_i2c_shutdown()
764 {"ESSX8375", 0},