Lines Matching +full:haptic +full:- +full:driver
1 // SPDX-License-Identifier: GPL-2.0-only
3 * lm49453.c - LM49453 ALSA Soc Audio driver
23 #include <sound/soc-dapm.h>
491 static const DECLARE_TLV_DB_SCALE(adc_dac_tlv, -7650, 150, 1);
493 static const DECLARE_TLV_DB_SCALE(port_tlv, -1800, 600, 0);
494 static const DECLARE_TLV_DB_SCALE(stn_tlv, -7200, 150, 0);
587 /* All end points HP,EP, LS, Lineout and Haptic */
619 /* playback path driver enables */
628 SND_SOC_DAPM_OUT_DRV("Haptic Left Switch",
630 SND_SOC_DAPM_OUT_DRV("Haptic Right Switch",
638 SND_SOC_DAPM_DAC("HAL DAC", "Haptic", SND_SOC_NOPM, 0, 0),
639 SND_SOC_DAPM_DAC("HAR DAC", "Haptic", SND_SOC_NOPM, 0, 0),
877 /* Haptic map */
924 { "HAOUTL", "Haptic Left Switch", "HAL DAC" },
925 { "HAOUTR", "Haptic Right Switch", "HAR DAC" },
1110 struct snd_soc_component *component = dai->component; in lm49453_hw_params()
1131 return -EINVAL; in lm49453_hw_params()
1142 struct snd_soc_component *component = codec_dai->component; in lm49453_set_dai_fmt()
1164 return -EINVAL; in lm49453_set_dai_fmt()
1182 return -EINVAL; in lm49453_set_dai_fmt()
1197 struct snd_soc_component *component = dai->component; in lm49453_set_dai_sysclk()
1211 return -EINVAL; in lm49453_set_dai_sysclk()
1221 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0), in lm49453_hp_mute()
1228 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(3)|BIT(2), in lm49453_lo_mute()
1235 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(5)|BIT(4), in lm49453_ls_mute()
1242 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(4), in lm49453_ep_mute()
1249 snd_soc_component_update_bits(dai->component, LM49453_P0_DAC_DSP_REG, BIT(7)|BIT(6), in lm49453_ha_mute()
1266 regcache_sync(lm49453->regmap); in lm49453_set_bias_level()
1281 /* Formates supported by LM49453 driver. */
1358 .name = "LM49453 Haptic",
1360 .stream_name = "Haptic",
1419 lm49453 = devm_kzalloc(&i2c->dev, sizeof(struct lm49453_priv), in lm49453_i2c_probe()
1423 return -ENOMEM; in lm49453_i2c_probe()
1427 lm49453->regmap = devm_regmap_init_i2c(i2c, &lm49453_regmap_config); in lm49453_i2c_probe()
1428 if (IS_ERR(lm49453->regmap)) { in lm49453_i2c_probe()
1429 ret = PTR_ERR(lm49453->regmap); in lm49453_i2c_probe()
1430 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in lm49453_i2c_probe()
1435 ret = devm_snd_soc_register_component(&i2c->dev, in lm49453_i2c_probe()
1439 dev_err(&i2c->dev, "Failed to register component: %d\n", ret); in lm49453_i2c_probe()
1451 .driver = {
1460 MODULE_DESCRIPTION("ASoC LM49453 driver");