• Home
  • Raw
  • Download

Lines Matching refs:scodec

197 	struct sun8i_codec *scodec = dev_get_drvdata(dev);  in sun8i_codec_runtime_resume()  local
200 regcache_cache_only(scodec->regmap, false); in sun8i_codec_runtime_resume()
202 ret = regcache_sync(scodec->regmap); in sun8i_codec_runtime_resume()
213 struct sun8i_codec *scodec = dev_get_drvdata(dev); in sun8i_codec_runtime_suspend() local
215 regcache_cache_only(scodec->regmap, true); in sun8i_codec_runtime_suspend()
216 regcache_mark_dirty(scodec->regmap); in sun8i_codec_runtime_suspend()
256 static int sun8i_codec_update_sample_rate(struct sun8i_codec *scodec) in sun8i_codec_update_sample_rate() argument
262 struct sun8i_codec_aif *aif = &scodec->aifs[i]; in sun8i_codec_update_sample_rate()
276 regmap_update_bits(scodec->regmap, SUN8I_SYS_SR_CTRL, in sun8i_codec_update_sample_rate()
285 struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); in sun8i_codec_set_fmt() local
306 regmap_update_bits(scodec->regmap, SUN8I_AIF_CLK_CTRL(dai->id), in sun8i_codec_set_fmt()
310 regmap_update_bits(scodec->regmap, SUN8I_AIF_CLK_CTRL(dai->id), in sun8i_codec_set_fmt()
343 regmap_update_bits(scodec->regmap, SUN8I_AIF_CLK_CTRL(dai->id), in sun8i_codec_set_fmt()
384 invert ^= scodec->quirks->lrck_inversion; in sun8i_codec_set_fmt()
387 regmap_update_bits(scodec->regmap, SUN8I_AIF_CLK_CTRL(dai->id), in sun8i_codec_set_fmt()
398 struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); in sun8i_codec_set_tdm_slot() local
399 struct sun8i_codec_aif *aif = &scodec->aifs[dai->id]; in sun8i_codec_set_tdm_slot()
435 struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); in sun8i_codec_startup() local
442 if (!scodec->sysclk_refcnt) in sun8i_codec_startup()
444 else if (scodec->sysclk_rate == 22579200) in sun8i_codec_startup()
446 else if (scodec->sysclk_rate == 24576000) in sun8i_codec_startup()
514 struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); in sun8i_codec_hw_params() local
515 struct sun8i_codec_aif *aif = &scodec->aifs[dai->id]; in sun8i_codec_hw_params()
541 regmap_update_bits(scodec->regmap, SUN8I_AIF_CLK_CTRL(dai->id), in sun8i_codec_hw_params()
553 const struct sun8i_codec_aif *partner_aif = &scodec->aifs[partner]; in sun8i_codec_hw_params()
570 regmap_update_bits(scodec->regmap, clk_reg, in sun8i_codec_hw_params()
579 regmap_update_bits(scodec->regmap, clk_reg, in sun8i_codec_hw_params()
592 ret = (aif->open_streams ? clk_set_rate : clk_set_rate_exclusive)(scodec->clk_module, in sun8i_codec_hw_params()
602 scodec->sysclk_refcnt++; in sun8i_codec_hw_params()
603 scodec->sysclk_rate = sysclk_rate; in sun8i_codec_hw_params()
609 return sun8i_codec_update_sample_rate(scodec); in sun8i_codec_hw_params()
615 struct sun8i_codec *scodec = snd_soc_dai_get_drvdata(dai); in sun8i_codec_hw_free() local
616 struct sun8i_codec_aif *aif = &scodec->aifs[dai->id]; in sun8i_codec_hw_free()
622 clk_rate_exclusive_put(scodec->clk_module); in sun8i_codec_hw_free()
623 scodec->sysclk_refcnt--; in sun8i_codec_hw_free()
757 struct sun8i_codec *scodec = snd_soc_component_get_drvdata(component); in sun8i_codec_aif_event() local
758 struct sun8i_codec_aif *aif = &scodec->aifs[w->sname[3] - '1']; in sun8i_codec_aif_event()
766 return sun8i_codec_update_sample_rate(scodec); in sun8i_codec_aif_event()
1232 struct sun8i_codec *scodec = snd_soc_component_get_drvdata(component); in sun8i_codec_component_probe() local
1236 if (scodec->quirks->legacy_widgets) { in sun8i_codec_component_probe()
1254 regmap_update_bits(scodec->regmap, SUN8I_SYSCLK_CTL, in sun8i_codec_component_probe()
1261 regmap_update_bits(scodec->regmap, SUN8I_SYSCLK_CTL, in sun8i_codec_component_probe()
1266 sun8i_codec_update_sample_rate(scodec); in sun8i_codec_component_probe()
1294 struct sun8i_codec *scodec; in sun8i_codec_probe() local
1298 scodec = devm_kzalloc(&pdev->dev, sizeof(*scodec), GFP_KERNEL); in sun8i_codec_probe()
1299 if (!scodec) in sun8i_codec_probe()
1302 scodec->clk_module = devm_clk_get(&pdev->dev, "mod"); in sun8i_codec_probe()
1303 if (IS_ERR(scodec->clk_module)) { in sun8i_codec_probe()
1305 return PTR_ERR(scodec->clk_module); in sun8i_codec_probe()
1314 scodec->regmap = devm_regmap_init_mmio_clk(&pdev->dev, "bus", base, in sun8i_codec_probe()
1316 if (IS_ERR(scodec->regmap)) { in sun8i_codec_probe()
1318 return PTR_ERR(scodec->regmap); in sun8i_codec_probe()
1321 scodec->quirks = of_device_get_match_data(&pdev->dev); in sun8i_codec_probe()
1323 platform_set_drvdata(pdev, scodec); in sun8i_codec_probe()