tscs454 276 sound/soc/codecs/tscs454.c static inline int tscs454_data_init(struct tscs454 *tscs454, tscs454 282 sound/soc/codecs/tscs454.c tscs454->regmap = devm_regmap_init_i2c(i2c, &tscs454_regmap_cfg); tscs454 283 sound/soc/codecs/tscs454.c if (IS_ERR(tscs454->regmap)) { tscs454 284 sound/soc/codecs/tscs454.c ret = PTR_ERR(tscs454->regmap); tscs454 289 sound/soc/codecs/tscs454.c aif_init(&tscs454->aifs[i], i); tscs454 291 sound/soc/codecs/tscs454.c mutex_init(&tscs454->aifs_status_lock); tscs454 292 sound/soc/codecs/tscs454.c pll_init(&tscs454->pll1, 1); tscs454 293 sound/soc/codecs/tscs454.c pll_init(&tscs454->pll2, 2); tscs454 295 sound/soc/codecs/tscs454.c coeff_ram_init(&tscs454->dac_ram); tscs454 296 sound/soc/codecs/tscs454.c coeff_ram_init(&tscs454->spk_ram); tscs454 297 sound/soc/codecs/tscs454.c coeff_ram_init(&tscs454->sub_ram); tscs454 312 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 320 sound/soc/codecs/tscs454.c coeff_ram = tscs454->dac_ram.cache; tscs454 321 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->dac_ram.lock; tscs454 323 sound/soc/codecs/tscs454.c coeff_ram = tscs454->spk_ram.cache; tscs454 324 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->spk_ram.lock; tscs454 326 sound/soc/codecs/tscs454.c coeff_ram = tscs454->sub_ram.cache; tscs454 327 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->sub_ram.lock; tscs454 347 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 373 sound/soc/codecs/tscs454.c ret = regmap_write(tscs454->regmap, r_addr, coeff_addr); tscs454 380 sound/soc/codecs/tscs454.c ret = regmap_bulk_write(tscs454->regmap, r_wr, tscs454 398 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 413 sound/soc/codecs/tscs454.c coeff_ram = tscs454->dac_ram.cache; tscs454 414 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->dac_ram.lock; tscs454 415 sound/soc/codecs/tscs454.c coeff_ram_synced = &tscs454->dac_ram.synced; tscs454 420 sound/soc/codecs/tscs454.c coeff_ram = tscs454->spk_ram.cache; tscs454 421 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->spk_ram.lock; tscs454 422 sound/soc/codecs/tscs454.c coeff_ram_synced = &tscs454->spk_ram.synced; tscs454 427 sound/soc/codecs/tscs454.c coeff_ram = tscs454->sub_ram.cache; tscs454 428 sound/soc/codecs/tscs454.c coeff_ram_lock = &tscs454->sub_ram.lock; tscs454 429 sound/soc/codecs/tscs454.c coeff_ram_synced = &tscs454->sub_ram.synced; tscs454 444 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->pll1.lock); tscs454 445 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->pll2.lock); tscs454 467 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->pll2.lock); tscs454 468 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->pll1.lock); tscs454 475 sound/soc/codecs/tscs454.c struct tscs454 *tscs454) tscs454 479 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->dac_ram.lock); tscs454 480 sound/soc/codecs/tscs454.c if (!tscs454->dac_ram.synced) { tscs454 481 sound/soc/codecs/tscs454.c ret = write_coeff_ram(component, tscs454->dac_ram.cache, tscs454 485 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->dac_ram.lock); tscs454 489 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->dac_ram.lock); tscs454 491 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->spk_ram.lock); tscs454 492 sound/soc/codecs/tscs454.c if (!tscs454->spk_ram.synced) { tscs454 493 sound/soc/codecs/tscs454.c ret = write_coeff_ram(component, tscs454->spk_ram.cache, tscs454 497 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->spk_ram.lock); tscs454 501 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->spk_ram.lock); tscs454 503 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->sub_ram.lock); tscs454 504 sound/soc/codecs/tscs454.c if (!tscs454->sub_ram.synced) { tscs454 505 sound/soc/codecs/tscs454.c ret = write_coeff_ram(component, tscs454->sub_ram.cache, tscs454 509 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->sub_ram.lock); tscs454 513 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->sub_ram.lock); tscs454 637 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 643 sound/soc/codecs/tscs454.c if (tscs454->sysclk_src_id < PLL_INPUT_BCLK) tscs454 644 sound/soc/codecs/tscs454.c freq = clk_get_rate(tscs454->sysclk); tscs454 646 sound/soc/codecs/tscs454.c freq = tscs454->bclk_freq; tscs454 689 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 693 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->pll1.lock); tscs454 694 sound/soc/codecs/tscs454.c users = tscs454->pll1.users; tscs454 695 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->pll1.lock); tscs454 699 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->pll2.lock); tscs454 700 sound/soc/codecs/tscs454.c users = tscs454->pll2.users; tscs454 701 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->pll2.lock); tscs454 718 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 753 sound/soc/codecs/tscs454.c ret = coeff_ram_sync(component, tscs454); tscs454 815 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 817 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->aifs_status_lock); tscs454 821 sound/soc/codecs/tscs454.c set_aif_status_inactive(&tscs454->aifs_status, aif->id, playback); tscs454 824 sound/soc/codecs/tscs454.c aif->id, tscs454->aifs_status.streams); tscs454 826 sound/soc/codecs/tscs454.c if (!aif_active(&tscs454->aifs_status, aif->id)) { tscs454 834 sound/soc/codecs/tscs454.c if (!aifs_active(&tscs454->aifs_status)) { tscs454 836 sound/soc/codecs/tscs454.c tscs454->internal_rate.pll->id); tscs454 837 sound/soc/codecs/tscs454.c free_pll(tscs454->internal_rate.pll); tscs454 840 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->aifs_status_lock); tscs454 2642 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 2657 sound/soc/codecs/tscs454.c tscs454->bclk_freq = freq; tscs454 2895 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 2896 sound/soc/codecs/tscs454.c struct aif *aif = &tscs454->aifs[dai->id]; tscs454 3183 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 3185 sound/soc/codecs/tscs454.c struct aif *aif = &tscs454->aifs[dai->id]; tscs454 3189 sound/soc/codecs/tscs454.c mutex_lock(&tscs454->aifs_status_lock); tscs454 3194 sound/soc/codecs/tscs454.c if (!aif_active(&tscs454->aifs_status, aif->id)) { tscs454 3196 sound/soc/codecs/tscs454.c aif->pll = &tscs454->pll1; tscs454 3198 sound/soc/codecs/tscs454.c aif->pll = &tscs454->pll2; tscs454 3206 sound/soc/codecs/tscs454.c if (!aifs_active(&tscs454->aifs_status)) { /* First active aif */ tscs454 3212 sound/soc/codecs/tscs454.c tscs454->internal_rate.pll = &tscs454->pll1; tscs454 3214 sound/soc/codecs/tscs454.c tscs454->internal_rate.pll = &tscs454->pll2; tscs454 3217 sound/soc/codecs/tscs454.c tscs454->internal_rate.pll->id); tscs454 3219 sound/soc/codecs/tscs454.c reserve_pll(tscs454->internal_rate.pll); tscs454 3235 sound/soc/codecs/tscs454.c set_aif_status_active(&tscs454->aifs_status, aif->id, tscs454 3239 sound/soc/codecs/tscs454.c aif->id, tscs454->aifs_status.streams); tscs454 3243 sound/soc/codecs/tscs454.c mutex_unlock(&tscs454->aifs_status_lock); tscs454 3252 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 3253 sound/soc/codecs/tscs454.c struct aif *aif = &tscs454->aifs[dai->id]; tscs454 3264 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 3265 sound/soc/codecs/tscs454.c struct aif *aif = &tscs454->aifs[dai->id]; tscs454 3296 sound/soc/codecs/tscs454.c struct tscs454 *tscs454 = snd_soc_component_get_drvdata(component); tscs454 3300 sound/soc/codecs/tscs454.c switch (tscs454->sysclk_src_id) { tscs454 3326 sound/soc/codecs/tscs454.c if (tscs454->sysclk_src_id < PLL_INPUT_BCLK) tscs454 3417 sound/soc/codecs/tscs454.c struct tscs454 *tscs454; tscs454 3421 sound/soc/codecs/tscs454.c tscs454 = devm_kzalloc(&i2c->dev, sizeof(*tscs454), GFP_KERNEL); tscs454 3422 sound/soc/codecs/tscs454.c if (!tscs454) tscs454 3425 sound/soc/codecs/tscs454.c ret = tscs454_data_init(tscs454, i2c); tscs454 3429 sound/soc/codecs/tscs454.c i2c_set_clientdata(i2c, tscs454); tscs454 3432 sound/soc/codecs/tscs454.c tscs454->sysclk = devm_clk_get(&i2c->dev, src_names[src]); tscs454 3433 sound/soc/codecs/tscs454.c if (!IS_ERR(tscs454->sysclk)) { tscs454 3435 sound/soc/codecs/tscs454.c } else if (PTR_ERR(tscs454->sysclk) != -ENOENT) { tscs454 3436 sound/soc/codecs/tscs454.c ret = PTR_ERR(tscs454->sysclk); tscs454 3442 sound/soc/codecs/tscs454.c tscs454->sysclk_src_id = src; tscs454 3444 sound/soc/codecs/tscs454.c ret = regmap_write(tscs454->regmap, tscs454 3450 sound/soc/codecs/tscs454.c regcache_mark_dirty(tscs454->regmap); tscs454 3452 sound/soc/codecs/tscs454.c ret = regmap_register_patch(tscs454->regmap, tscs454_patch, tscs454 3459 sound/soc/codecs/tscs454.c regmap_write(tscs454->regmap, R_PAGESEL, 0x00);