• Home
  • Raw
  • Download

Lines Matching +full:startup +full:- +full:time +full:- +full:ms

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Author: Lars-Peter Clausen <lars@metafoo.de>
142 static const DECLARE_TLV_DB_MINMAX_MUTE(ssm2518_vol_tlv, -7125, 2400);
143 static const DECLARE_TLV_DB_SCALE(ssm2518_compressor_tlv, -3400, 200, 0);
144 static const DECLARE_TLV_DB_SCALE(ssm2518_expander_tlv, -8100, 300, 0);
145 static const DECLARE_TLV_DB_SCALE(ssm2518_noise_gate_tlv, -9600, 300, 0);
146 static const DECLARE_TLV_DB_SCALE(ssm2518_post_drc_tlv, -2400, 300, 0);
149 0, 7, TLV_DB_SCALE_ITEM(-2200, 200, 0),
150 7, 15, TLV_DB_SCALE_ITEM(-800, 100, 0),
154 "0 ms", "0.1 ms", "0.19 ms", "0.37 ms", "0.75 ms", "1.5 ms", "3 ms",
155 "6 ms", "12 ms", "24 ms", "48 ms", "96 ms", "192 ms", "384 ms",
156 "768 ms", "1536 ms",
160 "0 ms", "1.5 ms", "3 ms", "6 ms", "12 ms", "24 ms", "48 ms", "96 ms",
161 "192 ms", "384 ms", "768 ms", "1536 ms", "3072 ms", "6144 ms",
162 "12288 ms", "24576 ms"
166 "0 ms", "0.67 ms", "1.33 ms", "2.67 ms", "5.33 ms", "10.66 ms",
167 "21.32 ms", "42.64 ms", "85.28 ms", "170.56 ms", "341.12 ms",
168 "682.24 ms", "1364 ms",
187 SOC_SINGLE("Playback De-emphasis Switch", SSM2518_REG_MUTE_CTRL,
217 SOC_ENUM("DRC Peak Detector Attack Time",
219 SOC_ENUM("DRC Peak Detector Release Time",
221 SOC_ENUM("DRC Attack Time", ssm2518_drc_attack_time_enum),
222 SOC_ENUM("DRC Decay Time", ssm2518_drc_decay_time_enum),
223 SOC_ENUM("DRC Hold Time", ssm2518_drc_hold_time_enum),
224 SOC_ENUM("DRC Noise Gate Hold Time",
226 SOC_ENUM("DRC RMS Averaging Time", ssm2518_drc_rms_averaging_time_enum),
325 return -EINVAL; in ssm2518_lookup_mcs()
328 if (sysclks[i] == ssm2518->sysclk) in ssm2518_lookup_mcs()
332 return -EINVAL; in ssm2518_lookup_mcs()
338 struct snd_soc_component *component = dai->component; in ssm2518_hw_params()
360 return -EINVAL; in ssm2518_hw_params()
362 if (ssm2518->right_j) { in ssm2518_hw_params()
371 return -EINVAL; in ssm2518_hw_params()
377 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_CLOCK, in ssm2518_hw_params()
382 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_SAI_CTRL1, in ssm2518_hw_params()
387 return regmap_update_bits(ssm2518->regmap, SSM2518_REG_POWER1, in ssm2518_hw_params()
393 struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component); in ssm2518_mute()
401 return regmap_update_bits(ssm2518->regmap, SSM2518_REG_MUTE_CTRL, in ssm2518_mute()
407 struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component); in ssm2518_set_dai_fmt()
416 return -EINVAL; in ssm2518_set_dai_fmt()
435 return -EINVAL; in ssm2518_set_dai_fmt()
438 ssm2518->right_j = false; in ssm2518_set_dai_fmt()
449 ssm2518->right_j = true; in ssm2518_set_dai_fmt()
463 return -EINVAL; in ssm2518_set_dai_fmt()
469 ret = regmap_write(ssm2518->regmap, SSM2518_REG_SAI_CTRL1, ctrl1); in ssm2518_set_dai_fmt()
473 return regmap_write(ssm2518->regmap, SSM2518_REG_SAI_CTRL2, ctrl2); in ssm2518_set_dai_fmt()
481 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_POWER1, in ssm2518_set_power()
483 regcache_mark_dirty(ssm2518->regmap); in ssm2518_set_power()
486 if (gpio_is_valid(ssm2518->enable_gpio)) in ssm2518_set_power()
487 gpio_set_value(ssm2518->enable_gpio, enable); in ssm2518_set_power()
489 regcache_cache_only(ssm2518->regmap, !enable); in ssm2518_set_power()
492 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_POWER1, in ssm2518_set_power()
494 regcache_sync(ssm2518->regmap); in ssm2518_set_power()
526 struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component); in ssm2518_set_tdm_slot()
532 return regmap_update_bits(ssm2518->regmap, in ssm2518_set_tdm_slot()
537 return -EINVAL; in ssm2518_set_tdm_slot()
541 return -EINVAL; in ssm2518_set_tdm_slot()
557 return -EINVAL; in ssm2518_set_tdm_slot()
570 return -EINVAL; in ssm2518_set_tdm_slot()
590 return -EINVAL; in ssm2518_set_tdm_slot()
593 ret = regmap_write(ssm2518->regmap, SSM2518_REG_CHAN_MAP, in ssm2518_set_tdm_slot()
599 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_SAI_CTRL1, in ssm2518_set_tdm_slot()
604 return regmap_update_bits(ssm2518->regmap, SSM2518_REG_SAI_CTRL2, in ssm2518_set_tdm_slot()
611 struct ssm2518 *ssm2518 = snd_soc_component_get_drvdata(dai->component); in ssm2518_startup()
613 if (ssm2518->constraints) in ssm2518_startup()
614 snd_pcm_hw_constraint_list(substream->runtime, 0, in ssm2518_startup()
615 SNDRV_PCM_HW_PARAM_RATE, ssm2518->constraints); in ssm2518_startup()
624 .startup = ssm2518_startup,
633 .name = "ssm2518-hifi",
651 return -EINVAL; in ssm2518_set_sysclk()
664 return -EINVAL; in ssm2518_set_sysclk()
669 ssm2518->constraints = NULL; in ssm2518_set_sysclk()
677 ssm2518->constraints = &ssm2518_constraints_2048000; in ssm2518_set_sysclk()
688 ssm2518->constraints = &ssm2518_constraints_2822000; in ssm2518_set_sysclk()
696 ssm2518->constraints = &ssm2518_constraints_3072000; in ssm2518_set_sysclk()
701 ssm2518->constraints = &ssm2518_constraints_12288000; in ssm2518_set_sysclk()
704 return -EINVAL; in ssm2518_set_sysclk()
707 ssm2518->sysclk = freq; in ssm2518_set_sysclk()
709 return regmap_update_bits(ssm2518->regmap, SSM2518_REG_POWER1, in ssm2518_set_sysclk()
741 struct ssm2518_platform_data *pdata = i2c->dev.platform_data; in ssm2518_i2c_probe()
745 ssm2518 = devm_kzalloc(&i2c->dev, sizeof(*ssm2518), GFP_KERNEL); in ssm2518_i2c_probe()
747 return -ENOMEM; in ssm2518_i2c_probe()
750 ssm2518->enable_gpio = pdata->enable_gpio; in ssm2518_i2c_probe()
751 } else if (i2c->dev.of_node) { in ssm2518_i2c_probe()
752 ssm2518->enable_gpio = of_get_gpio(i2c->dev.of_node, 0); in ssm2518_i2c_probe()
753 if (ssm2518->enable_gpio < 0 && ssm2518->enable_gpio != -ENOENT) in ssm2518_i2c_probe()
754 return ssm2518->enable_gpio; in ssm2518_i2c_probe()
756 ssm2518->enable_gpio = -1; in ssm2518_i2c_probe()
759 if (gpio_is_valid(ssm2518->enable_gpio)) { in ssm2518_i2c_probe()
760 ret = devm_gpio_request_one(&i2c->dev, ssm2518->enable_gpio, in ssm2518_i2c_probe()
768 ssm2518->regmap = devm_regmap_init_i2c(i2c, &ssm2518_regmap_config); in ssm2518_i2c_probe()
769 if (IS_ERR(ssm2518->regmap)) in ssm2518_i2c_probe()
770 return PTR_ERR(ssm2518->regmap); in ssm2518_i2c_probe()
778 regcache_cache_bypass(ssm2518->regmap, true); in ssm2518_i2c_probe()
779 ret = regmap_write(ssm2518->regmap, SSM2518_REG_POWER1, in ssm2518_i2c_probe()
781 regcache_cache_bypass(ssm2518->regmap, false); in ssm2518_i2c_probe()
785 ret = regmap_update_bits(ssm2518->regmap, SSM2518_REG_POWER2, in ssm2518_i2c_probe()
794 return devm_snd_soc_register_component(&i2c->dev, in ssm2518_i2c_probe()
824 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");