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

1 // SPDX-License-Identifier: GPL-2.0-or-later
73 48, 127, TLV_DB_SCALE_ITEM(-7400, 100, 0)
76 static const DECLARE_TLV_DB_SCALE(ssm260x_inpga_tlv, -3450, 150, 0);
77 static const DECLARE_TLV_DB_SCALE(ssm260x_sidetone_tlv, -1500, 300, 0);
87 SOC_ENUM("Playback De-emphasis", ssm2602_enum[1]),
166 ARRAY_SIZE(ssm260x_output_mixer_controls) - 1), /* Last element is the mic */
287 return -EINVAL; in ssm2602_get_coeff()
294 struct snd_soc_component *component = dai->component; in ssm2602_hw_params()
296 int srate = ssm2602_get_coeff(ssm2602->sysclk, params_rate(params)); in ssm2602_hw_params()
302 regmap_write(ssm2602->regmap, SSM2602_SRATE, srate); in ssm2602_hw_params()
319 return -EINVAL; in ssm2602_hw_params()
321 regmap_update_bits(ssm2602->regmap, SSM2602_IFACE, in ssm2602_hw_params()
329 struct snd_soc_component *component = dai->component; in ssm2602_startup()
332 if (ssm2602->sysclk_constraints) { in ssm2602_startup()
333 snd_pcm_hw_constraint_list(substream->runtime, 0, in ssm2602_startup()
335 ssm2602->sysclk_constraints); in ssm2602_startup()
343 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(dai->component); in ssm2602_mute()
346 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
350 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
358 struct snd_soc_component *component = codec_dai->component; in ssm2602_set_dai_sysclk()
363 return -EINVAL; in ssm2602_set_dai_sysclk()
368 ssm2602->sysclk_constraints = &ssm2602_constraints_12288000; in ssm2602_set_dai_sysclk()
372 ssm2602->sysclk_constraints = &ssm2602_constraints_11289600; in ssm2602_set_dai_sysclk()
375 ssm2602->sysclk_constraints = NULL; in ssm2602_set_dai_sysclk()
378 return -EINVAL; in ssm2602_set_dai_sysclk()
380 ssm2602->sysclk = freq; in ssm2602_set_dai_sysclk()
392 return -EINVAL; in ssm2602_set_dai_sysclk()
396 ssm2602->clk_out_pwr |= mask; in ssm2602_set_dai_sysclk()
398 ssm2602->clk_out_pwr &= ~mask; in ssm2602_set_dai_sysclk()
400 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_dai_sysclk()
401 PWR_CLK_OUT_PDN | PWR_OSC_PDN, ssm2602->clk_out_pwr); in ssm2602_set_dai_sysclk()
408 unsigned int fmt) in ssm2602_set_dai_fmt() argument
410 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(codec_dai->component); in ssm2602_set_dai_fmt()
414 switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { in ssm2602_set_dai_fmt()
421 return -EINVAL; in ssm2602_set_dai_fmt()
425 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in ssm2602_set_dai_fmt()
441 return -EINVAL; in ssm2602_set_dai_fmt()
445 switch (fmt & SND_SOC_DAIFMT_INV_MASK) { in ssm2602_set_dai_fmt()
458 return -EINVAL; in ssm2602_set_dai_fmt()
462 regmap_write(ssm2602->regmap, SSM2602_IFACE, iface); in ssm2602_set_dai_fmt()
473 /* vref/mid on, osc and clkout on if enabled */ in ssm2602_set_bias_level()
474 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
476 ssm2602->clk_out_pwr); in ssm2602_set_bias_level()
482 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
488 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
515 .name = "ssm2602-hifi",
537 regcache_sync(ssm2602->regmap); in ssm2602_resume()
548 regmap_update_bits(ssm2602->regmap, SSM2602_LOUT1V, in ssm2602_component_probe()
550 regmap_update_bits(ssm2602->regmap, SSM2602_ROUT1V, in ssm2602_component_probe()
586 ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0); in ssm260x_component_probe()
588 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in ssm260x_component_probe()
593 regmap_update_bits(ssm2602->regmap, SSM2602_LINVOL, in ssm260x_component_probe()
595 regmap_update_bits(ssm2602->regmap, SSM2602_RINVOL, in ssm260x_component_probe()
598 regmap_write(ssm2602->regmap, SSM2602_APANA, APANA_SELECT_DAC | in ssm260x_component_probe()
601 switch (ssm2602->type) { in ssm260x_component_probe()
657 return -ENOMEM; in ssm2602_probe()
660 ssm2602->type = type; in ssm2602_probe()
661 ssm2602->regmap = regmap; in ssm2602_probe()