Lines Matching +full:adc +full:- +full:freq

1 // SPDX-License-Identifier: GPL-2.0-or-later
85 48, 127, TLV_DB_SCALE_ITEM(-7400, 100, 0)
88 static const DECLARE_TLV_DB_SCALE(ssm260x_inpga_tlv, -3450, 150, 0);
89 static const DECLARE_TLV_DB_SCALE(ssm260x_sidetone_tlv, -1500, 300, 0);
96 SOC_SINGLE("ADC High Pass Filter Switch", SSM2602_APDIGI, 0, 1, 1),
99 SOC_ENUM("Playback De-emphasis", ssm2602_enum[1]),
136 * is activated too early, or even before the ADC is powered up, audible in ssm2602_mic_switch_event()
148 SND_SOC_DAPM_ADC("ADC", "HiFi Capture", SSM2602_PWR, 2, 1),
178 ARRAY_SIZE(ssm260x_output_mixer_controls) - 1), /* Last element is the mic */
183 {"ADC", NULL, "Digital Core Power"},
203 {"ADC", NULL, "Input Mux"},
211 {"ADC", NULL, "Line Input"},
302 return -EINVAL; in ssm2602_get_coeff()
309 struct snd_soc_component *component = dai->component; in ssm2602_hw_params()
311 int srate = ssm2602_get_coeff(ssm2602->sysclk, params_rate(params)); in ssm2602_hw_params()
317 regmap_write(ssm2602->regmap, SSM2602_SRATE, srate); in ssm2602_hw_params()
334 return -EINVAL; in ssm2602_hw_params()
336 regmap_update_bits(ssm2602->regmap, SSM2602_IFACE, in ssm2602_hw_params()
344 struct snd_soc_component *component = dai->component; in ssm2602_startup()
347 if (ssm2602->sysclk_constraints) { in ssm2602_startup()
348 snd_pcm_hw_constraint_list(substream->runtime, 0, in ssm2602_startup()
350 ssm2602->sysclk_constraints); in ssm2602_startup()
358 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(dai->component); in ssm2602_mute()
361 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
365 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
371 int clk_id, unsigned int freq, int dir) in ssm2602_set_dai_sysclk() argument
373 struct snd_soc_component *component = codec_dai->component; in ssm2602_set_dai_sysclk()
378 return -EINVAL; in ssm2602_set_dai_sysclk()
380 switch (freq) { in ssm2602_set_dai_sysclk()
385 ssm2602->sysclk_constraints = &ssm2602_constraints_12288000; in ssm2602_set_dai_sysclk()
391 ssm2602->sysclk_constraints = &ssm2602_constraints_11289600; in ssm2602_set_dai_sysclk()
395 ssm2602->sysclk_constraints = NULL; in ssm2602_set_dai_sysclk()
398 return -EINVAL; in ssm2602_set_dai_sysclk()
401 ssm2602->sysclk = freq; in ssm2602_set_dai_sysclk()
413 return -EINVAL; in ssm2602_set_dai_sysclk()
416 if (freq == 0) in ssm2602_set_dai_sysclk()
417 ssm2602->clk_out_pwr |= mask; in ssm2602_set_dai_sysclk()
419 ssm2602->clk_out_pwr &= ~mask; in ssm2602_set_dai_sysclk()
421 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_dai_sysclk()
422 PWR_CLK_OUT_PDN | PWR_OSC_PDN, ssm2602->clk_out_pwr); in ssm2602_set_dai_sysclk()
431 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(codec_dai->component); in ssm2602_set_dai_fmt()
442 return -EINVAL; in ssm2602_set_dai_fmt()
462 return -EINVAL; in ssm2602_set_dai_fmt()
479 return -EINVAL; in ssm2602_set_dai_fmt()
483 regmap_write(ssm2602->regmap, SSM2602_IFACE, iface); in ssm2602_set_dai_fmt()
495 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
497 ssm2602->clk_out_pwr); in ssm2602_set_bias_level()
503 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
509 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
536 .name = "ssm2602-hifi",
558 regcache_sync(ssm2602->regmap); in ssm2602_resume()
569 regmap_update_bits(ssm2602->regmap, SSM2602_LOUT1V, in ssm2602_component_probe()
571 regmap_update_bits(ssm2602->regmap, SSM2602_ROUT1V, in ssm2602_component_probe()
607 ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0); in ssm260x_component_probe()
609 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in ssm260x_component_probe()
613 regmap_register_patch(ssm2602->regmap, ssm2602_patch, in ssm260x_component_probe()
617 regmap_update_bits(ssm2602->regmap, SSM2602_LINVOL, in ssm260x_component_probe()
619 regmap_update_bits(ssm2602->regmap, SSM2602_RINVOL, in ssm260x_component_probe()
622 regmap_write(ssm2602->regmap, SSM2602_APANA, APANA_SELECT_DAC | in ssm260x_component_probe()
625 switch (ssm2602->type) { in ssm260x_component_probe()
681 return -ENOMEM; in ssm2602_probe()
684 ssm2602->type = type; in ssm2602_probe()
685 ssm2602->regmap = regmap; in ssm2602_probe()