rt5514 118 sound/soc/codecs/rt5514.c static void rt5514_enable_dsp_prepare(struct rt5514_priv *rt5514) rt5514 121 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002000, 0x000010ec); rt5514 123 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002200, 0x00028604); rt5514 125 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0xfafafafa, 0x00000001); rt5514 127 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x0005514b); rt5514 128 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x00055149); rt5514 130 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0xfafafafa, 0x00000000); rt5514 132 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002070, 0x00000040); rt5514 134 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002240, 0x0000000a); rt5514 136 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002100, 0x0000000b); rt5514 138 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002004, 0x00808b81); rt5514 140 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002f08, 0x00000005); rt5514 142 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18001114, 0x00000001); rt5514 144 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18001118, 0x00000001); rt5514 291 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 293 sound/soc/codecs/rt5514.c ucontrol->value.integer.value[0] = rt5514->dsp_enabled; rt5514 298 sound/soc/codecs/rt5514.c static int rt5514_calibration(struct rt5514_priv *rt5514, bool on) rt5514 301 sound/soc/codecs/rt5514.c regmap_write(rt5514->regmap, RT5514_ANA_CTRL_PLL3, 0x0000000a); rt5514 302 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL_SOURCE_CTRL, 0xf, rt5514 304 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PWR_ANA1, 0x301, rt5514 306 sound/soc/codecs/rt5514.c regmap_write(rt5514->regmap, RT5514_PLL3_CALIB_CTRL4, rt5514 307 sound/soc/codecs/rt5514.c 0x80000000 | rt5514->pll3_cal_value); rt5514 308 sound/soc/codecs/rt5514.c regmap_write(rt5514->regmap, RT5514_PLL3_CALIB_CTRL1, rt5514 310 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL3_CALIB_CTRL5, rt5514 312 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL3_CALIB_CTRL5, rt5514 315 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL3_CALIB_CTRL5, rt5514 317 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PWR_ANA1, 0x301, 0); rt5514 318 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL_SOURCE_CTRL, 0xf, rt5514 329 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 333 sound/soc/codecs/rt5514.c if (ucontrol->value.integer.value[0] == rt5514->dsp_enabled) rt5514 337 sound/soc/codecs/rt5514.c rt5514->dsp_enabled = ucontrol->value.integer.value[0]; rt5514 339 sound/soc/codecs/rt5514.c if (rt5514->dsp_enabled) { rt5514 340 sound/soc/codecs/rt5514.c if (rt5514->pdata.dsp_calib_clk_name && rt5514 341 sound/soc/codecs/rt5514.c !IS_ERR(rt5514->dsp_calib_clk)) { rt5514 342 sound/soc/codecs/rt5514.c if (clk_set_rate(rt5514->dsp_calib_clk, rt5514 343 sound/soc/codecs/rt5514.c rt5514->pdata.dsp_calib_clk_rate)) rt5514 347 sound/soc/codecs/rt5514.c if (clk_prepare_enable(rt5514->dsp_calib_clk)) rt5514 351 sound/soc/codecs/rt5514.c rt5514_calibration(rt5514, true); rt5514 362 sound/soc/codecs/rt5514.c rt5514->pll3_cal_value = buf[0] | buf[1] << 8 | rt5514 365 sound/soc/codecs/rt5514.c rt5514_calibration(rt5514, false); rt5514 366 sound/soc/codecs/rt5514.c clk_disable_unprepare(rt5514->dsp_calib_clk); rt5514 369 sound/soc/codecs/rt5514.c rt5514_enable_dsp_prepare(rt5514); rt5514 398 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002f00, rt5514 401 sound/soc/codecs/rt5514.c if (rt5514->pdata.dsp_calib_clk_name && rt5514 402 sound/soc/codecs/rt5514.c !IS_ERR(rt5514->dsp_calib_clk)) { rt5514 405 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x1800211c, rt5514 406 sound/soc/codecs/rt5514.c rt5514->pll3_cal_value); rt5514 407 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002124, rt5514 409 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002124, rt5514 411 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, 0x18002124, rt5514 415 sound/soc/codecs/rt5514.c regmap_multi_reg_write(rt5514->i2c_regmap, rt5514 417 sound/soc/codecs/rt5514.c regcache_mark_dirty(rt5514->regmap); rt5514 418 sound/soc/codecs/rt5514.c regcache_sync(rt5514->regmap); rt5514 519 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 522 sound/soc/codecs/rt5514.c idx = rt5514_calc_dmic_clk(component, rt5514->sysclk); rt5514 526 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL1, rt5514 530 sound/soc/codecs/rt5514.c if (rt5514->pdata.dmic_init_delay) rt5514 531 sound/soc/codecs/rt5514.c msleep(rt5514->pdata.dmic_init_delay); rt5514 540 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 542 sound/soc/codecs/rt5514.c if (rt5514->sysclk_src == RT5514_SCLK_S_PLL1) rt5514 552 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 554 sound/soc/codecs/rt5514.c return (rt5514->sysclk > rt5514->lrck * 384); rt5514 755 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 759 sound/soc/codecs/rt5514.c rt5514->lrck = params_rate(params); rt5514 760 sound/soc/codecs/rt5514.c pre_div = rl6231_get_clk_info(rt5514->sysclk, rt5514->lrck); rt5514 773 sound/soc/codecs/rt5514.c rt5514->bclk = rt5514->lrck * (32 << bclk_ms); rt5514 776 sound/soc/codecs/rt5514.c rt5514->bclk, rt5514->lrck); rt5514 796 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL1, RT5514_I2S_DL_MASK, rt5514 798 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL1, rt5514 801 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL2, rt5514 812 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 855 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL1, rt5514 866 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 869 sound/soc/codecs/rt5514.c if (freq == rt5514->sysclk && clk_id == rt5514->sysclk_src) rt5514 886 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL2, rt5514 889 sound/soc/codecs/rt5514.c rt5514->sysclk = freq; rt5514 890 sound/soc/codecs/rt5514.c rt5514->sysclk_src = clk_id; rt5514 901 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 908 sound/soc/codecs/rt5514.c rt5514->pll_in = 0; rt5514 909 sound/soc/codecs/rt5514.c rt5514->pll_out = 0; rt5514 910 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL2, rt5514 917 sound/soc/codecs/rt5514.c if (source == rt5514->pll_src && freq_in == rt5514->pll_in && rt5514 918 sound/soc/codecs/rt5514.c freq_out == rt5514->pll_out) rt5514 923 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL_SOURCE_CTRL, rt5514 928 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_PLL_SOURCE_CTRL, rt5514 947 sound/soc/codecs/rt5514.c regmap_write(rt5514->regmap, RT5514_ANA_CTRL_PLL1_1, rt5514 951 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_ANA_CTRL_PLL1_2, rt5514 954 sound/soc/codecs/rt5514.c rt5514->pll_in = freq_in; rt5514 955 sound/soc/codecs/rt5514.c rt5514->pll_out = freq_out; rt5514 956 sound/soc/codecs/rt5514.c rt5514->pll_src = source; rt5514 965 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 1038 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL1, RT5514_TDM_MODE | rt5514 1043 sound/soc/codecs/rt5514.c regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL2, rt5514 1053 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 1058 sound/soc/codecs/rt5514.c if (IS_ERR(rt5514->mclk)) rt5514 1062 sound/soc/codecs/rt5514.c clk_disable_unprepare(rt5514->mclk); rt5514 1064 sound/soc/codecs/rt5514.c ret = clk_prepare_enable(rt5514->mclk); rt5514 1077 sound/soc/codecs/rt5514.c if (rt5514->dsp_enabled) { rt5514 1078 sound/soc/codecs/rt5514.c rt5514->dsp_enabled = 0; rt5514 1079 sound/soc/codecs/rt5514.c regmap_multi_reg_write(rt5514->i2c_regmap, rt5514 1082 sound/soc/codecs/rt5514.c regcache_mark_dirty(rt5514->regmap); rt5514 1083 sound/soc/codecs/rt5514.c regcache_sync(rt5514->regmap); rt5514 1097 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); rt5514 1101 sound/soc/codecs/rt5514.c rt5514->mclk = devm_clk_get(component->dev, "mclk"); rt5514 1102 sound/soc/codecs/rt5514.c if (PTR_ERR(rt5514->mclk) == -EPROBE_DEFER) rt5514 1105 sound/soc/codecs/rt5514.c if (rt5514->pdata.dsp_calib_clk_name) { rt5514 1106 sound/soc/codecs/rt5514.c rt5514->dsp_calib_clk = devm_clk_get(&pdev->dev, rt5514 1107 sound/soc/codecs/rt5514.c rt5514->pdata.dsp_calib_clk_name); rt5514 1108 sound/soc/codecs/rt5514.c if (PTR_ERR(rt5514->dsp_calib_clk) == -EPROBE_DEFER) rt5514 1112 sound/soc/codecs/rt5514.c rt5514->component = component; rt5514 1113 sound/soc/codecs/rt5514.c rt5514->pll3_cal_value = 0x0078b000; rt5514 1121 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = i2c_get_clientdata(client); rt5514 1123 sound/soc/codecs/rt5514.c regmap_read(rt5514->i2c_regmap, reg | RT5514_DSP_MAPPING, val); rt5514 1131 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = i2c_get_clientdata(client); rt5514 1133 sound/soc/codecs/rt5514.c regmap_write(rt5514->i2c_regmap, reg | RT5514_DSP_MAPPING, val); rt5514 1228 sound/soc/codecs/rt5514.c static int rt5514_parse_dp(struct rt5514_priv *rt5514, struct device *dev) rt5514 1231 sound/soc/codecs/rt5514.c &rt5514->pdata.dmic_init_delay); rt5514 1233 sound/soc/codecs/rt5514.c &rt5514->pdata.dsp_calib_clk_name); rt5514 1235 sound/soc/codecs/rt5514.c &rt5514->pdata.dsp_calib_clk_rate); rt5514 1242 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514 = dev_get_drvdata(dev); rt5514 1250 sound/soc/codecs/rt5514.c regmap_read(rt5514->regmap, RT5514_VENDOR_ID2, &val); rt5514 1259 sound/soc/codecs/rt5514.c struct rt5514_priv *rt5514; rt5514 1263 sound/soc/codecs/rt5514.c rt5514 = devm_kzalloc(&i2c->dev, sizeof(struct rt5514_priv), rt5514 1265 sound/soc/codecs/rt5514.c if (rt5514 == NULL) rt5514 1268 sound/soc/codecs/rt5514.c i2c_set_clientdata(i2c, rt5514); rt5514 1271 sound/soc/codecs/rt5514.c rt5514->pdata = *pdata; rt5514 1273 sound/soc/codecs/rt5514.c rt5514_parse_dp(rt5514, &i2c->dev); rt5514 1275 sound/soc/codecs/rt5514.c rt5514->i2c_regmap = devm_regmap_init_i2c(i2c, &rt5514_i2c_regmap); rt5514 1276 sound/soc/codecs/rt5514.c if (IS_ERR(rt5514->i2c_regmap)) { rt5514 1277 sound/soc/codecs/rt5514.c ret = PTR_ERR(rt5514->i2c_regmap); rt5514 1283 sound/soc/codecs/rt5514.c rt5514->regmap = devm_regmap_init(&i2c->dev, NULL, i2c, &rt5514_regmap); rt5514 1284 sound/soc/codecs/rt5514.c if (IS_ERR(rt5514->regmap)) { rt5514 1285 sound/soc/codecs/rt5514.c ret = PTR_ERR(rt5514->regmap); rt5514 1297 sound/soc/codecs/rt5514.c ret = regmap_read(rt5514->regmap, RT5514_VENDOR_ID2, &val); rt5514 1299 sound/soc/codecs/rt5514.c ret = regmap_read(rt5514->regmap, RT5514_VENDOR_ID2, &val); rt5514 1306 sound/soc/codecs/rt5514.c ret = regmap_multi_reg_write(rt5514->i2c_regmap, rt5514_i2c_patch, rt5514 1312 sound/soc/codecs/rt5514.c ret = regmap_register_patch(rt5514->regmap, rt5514_patch, rt5514 276 sound/soc/rockchip/rk3399_gru_sound.c SND_SOC_DAILINK_DEFS(rt5514, rt5514 328 sound/soc/rockchip/rk3399_gru_sound.c SND_SOC_DAILINK_REG(rt5514),