• Home
  • Raw
  • Download

Lines Matching +full:codec +full:- +full:clkout

1 // SPDX-License-Identifier: GPL-2.0-or-later
26 /* codec private data */
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 */
240 /* codec mclk clock coefficients */
299 return -EINVAL; in ssm2602_get_coeff()
306 struct snd_soc_component *component = dai->component; in ssm2602_hw_params()
308 int srate = ssm2602_get_coeff(ssm2602->sysclk, params_rate(params)); in ssm2602_hw_params()
314 regmap_write(ssm2602->regmap, SSM2602_SRATE, srate); in ssm2602_hw_params()
331 return -EINVAL; in ssm2602_hw_params()
333 regmap_update_bits(ssm2602->regmap, SSM2602_IFACE, in ssm2602_hw_params()
341 struct snd_soc_component *component = dai->component; in ssm2602_startup()
344 if (ssm2602->sysclk_constraints) { in ssm2602_startup()
345 snd_pcm_hw_constraint_list(substream->runtime, 0, in ssm2602_startup()
347 ssm2602->sysclk_constraints); in ssm2602_startup()
355 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(dai->component); in ssm2602_mute()
358 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
362 regmap_update_bits(ssm2602->regmap, SSM2602_APDIGI, in ssm2602_mute()
370 struct snd_soc_component *component = codec_dai->component; in ssm2602_set_dai_sysclk()
375 return -EINVAL; in ssm2602_set_dai_sysclk()
380 ssm2602->sysclk_constraints = &ssm2602_constraints_12288000; in ssm2602_set_dai_sysclk()
384 ssm2602->sysclk_constraints = &ssm2602_constraints_11289600; in ssm2602_set_dai_sysclk()
387 ssm2602->sysclk_constraints = NULL; in ssm2602_set_dai_sysclk()
390 return -EINVAL; in ssm2602_set_dai_sysclk()
392 ssm2602->sysclk = freq; in ssm2602_set_dai_sysclk()
404 return -EINVAL; in ssm2602_set_dai_sysclk()
408 ssm2602->clk_out_pwr |= mask; in ssm2602_set_dai_sysclk()
410 ssm2602->clk_out_pwr &= ~mask; in ssm2602_set_dai_sysclk()
412 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_dai_sysclk()
413 PWR_CLK_OUT_PDN | PWR_OSC_PDN, ssm2602->clk_out_pwr); in ssm2602_set_dai_sysclk()
422 struct ssm2602_priv *ssm2602 = snd_soc_component_get_drvdata(codec_dai->component); in ssm2602_set_dai_fmt()
433 return -EINVAL; in ssm2602_set_dai_fmt()
453 return -EINVAL; in ssm2602_set_dai_fmt()
470 return -EINVAL; in ssm2602_set_dai_fmt()
474 regmap_write(ssm2602->regmap, SSM2602_IFACE, iface); in ssm2602_set_dai_fmt()
485 /* vref/mid on, osc and clkout on if enabled */ in ssm2602_set_bias_level()
486 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
488 ssm2602->clk_out_pwr); in ssm2602_set_bias_level()
494 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
500 regmap_update_bits(ssm2602->regmap, SSM2602_PWR, in ssm2602_set_bias_level()
527 .name = "ssm2602-hifi",
549 regcache_sync(ssm2602->regmap); in ssm2602_resume()
560 regmap_update_bits(ssm2602->regmap, SSM2602_LOUT1V, in ssm2602_component_probe()
562 regmap_update_bits(ssm2602->regmap, SSM2602_ROUT1V, in ssm2602_component_probe()
598 ret = regmap_write(ssm2602->regmap, SSM2602_RESET, 0); in ssm260x_component_probe()
600 dev_err(component->dev, "Failed to issue reset: %d\n", ret); in ssm260x_component_probe()
604 regmap_register_patch(ssm2602->regmap, ssm2602_patch, in ssm260x_component_probe()
608 regmap_update_bits(ssm2602->regmap, SSM2602_LINVOL, in ssm260x_component_probe()
610 regmap_update_bits(ssm2602->regmap, SSM2602_RINVOL, in ssm260x_component_probe()
613 regmap_write(ssm2602->regmap, SSM2602_APANA, APANA_SELECT_DAC | in ssm260x_component_probe()
616 switch (ssm2602->type) { in ssm260x_component_probe()
673 return -ENOMEM; in ssm2602_probe()
676 ssm2602->type = type; in ssm2602_probe()
677 ssm2602->regmap = regmap; in ssm2602_probe()