Lines Matching +full:eq +full:- +full:level

1 // SPDX-License-Identifier: GPL-2.0-only
53 static const DECLARE_TLV_DB_SCALE(digital_tlv, -7150, 50, 0);
55 static const DECLARE_TLV_DB_SCALE(alclvl, -2250, 150, 0);
56 static const DECLARE_TLV_DB_SCALE(mingain, -1200, 600, 0);
57 static const DECLARE_TLV_DB_SCALE(maxgain, -675, 600, 0);
58 static const DECLARE_TLV_DB_SCALE(boost_vol, -1200, 75, 0);
60 static const char * const ml26124_companding[] = {"16bit PCM", "u-law",
61 "A-law"};
76 SOC_SINGLE_TLV("EQ Band0 Volume", ML26124_EQ_GAIN_BRAND0, 0,
78 SOC_SINGLE_TLV("EQ Band1 Volume", ML26124_EQ_GAIN_BRAND1, 0,
80 SOC_SINGLE_TLV("EQ Band2 Volume", ML26124_EQ_GAIN_BRAND2, 0,
82 SOC_SINGLE_TLV("EQ Band3 Volume", ML26124_EQ_GAIN_BRAND3, 0,
84 SOC_SINGLE_TLV("EQ Band4 Volume", ML26124_EQ_GAIN_BRAND4, 0,
86 SOC_SINGLE_TLV("ALC Target Level", ML26124_ALC_TARGET_LEV, 0,
102 SOC_SINGLE("EQ Band0 Switch", ML26124_FILTER_EN, 2, 1, 0),
103 SOC_SINGLE("EQ Band1 Switch", ML26124_FILTER_EN, 3, 1, 0),
104 SOC_SINGLE("EQ Band2 Switch", ML26124_FILTER_EN, 4, 1, 0),
105 SOC_SINGLE("EQ Band3 Switch", ML26124_FILTER_EN, 5, 1, 0),
106 SOC_SINGLE("EQ Band4 Switch", ML26124_FILTER_EN, 6, 1, 0),
209 {0x26, 0x00}, /* SP-AMP Power Management */
212 {0x2e, 0x00}, /* AC-CMP Power Management */
230 {0x60, 0x00}, /* SAI-Trans Control */
231 {0x62, 0x00}, /* SAI-Receive Control */
241 {0x74, 0xe7}, /* EQ gain Band0 */
242 {0x76, 0xe7}, /* EQ gain Band1 */
243 {0x78, 0xe7}, /* EQ gain Band2 */
244 {0x7A, 0xe7}, /* EQ gain Band3 */
245 {0x7C, 0xe7}, /* EQ gain Band4 */
247 {0x80, 0x00}, /* EQ Band0 Coef0L */
248 {0x82, 0x00}, /* EQ Band0 Coef0H */
249 {0x84, 0x00}, /* EQ Band0 Coef0L */
250 {0x86, 0x00}, /* EQ Band0 Coef0H */
251 {0x88, 0x00}, /* EQ Band1 Coef0L */
252 {0x8A, 0x00}, /* EQ Band1 Coef0H */
253 {0x8C, 0x00}, /* EQ Band1 Coef0L */
254 {0x8E, 0x00}, /* EQ Band1 Coef0H */
255 {0x90, 0x00}, /* EQ Band2 Coef0L */
256 {0x92, 0x00}, /* EQ Band2 Coef0H */
257 {0x94, 0x00}, /* EQ Band2 Coef0L */
258 {0x96, 0x00}, /* EQ Band2 Coef0H */
259 {0x98, 0x00}, /* EQ Band3 Coef0L */
260 {0x9A, 0x00}, /* EQ Band3 Coef0H */
261 {0x9C, 0x00}, /* EQ Band3 Coef0L */
262 {0x9E, 0x00}, /* EQ Band3 Coef0H */
263 {0xA0, 0x00}, /* EQ Band4 Coef0L */
264 {0xA2, 0x00}, /* EQ Band4 Coef0H */
265 {0xA4, 0x00}, /* EQ Band4 Coef0L */
266 {0xA6, 0x00}, /* EQ Band4 Coef0H */
273 {0xb8, 0x0b}, /* ALC Target Level */
281 {0xc4, 0x0d}, /* PL Target Level */
308 return -EINVAL; in get_srate()
321 return -EINVAL; in get_coeff()
328 struct snd_soc_component *component = dai->component; in ml26124_hw_params()
330 int i = get_coeff(priv->mclk, params_rate(hw_params)); in ml26124_hw_params()
335 priv->substream = substream; in ml26124_hw_params()
336 priv->rate = params_rate(hw_params); in ml26124_hw_params()
338 if (priv->clk_in) { in ml26124_hw_params()
339 switch (priv->mclk / params_rate(hw_params)) { in ml26124_hw_params()
353 dev_err(component->dev, "Unsupported MCLKI\n"); in ml26124_hw_params()
377 struct snd_soc_component *component = dai->component; in ml26124_mute()
380 switch (priv->substream->stream) { in ml26124_mute()
403 struct snd_soc_component *component = codec_dai->component; in ml26124_set_dai_fmt()
413 return -EINVAL; in ml26124_set_dai_fmt()
422 return -EINVAL; in ml26124_set_dai_fmt()
430 return -EINVAL; in ml26124_set_dai_fmt()
439 struct snd_soc_component *component = codec_dai->component; in ml26124_set_dai_sysclk()
444 priv->clk_in = ML26124_USE_PLLOUT; in ml26124_set_dai_sysclk()
447 priv->clk_in = ML26124_USE_MCLKI; in ml26124_set_dai_sysclk()
450 return -EINVAL; in ml26124_set_dai_sysclk()
453 priv->mclk = freq; in ml26124_set_dai_sysclk()
459 enum snd_soc_bias_level level) in ml26124_set_bias_level() argument
463 switch (level) { in ml26124_set_bias_level()
480 regcache_sync(priv->regmap); in ml26124_set_bias_level()
501 .name = "ml26124-hifi",
557 priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL); in ml26124_i2c_probe()
559 return -ENOMEM; in ml26124_i2c_probe()
563 priv->regmap = devm_regmap_init_i2c(i2c, &ml26124_i2c_regmap); in ml26124_i2c_probe()
564 if (IS_ERR(priv->regmap)) { in ml26124_i2c_probe()
565 ret = PTR_ERR(priv->regmap); in ml26124_i2c_probe()
566 dev_err(&i2c->dev, "regmap_init_i2c() failed: %d\n", ret); in ml26124_i2c_probe()
570 return devm_snd_soc_register_component(&i2c->dev, in ml26124_i2c_probe()