Lines Matching full:iface

39 	struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai);  in axg_tdm_set_tdm_slots()  local
56 iface->slots = slots; in axg_tdm_set_tdm_slots()
80 iface->slot_width = slot_width; in axg_tdm_set_tdm_slots()
102 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_set_sysclk() local
106 if (!iface->mclk) { in axg_tdm_iface_set_sysclk()
109 ret = clk_set_rate(iface->mclk, freq); in axg_tdm_iface_set_sysclk()
111 iface->mclk_rate = freq; in axg_tdm_iface_set_sysclk()
120 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_set_fmt() local
124 if (!iface->mclk) { in axg_tdm_iface_set_fmt()
141 iface->fmt = fmt; in axg_tdm_iface_set_fmt()
148 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_startup() local
162 iface->rate); in axg_tdm_iface_startup()
165 "can't set iface rate constraint\n"); in axg_tdm_iface_startup()
177 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_set_stream() local
183 iface->rate = params_rate(params); in axg_tdm_iface_set_stream()
191 if (iface->slot_width < width) { in axg_tdm_iface_set_stream()
207 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_set_lrclk() local
211 ret = clk_set_rate(iface->lrclk, params_rate(params)); in axg_tdm_iface_set_lrclk()
217 switch (iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in axg_tdm_iface_set_lrclk()
240 ret = clk_set_duty_cycle(iface->lrclk, ratio_num, 2); in axg_tdm_iface_set_lrclk()
248 ret = clk_set_phase(iface->lrclk, in axg_tdm_iface_set_lrclk()
249 axg_tdm_lrclk_invert(iface->fmt) ? 180 : 0); in axg_tdm_iface_set_lrclk()
262 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_set_sclk() local
266 srate = iface->slots * iface->slot_width * params_rate(params); in axg_tdm_iface_set_sclk()
268 if (!iface->mclk_rate) { in axg_tdm_iface_set_sclk()
270 clk_set_rate(iface->mclk, 4 * srate); in axg_tdm_iface_set_sclk()
273 if (iface->mclk_rate % srate) { in axg_tdm_iface_set_sclk()
276 srate, iface->mclk_rate); in axg_tdm_iface_set_sclk()
281 ret = clk_set_rate(iface->sclk, srate); in axg_tdm_iface_set_sclk()
288 ret = clk_set_phase(iface->sclk, in axg_tdm_iface_set_sclk()
289 axg_tdm_sclk_invert(iface->fmt) ? 0 : 180); in axg_tdm_iface_set_sclk()
302 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_hw_params() local
305 switch (iface->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in axg_tdm_iface_hw_params()
309 if (iface->slots > 2) { in axg_tdm_iface_hw_params()
311 iface->slots); in axg_tdm_iface_hw_params()
329 if ((iface->fmt & SND_SOC_DAIFMT_MASTER_MASK) == in axg_tdm_iface_hw_params()
376 struct axg_tdm_iface *iface = snd_soc_dai_get_drvdata(dai); in axg_tdm_iface_probe_dai() local
379 dai->capture_dma_data = axg_tdm_stream_alloc(iface); in axg_tdm_iface_probe_dai()
385 dai->playback_dma_data = axg_tdm_stream_alloc(iface); in axg_tdm_iface_probe_dai()
446 struct axg_tdm_iface *iface = snd_soc_component_get_drvdata(component); in axg_tdm_iface_set_bias_level() local
454 ret = clk_prepare_enable(iface->mclk); in axg_tdm_iface_set_bias_level()
459 clk_disable_unprepare(iface->mclk); in axg_tdm_iface_set_bias_level()
475 { .compatible = "amlogic,axg-tdm-iface", },
484 struct axg_tdm_iface *iface; in axg_tdm_iface_probe() local
487 iface = devm_kzalloc(dev, sizeof(*iface), GFP_KERNEL); in axg_tdm_iface_probe()
488 if (!iface) in axg_tdm_iface_probe()
490 platform_set_drvdata(pdev, iface); in axg_tdm_iface_probe()
507 iface->sclk = devm_clk_get(dev, "sclk"); in axg_tdm_iface_probe()
508 if (IS_ERR(iface->sclk)) { in axg_tdm_iface_probe()
509 ret = PTR_ERR(iface->sclk); in axg_tdm_iface_probe()
516 iface->lrclk = devm_clk_get(dev, "lrclk"); in axg_tdm_iface_probe()
517 if (IS_ERR(iface->lrclk)) { in axg_tdm_iface_probe()
518 ret = PTR_ERR(iface->lrclk); in axg_tdm_iface_probe()
530 iface->mclk = devm_clk_get(dev, "mclk"); in axg_tdm_iface_probe()
531 if (IS_ERR(iface->mclk)) { in axg_tdm_iface_probe()
532 ret = PTR_ERR(iface->mclk); in axg_tdm_iface_probe()
534 iface->mclk = NULL; in axg_tdm_iface_probe()
550 .name = "axg-tdm-iface",