• Home
  • Raw
  • Download

Lines Matching +full:clip +full:- +full:x +full:- +full:low

1 // SPDX-License-Identifier: GPL-2.0
53 reg_data[size - i - 1] = (val >> (8 * i)) & 0xff; in mt6660_reg_write()
55 ret = i2c_smbus_write_i2c_block_data(chip->i2c, reg, size, reg_data); in mt6660_reg_write()
67 ret = i2c_smbus_read_i2c_block_data(chip->i2c, reg, size, data); in mt6660_reg_read()
97 snd_soc_dapm_to_component(w->dapm); in mt6660_codec_classd_event()
102 dev_dbg(component->dev, in mt6660_codec_classd_event()
108 dev_err(component->dev, "config mode adaptive fail\n"); in mt6660_codec_classd_event()
117 dev_err(component->dev, in mt6660_codec_classd_event()
121 dev_dbg(component->dev, "Amp on\n"); in mt6660_codec_classd_event()
124 dev_dbg(component->dev, "Amp off\n"); in mt6660_codec_classd_event()
129 dev_err(component->dev, in mt6660_codec_classd_event()
133 /* pop-noise improvement 1 */ in mt6660_codec_classd_event()
137 dev_err(component->dev, in mt6660_codec_classd_event()
138 "pop-noise improvement 1 fail\n"); in mt6660_codec_classd_event()
143 dev_dbg(component->dev, in mt6660_codec_classd_event()
145 /* pop-noise improvement 2 */ in mt6660_codec_classd_event()
149 dev_err(component->dev, in mt6660_codec_classd_event()
150 "pop-noise improvement 2 fail\n"); in mt6660_codec_classd_event()
157 dev_err(component->dev, "config mode off fail\n"); in mt6660_codec_classd_event()
196 ucontrol->value.integer.value[0] = chip->chip_rev & 0x0f; in mt6660_component_get_volsw()
200 static const DECLARE_TLV_DB_SCALE(vol_ctl_tlv, -1155, 5, 0);
205 SOC_SINGLE("Hard Clip Switch", MT6660_REG_HCLIP_CTRL, 8, 1, 0),
206 SOC_SINGLE("Clip Switch", MT6660_REG_SPS_CTRL, 0, 1, 0),
222 return regmap_write_bits(chip->regmap, MT6660_REG_SYSTEM_CTRL, in _mt6660_chip_power_on()
269 dev_err(component->dev, "%s chip power on failed\n", __func__); in mt6660_component_setting()
279 dev_err(component->dev, "%s update 0x%02x failed\n", in mt6660_component_setting()
287 dev_err(component->dev, "%s chip power off failed\n", __func__); in mt6660_component_setting()
299 dev_dbg(component->dev, "%s\n", __func__); in mt6660_component_probe()
300 snd_soc_component_init_regmap(component, chip->regmap); in mt6660_component_probe()
304 dev_err(chip->dev, "mt6660 component setting failed\n"); in mt6660_component_probe()
311 dev_dbg(component->dev, "%s\n", __func__); in mt6660_component_remove()
337 dev_dbg(dai->dev, "%s: ++\n", __func__); in mt6660_component_aif_hw_params()
338 dev_dbg(dai->dev, "format: 0x%08x\n", params_format(hw_params)); in mt6660_component_aif_hw_params()
339 dev_dbg(dai->dev, "rate: 0x%08x\n", params_rate(hw_params)); in mt6660_component_aif_hw_params()
340 dev_dbg(dai->dev, "word_len: %d, aud_bit: %d\n", word_len, aud_bit); in mt6660_component_aif_hw_params()
342 dev_err(dai->dev, "not supported word length\n"); in mt6660_component_aif_hw_params()
343 return -ENOTSUPP; in mt6660_component_aif_hw_params()
360 return -ENOTSUPP; in mt6660_component_aif_hw_params()
362 ret = snd_soc_component_update_bits(dai->component, in mt6660_component_aif_hw_params()
365 dev_err(dai->dev, "config aud bit fail\n"); in mt6660_component_aif_hw_params()
368 ret = snd_soc_component_update_bits(dai->component, in mt6660_component_aif_hw_params()
371 dev_err(dai->dev, "config word len fail\n"); in mt6660_component_aif_hw_params()
374 dev_dbg(dai->dev, "%s: --\n", __func__); in mt6660_component_aif_hw_params()
391 .name = "mt6660-aif",
419 ret = regmap_read(chip->regmap, MT6660_REG_DEVID, &val); in _mt6660_chip_id_check()
424 dev_err(chip->dev, "%s id(%x) not match\n", __func__, val); in _mt6660_chip_id_check()
425 return -ENODEV; in _mt6660_chip_id_check()
435 ret = regmap_write(chip->regmap, MT6660_REG_SYSTEM_CTRL, 0x00); in _mt6660_chip_sw_reset()
438 ret = regmap_write(chip->regmap, MT6660_REG_SYSTEM_CTRL, 0x80); in _mt6660_chip_sw_reset()
450 ret = regmap_read(chip->regmap, MT6660_REG_DEVID, &val); in _mt6660_read_chip_revision()
452 dev_err(chip->dev, "get chip revision fail\n"); in _mt6660_read_chip_revision()
455 chip->chip_rev = val&0xff; in _mt6660_read_chip_revision()
456 dev_info(chip->dev, "%s chip_rev = %x\n", __func__, chip->chip_rev); in _mt6660_read_chip_revision()
466 dev_dbg(&client->dev, "%s\n", __func__); in mt6660_i2c_probe()
467 chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL); in mt6660_i2c_probe()
469 return -ENOMEM; in mt6660_i2c_probe()
470 chip->i2c = client; in mt6660_i2c_probe()
471 chip->dev = &client->dev; in mt6660_i2c_probe()
472 mutex_init(&chip->io_lock); in mt6660_i2c_probe()
475 chip->regmap = devm_regmap_init(&client->dev, in mt6660_i2c_probe()
477 if (IS_ERR(chip->regmap)) { in mt6660_i2c_probe()
478 ret = PTR_ERR(chip->regmap); in mt6660_i2c_probe()
479 dev_err(&client->dev, "failed to initialise regmap: %d\n", ret); in mt6660_i2c_probe()
486 dev_err(chip->dev, "chip reset fail\n"); in mt6660_i2c_probe()
492 dev_err(chip->dev, "chip power on 2 fail\n"); in mt6660_i2c_probe()
498 dev_err(chip->dev, "chip id check fail\n"); in mt6660_i2c_probe()
504 dev_err(chip->dev, "read chip revision fail\n"); in mt6660_i2c_probe()
507 pm_runtime_set_active(chip->dev); in mt6660_i2c_probe()
508 pm_runtime_enable(chip->dev); in mt6660_i2c_probe()
510 ret = devm_snd_soc_register_component(chip->dev, in mt6660_i2c_probe()
514 pm_runtime_disable(chip->dev); in mt6660_i2c_probe()
520 mutex_destroy(&chip->io_lock); in mt6660_i2c_probe()
528 pm_runtime_disable(chip->dev); in mt6660_i2c_remove()
529 pm_runtime_set_suspended(chip->dev); in mt6660_i2c_remove()
530 mutex_destroy(&chip->io_lock); in mt6660_i2c_remove()
538 dev_dbg(dev, "enter low power mode\n"); in mt6660_i2c_runtime_suspend()
539 return regmap_update_bits(chip->regmap, in mt6660_i2c_runtime_suspend()
547 dev_dbg(dev, "exit low power mode\n"); in mt6660_i2c_runtime_resume()
548 return regmap_update_bits(chip->regmap, in mt6660_i2c_runtime_resume()