Lines Matching +full:0 +full:xd0
44 if ((reg <= 0xff)) in es8389_volatile_register()
50 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -9550, 50, 0);
51 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -9550, 50, 0);
52 static const DECLARE_TLV_DB_SCALE(pga_vol_tlv, 0, 300, 0);
53 static const DECLARE_TLV_DB_SCALE(mix_vol_tlv, -9500, 100, 0);
54 static const DECLARE_TLV_DB_SCALE(alc_target_tlv, -3200, 200, 0);
55 static const DECLARE_TLV_DB_SCALE(alc_max_level, -3200, 200, 0);
67 val = ucontrol->value.integer.value[0]; in es8389_dmic_set()
72 regmap_update_bits_check(es8389->regmap, ES8389_DMIC_EN, 0xC0, 0xC0, &changed1); in es8389_dmic_set()
73 regmap_update_bits_check(es8389->regmap, ES8389_ADC_MODE, 0x03, 0x03, &changed2); in es8389_dmic_set()
75 regmap_update_bits_check(es8389->regmap, ES8389_DMIC_EN, 0xC0, 0x00, &changed1); in es8389_dmic_set()
76 regmap_update_bits_check(es8389->regmap, ES8389_ADC_MODE, 0x03, 0x00, &changed2); in es8389_dmic_set()
82 return 0; in es8389_dmic_set()
135 SOC_ENUM_SINGLE(ES8389_ALC_CTL, 0, 16, winsize);
196 SOC_DAPM_SINGLE("DACR DACL Mixer", ES8389_DAC_MIX, 3, 1, 0),
200 SOC_DAPM_SINGLE("DACL DACR Mixer", ES8389_DAC_MIX, 2, 1, 0),
204 SOC_DAPM_SINGLE("ADCL DACL Mixer", ES8389_DAC_MIX, 1, 1, 0),
208 SOC_DAPM_SINGLE("ADCR DACR Mixer", ES8389_DAC_MIX, 0, 1, 0),
212 SOC_DAPM_SINGLE("DACL ADCL Mixer", ES8389_ADC_RESET, 7, 1, 0),
213 SOC_DAPM_SINGLE("DACR ADCR Mixer", ES8389_ADC_RESET, 6, 1, 0),
217 SOC_SINGLE_TLV("ADCL Capture Volume", ES8389_ADCL_VOL, 0, 0xFF, 0, adc_vol_tlv),
218 SOC_SINGLE_TLV("ADCR Capture Volume", ES8389_ADCR_VOL, 0, 0xFF, 0, adc_vol_tlv),
219 SOC_SINGLE_TLV("ADCL PGA Volume", ES8389_MIC1_GAIN, 0, 0x0E, 0, pga_vol_tlv),
220 SOC_SINGLE_TLV("ADCR PGA Volume", ES8389_MIC2_GAIN, 0, 0x0E, 0, pga_vol_tlv),
226 0, 0x0f, 0, alc_target_tlv),
228 0, 0x0f, 0, alc_max_level),
231 SOC_DOUBLE("ADC OSR Volume ON Switch", ES8389_ADC_MUTE, 6, 7, 1, 0),
232 SOC_SINGLE_TLV("ADC OSR Volume", ES8389_OSR_VOL, 0, 0xFF, 0, adc_vol_tlv),
233 SOC_DOUBLE("ADC OUTPUT Invert Switch", ES8389_ADC_HPF2, 5, 6, 1, 0),
235 SOC_SINGLE_TLV("DACL Playback Volume", ES8389_DACL_VOL, 0, 0xFF, 0, dac_vol_tlv),
236 SOC_SINGLE_TLV("DACR Playback Volume", ES8389_DACR_VOL, 0, 0xFF, 0, dac_vol_tlv),
237 SOC_DOUBLE("DAC OUTPUT Invert Switch", ES8389_DAC_INV, 5, 6, 1, 0),
238 SOC_SINGLE_TLV("ADC2DAC Mixer Volume", ES8389_MIX_VOL, 0, 0x7F, 0, mix_vol_tlv),
246 SND_SOC_DAPM_PGA("PGAL", SND_SOC_NOPM, 4, 0, NULL, 0),
247 SND_SOC_DAPM_PGA("PGAR", SND_SOC_NOPM, 4, 0, NULL, 0),
250 SND_SOC_DAPM_ADC("ADCL", NULL, SND_SOC_NOPM, 0, 0),
251 SND_SOC_DAPM_ADC("ADCR", NULL, SND_SOC_NOPM, 0, 0),
254 SND_SOC_DAPM_AIF_OUT("I2S OUT", "I2S Capture", 0, SND_SOC_NOPM, 0, 0),
255 SND_SOC_DAPM_AIF_IN("I2S IN", "I2S Playback", 0, SND_SOC_NOPM, 0, 0),
258 SND_SOC_DAPM_DAC("DACL", NULL, SND_SOC_NOPM, 0, 0),
259 SND_SOC_DAPM_DAC("DACR", NULL, SND_SOC_NOPM, 0, 0),
266 SND_SOC_DAPM_PGA("IF DAC", SND_SOC_NOPM, 0, 0, NULL, 0),
267 SND_SOC_DAPM_PGA("IF DACL1", SND_SOC_NOPM, 0, 0, NULL, 0),
268 SND_SOC_DAPM_PGA("IF DACR1", SND_SOC_NOPM, 0, 0, NULL, 0),
269 SND_SOC_DAPM_PGA("IF DACL2", SND_SOC_NOPM, 0, 0, NULL, 0),
270 SND_SOC_DAPM_PGA("IF DACR2", SND_SOC_NOPM, 0, 0, NULL, 0),
271 SND_SOC_DAPM_PGA("IF DACL3", SND_SOC_NOPM, 0, 0, NULL, 0),
272 SND_SOC_DAPM_PGA("IF DACR3", SND_SOC_NOPM, 0, 0, NULL, 0),
275 SND_SOC_DAPM_MIXER("IF DACL Mixer", SND_SOC_NOPM, 0, 0,
276 &es8389_left_mixer_controls[0],
278 SND_SOC_DAPM_MIXER("IF DACR Mixer", SND_SOC_NOPM, 0, 0,
279 &es8389_right_mixer_controls[0],
281 SND_SOC_DAPM_MIXER("IF ADCDACL Mixer", SND_SOC_NOPM, 0, 0,
282 &es8389_leftadc_mixer_controls[0],
284 SND_SOC_DAPM_MIXER("IF ADCDACR Mixer", SND_SOC_NOPM, 0, 0,
285 &es8389_rightadc_mixer_controls[0],
288 SND_SOC_DAPM_MIXER("ADC Mixer", SND_SOC_NOPM, 0, 0,
289 &es8389_adc_mixer_controls[0],
291 SND_SOC_DAPM_MUX("ADC MUX", SND_SOC_NOPM, 0, 0, &es8389_dmic_mux_controls),
293 SND_SOC_DAPM_MUX("OUTL MUX", SND_SOC_NOPM, 0, 0, &es8389_outl_mux_controls),
294 SND_SOC_DAPM_MUX("OUTR MUX", SND_SOC_NOPM, 0, 0, &es8389_outr_mux_controls),
374 …, 256000, 8000, 0x00, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
375 …, 288000, 8000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
376 …, 384000, 8000, 0x02, 0x5F, 0x04, 0xC0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
377 …, 512000, 8000, 0x00, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
378 …, 576000, 8000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
379 …, 768000, 8000, 0x02, 0x57, 0x84, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
380 … 1024000, 8000, 0x00, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
381 … 1536000, 8000, 0x02, 0x4D, 0x24, 0xC0, 0x03, 0xD1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
382 … 2048000, 8000, 0x01, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
383 … 2304000, 8000, 0x01, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
384 … 3072000, 8000, 0x02, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
385 … 4096000, 8000, 0x00, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
386 … 6144000, 8000, 0x05, 0x45, 0x04, 0xD0, 0x03, 0xC1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
387 … 8192000, 8000, 0x01, 0x41, 0x06, 0xE0, 0x00, 0xD1, 0xB0, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
388 …12288000, 8000, 0x02, 0x41, 0x04, 0xE0, 0x00, 0xD1, 0xB0, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
389 …13000000, 8000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
390 …16384000, 8000, 0x03, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
391 …18432000, 8000, 0x11, 0x45, 0x25, 0xF0, 0x00, 0xD1, 0xB0, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
392 …24576000, 8000, 0x05, 0x44, 0x01, 0xC0, 0x00, 0xD2, 0x80, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
393 … 512000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
394 … 576000, 16000, 0x00, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
395 … 768000, 16000, 0x02, 0x57, 0x04, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
396 … 800000, 16000, 0x00, 0x7E, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
397 …1024000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
398 …1152000, 16000, 0x00, 0x45, 0x24, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
399 …1536000, 16000, 0x02, 0x55, 0x84, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
400 …2048000, 16000, 0x00, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
401 …2304000, 16000, 0x00, 0x51, 0x00, 0xC0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x23, 0x8F, 0xB7, 0xC0, 0x1F…
402 …3072000, 16000, 0x02, 0x65, 0x25, 0xE0, 0x00, 0xE1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
403 …4096000, 16000, 0x00, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
404 …4800000, 16000, 0x02, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x00, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
405 …6144000, 16000, 0x02, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
406 …8192000, 16000, 0x01, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
407 …2000000, 16000, 0x0E, 0x7E, 0x01, 0xC9, 0x00, 0xC2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
408 …2288000, 16000, 0x02, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
409 …6384000, 16000, 0x03, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
410 …8432000, 16000, 0x08, 0x51, 0x04, 0xD0, 0x01, 0xC1, 0x90, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
411 …9200000, 16000, 0x0B, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
412 …4000000, 16000, 0x0E, 0x26, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0xC0, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
413 …4576000, 16000, 0x05, 0x41, 0x04, 0xC0, 0x01, 0xD1, 0x90, 0xC0, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0xFF…
414 …6000000, 16000, 0x40, 0x6E, 0x05, 0xC8, 0x01, 0xC2, 0x90, 0xC0, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
415 …9200000, 24000, 0x07, 0x66, 0x01, 0xD9, 0x00, 0xC2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0xC7…
416 …9200000, 32000, 0x05, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
417 …1411200, 44100, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
418 …2822400, 44100, 0x00, 0x51, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
419 …5644800, 44100, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
420 …1289600, 44100, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
421 …2579200, 44100, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
422 …1536000, 48000, 0x00, 0x45, 0xA4, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
423 …2304000, 48000, 0x02, 0x55, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
424 …2400000, 48000, 0x00, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
425 …3072000, 48000, 0x00, 0x51, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
426 …4800000, 48000, 0x00, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
427 …6000000, 48000, 0x04, 0x6E, 0x05, 0xC8, 0x10, 0xC2, 0x80, 0x00, 0x01, 0x18, 0x95, 0xD0, 0xC0, 0x63…
428 …6144000, 48000, 0x00, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
429 …9600000, 48000, 0x01, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x00, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
430 …2000000, 48000, 0x04, 0x76, 0x01, 0xC8, 0x10, 0xC2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
431 …2288000, 48000, 0x01, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
432 …8432000, 48000, 0x02, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0x40, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
433 …9200000, 48000, 0x03, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0x40, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
434 …4000000, 48000, 0x04, 0x46, 0x01, 0xD8, 0x10, 0xD2, 0x80, 0xC0, 0x00, 0x18, 0x95, 0xD0, 0xC0, 0x63…
435 …4576000, 48000, 0x03, 0x41, 0x04, 0xD0, 0x10, 0xD1, 0x80, 0xC0, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
436 …8400000, 48000, 0x18, 0x45, 0x04, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x00, 0x1F, 0x7F, 0xBF, 0xC0, 0x7F…
437 …1289600, 88200, 0x00, 0x50, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0x40, 0x00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F…
438 …6144000, 96000, 0x00, 0x41, 0x00, 0xD0, 0x10, 0xD1, 0x80, 0x00, 0x00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F…
439 …2288000, 96000, 0x00, 0x50, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F…
440 …4576000, 96000, 0x00, 0x40, 0x00, 0xC0, 0x10, 0xC1, 0x80, 0xC0, 0x00, 0x9F, 0x7F, 0xBF, 0xC0, 0x7F…
441 …576000, 192000, 0x00, 0x50, 0x00, 0xC0, 0x18, 0xC1, 0x81, 0xC0, 0x00, 0x8F, 0x7F, 0xEF, 0xC0, 0x3F…
443 …, 400000, 8000, 0x00, 0x75, 0x05, 0xC8, 0x01, 0xC1, 0x90, 0x10, 0x00, 0x18, 0xC7, 0xD0, 0xC0, 0x8F…
444 … 4800000, 8000, 0x05, 0x65, 0x25, 0xF9, 0x00, 0xD1, 0x90, 0x10, 0x00, 0x18, 0xC7, 0xD0, 0xC0, 0x8F…
445 …12000000, 8000, 0x0E, 0x25, 0x25, 0xE8, 0x00, 0xD1, 0x90, 0x40, 0x00, 0x31, 0xC7, 0xC5, 0x00, 0x8F…
446 …19200000, 8000, 0x0B, 0x01, 0x00, 0xD0, 0x00, 0xD1, 0x80, 0x90, 0x00, 0x31, 0xC7, 0xC5, 0x00, 0xC7…
447 …24000000, 8000, 0x0E, 0x24, 0x05, 0xD0, 0x00, 0xC2, 0x80, 0xC0, 0x00, 0x31, 0xC7, 0xC5, 0x00, 0x8F…
448 …26000000, 8000, 0x40, 0x05, 0xA4, 0xC0, 0x00, 0xD1, 0x80, 0xD0, 0x00, 0x31, 0xC7, 0xC5, 0x00, 0xC7…
455 for (i = 0; i < ARRAY_SIZE(coeff_div); i++) { in get_coeff()
473 return 0; in es8389_set_dai_sysclk()
487 return 0; in es8389_set_tdm_slot()
494 u8 state = 0; in es8389_set_dai_fmt()
503 es8389->mastermode = 0; in es8389_set_dai_fmt()
531 return 0; in es8389_set_dai_fmt()
541 u8 state = 0; in es8389_pcm_hw_params()
573 if (coeff >= 0) { in es8389_pcm_hw_params()
582 0xC0, coeff_div[coeff].Reg0x0F); in es8389_pcm_hw_params()
588 0xC0, coeff_div[coeff].Reg0x30); in es8389_pcm_hw_params()
592 0x81, coeff_div[coeff].Reg0x43); in es8389_pcm_hw_params()
594 0x72, coeff_div[coeff].Reg0xF0); in es8389_pcm_hw_params()
603 return 0; in es8389_pcm_hw_params()
618 regmap_update_bits(es8389->regmap, ES8389_HPSW, 0x20, 0x20); in es8389_set_bias_level()
619 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0xD9); in es8389_set_bias_level()
620 regmap_write(es8389->regmap, ES8389_ADC_EN, 0x8F); in es8389_set_bias_level()
621 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xE4); in es8389_set_bias_level()
622 regmap_write(es8389->regmap, ES8389_RESET, 0x01); in es8389_set_bias_level()
623 regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0xC3); in es8389_set_bias_level()
624 regmap_update_bits(es8389->regmap, ES8389_ADC_HPF1, 0x0f, 0x0a); in es8389_set_bias_level()
625 regmap_update_bits(es8389->regmap, ES8389_ADC_HPF2, 0x0f, 0x0a); in es8389_set_bias_level()
627 regmap_write(es8389->regmap, ES8389_DAC_RESET, 0X00); in es8389_set_bias_level()
632 regmap_update_bits(es8389->regmap, ES8389_ADC_HPF1, 0x0f, 0x04); in es8389_set_bias_level()
633 regmap_update_bits(es8389->regmap, ES8389_ADC_HPF2, 0x0f, 0x04); in es8389_set_bias_level()
634 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xD4); in es8389_set_bias_level()
636 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x59); in es8389_set_bias_level()
637 regmap_write(es8389->regmap, ES8389_ADC_EN, 0x00); in es8389_set_bias_level()
638 regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0x00); in es8389_set_bias_level()
639 regmap_write(es8389->regmap, ES8389_RESET, 0x7E); in es8389_set_bias_level()
640 regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x80); in es8389_set_bias_level()
642 regmap_update_bits(es8389->regmap, ES8389_DAC_INV, 0x80, 0x00); in es8389_set_bias_level()
649 return 0; in es8389_set_bias_level()
662 0x03, 0x03); in es8389_mute()
665 0x03, 0x03); in es8389_mute()
670 0x03, 0x00); in es8389_mute()
673 0x03, 0x00); in es8389_mute()
677 return 0; in es8389_mute()
717 regmap_write(es8389->regmap, ES8389_ISO_CTL, 0x00); in es8389_init()
718 regmap_write(es8389->regmap, ES8389_RESET, 0x7E); in es8389_init()
719 regmap_write(es8389->regmap, ES8389_ISO_CTL, 0x38); in es8389_init()
720 regmap_write(es8389->regmap, ES8389_ADC_HPF1, 0x64); in es8389_init()
721 regmap_write(es8389->regmap, ES8389_ADC_HPF2, 0x04); in es8389_init()
722 regmap_write(es8389->regmap, ES8389_DAC_INV, 0x03); in es8389_init()
724 regmap_write(es8389->regmap, ES8389_VMID, 0x2A); in es8389_init()
725 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0xC9); in es8389_init()
726 regmap_write(es8389->regmap, ES8389_ANA_VSEL, 0x4F); in es8389_init()
727 regmap_write(es8389->regmap, ES8389_ANA_CTL2, 0x06); in es8389_init()
728 regmap_write(es8389->regmap, ES8389_LOW_POWER1, 0x00); in es8389_init()
729 regmap_write(es8389->regmap, ES8389_DMIC_EN, 0x16); in es8389_init()
731 regmap_write(es8389->regmap, ES8389_PGA_SW, 0xAA); in es8389_init()
732 regmap_write(es8389->regmap, ES8389_MOD_SW1, 0x66); in es8389_init()
733 regmap_write(es8389->regmap, ES8389_MOD_SW2, 0x99); in es8389_init()
734 regmap_write(es8389->regmap, ES8389_ADC_MODE, (0x00 | ES8389_TDM_MODE)); in es8389_init()
735 regmap_update_bits(es8389->regmap, ES8389_DMIC_EN, 0xC0, 0x00); in es8389_init()
736 regmap_update_bits(es8389->regmap, ES8389_ADC_MODE, 0x03, 0x00); in es8389_init()
742 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xC4); in es8389_init()
743 regmap_write(es8389->regmap, ES8389_MASTER_MODE, 0x08); in es8389_init()
744 regmap_write(es8389->regmap, ES8389_CSM_STATE1, 0x00); in es8389_init()
745 regmap_write(es8389->regmap, ES8389_SYSTEM12, 0x01); in es8389_init()
746 regmap_write(es8389->regmap, ES8389_SYSTEM13, 0x01); in es8389_init()
747 regmap_write(es8389->regmap, ES8389_SYSTEM14, 0x01); in es8389_init()
748 regmap_write(es8389->regmap, ES8389_SYSTEM15, 0x01); in es8389_init()
749 regmap_write(es8389->regmap, ES8389_SYSTEM16, 0x35); in es8389_init()
750 regmap_write(es8389->regmap, ES8389_SYSTEM17, 0x09); in es8389_init()
751 regmap_write(es8389->regmap, ES8389_SYSTEM18, 0x91); in es8389_init()
752 regmap_write(es8389->regmap, ES8389_SYSTEM19, 0x28); in es8389_init()
753 regmap_write(es8389->regmap, ES8389_SYSTEM1A, 0x01); in es8389_init()
754 regmap_write(es8389->regmap, ES8389_SYSTEM1B, 0x01); in es8389_init()
755 regmap_write(es8389->regmap, ES8389_SYSTEM1C, 0x11); in es8389_init()
757 regmap_write(es8389->regmap, ES8389_CHIP_MISC, 0x13); in es8389_init()
758 regmap_write(es8389->regmap, ES8389_MASTER_CLK, 0x00); in es8389_init()
759 regmap_write(es8389->regmap, ES8389_CLK_DIV1, 0x00); in es8389_init()
760 regmap_write(es8389->regmap, ES8389_CLK_MUL, 0x10); in es8389_init()
761 regmap_write(es8389->regmap, ES8389_CLK_MUX1, 0x00); in es8389_init()
762 regmap_write(es8389->regmap, ES8389_CLK_MUX2, 0xC0); in es8389_init()
763 regmap_write(es8389->regmap, ES8389_CLK_CTL1, 0x00); in es8389_init()
764 regmap_write(es8389->regmap, ES8389_CLK_CTL2, 0xC0); in es8389_init()
765 regmap_write(es8389->regmap, ES8389_CLK_CTL3, 0x80); in es8389_init()
766 regmap_write(es8389->regmap, ES8389_SCLK_DIV, 0x04); in es8389_init()
767 regmap_write(es8389->regmap, ES8389_LRCK_DIV1, 0x01); in es8389_init()
768 regmap_write(es8389->regmap, ES8389_LRCK_DIV2, 0x00); in es8389_init()
769 regmap_write(es8389->regmap, ES8389_OSC_CLK, 0x00); in es8389_init()
770 regmap_write(es8389->regmap, ES8389_ADC_OSR, 0x1F); in es8389_init()
771 regmap_write(es8389->regmap, ES8389_ADC_DSP, 0x7F); in es8389_init()
772 regmap_write(es8389->regmap, ES8389_ADC_MUTE, 0xC0); in es8389_init()
773 regmap_write(es8389->regmap, ES8389_SYSTEM30, 0xF4); in es8389_init()
774 regmap_write(es8389->regmap, ES8389_DAC_DSM_OSR, 0x7F); in es8389_init()
775 regmap_write(es8389->regmap, ES8389_DAC_DSP_OSR, 0x7F); in es8389_init()
776 regmap_write(es8389->regmap, ES8389_DAC_MISC, 0x10); in es8389_init()
777 regmap_write(es8389->regmap, ES8389_DAC_RAMP, 0x0F); in es8389_init()
778 regmap_write(es8389->regmap, ES8389_SYSTEM4C, 0xC0); in es8389_init()
779 regmap_write(es8389->regmap, ES8389_RESET, 0x00); in es8389_init()
780 regmap_write(es8389->regmap, ES8389_CLK_OFF1, 0xC1); in es8389_init()
781 regmap_write(es8389->regmap, ES8389_RESET, 0x01); in es8389_init()
782 regmap_write(es8389->regmap, ES8389_DAC_RESET, 0x02); in es8389_init()
784 regmap_update_bits(es8389->regmap, ES8389_ADC_FORMAT_MUTE, 0x03, 0x03); in es8389_init()
785 regmap_update_bits(es8389->regmap, ES8389_DAC_FORMAT_MUTE, 0x03, 0x03); in es8389_init()
796 return 0; in es8389_suspend()
809 if (regv == 0xff) in es8389_resume()
816 return 0; in es8389_resume()
825 if (ret != 0) { in es8389_probe()
847 return 0; in es8389_probe()
854 regmap_write(es8389->regmap, ES8389_MASTER_MODE, 0x28); in es8389_remove()
855 regmap_write(es8389->regmap, ES8389_HPSW, 0x00); in es8389_remove()
856 regmap_write(es8389->regmap, ES8389_VMID, 0x00); in es8389_remove()
857 regmap_write(es8389->regmap, ES8389_RESET, 0x00); in es8389_remove()
858 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xCC); in es8389_remove()
860 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0x00); in es8389_remove()
861 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x08); in es8389_remove()
862 regmap_write(es8389->regmap, ES8389_ISO_CTL, 0xC1); in es8389_remove()
863 regmap_write(es8389->regmap, ES8389_PULL_DOWN, 0x00); in es8389_remove()
900 regmap_write(es8389->regmap, ES8389_MASTER_MODE, 0x28); in es8389_i2c_shutdown()
901 regmap_write(es8389->regmap, ES8389_HPSW, 0x00); in es8389_i2c_shutdown()
902 regmap_write(es8389->regmap, ES8389_VMID, 0x00); in es8389_i2c_shutdown()
903 regmap_write(es8389->regmap, ES8389_RESET, 0x00); in es8389_i2c_shutdown()
904 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0xCC); in es8389_i2c_shutdown()
906 regmap_write(es8389->regmap, ES8389_CSM_JUMP, 0x00); in es8389_i2c_shutdown()
907 regmap_write(es8389->regmap, ES8389_ANA_CTL1, 0x08); in es8389_i2c_shutdown()
908 regmap_write(es8389->regmap, ES8389_ISO_CTL, 0xC1); in es8389_i2c_shutdown()
909 regmap_write(es8389->regmap, ES8389_PULL_DOWN, 0x00); in es8389_i2c_shutdown()