Lines Matching +full:clkout +full:- +full:fmt

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);
99 SOC_ENUM("Playback De-emphasis", ssm2602_enum[1]),
178 ARRAY_SIZE(ssm260x_output_mixer_controls) - 1), /* Last element is the mic */
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()
373 struct snd_soc_component *component = codec_dai->component; in ssm2602_set_dai_sysclk()
378 return -EINVAL; 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()
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()
429 unsigned int fmt) in ssm2602_set_dai_fmt() argument
431 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(codec_dai->component); in ssm2602_set_dai_fmt()
435 switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { in ssm2602_set_dai_fmt()
442 return -EINVAL; in ssm2602_set_dai_fmt()
446 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in ssm2602_set_dai_fmt()
462 return -EINVAL; in ssm2602_set_dai_fmt()
466 switch (fmt & SND_SOC_DAIFMT_INV_MASK) { 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()
494 /* vref/mid on, osc and clkout on if enabled */ in ssm2602_set_bias_level()
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()