Lines Matching refs:dai
273 static int dai_set_srt_srcl(struct dai *dai, struct rsc *src) in dai_set_srt_srcl() argument
276 dai->hw->dai_srt_set_srcm(dai->ctrl_blk, src->ops->index(src)); in dai_set_srt_srcl()
280 static int dai_set_srt_srcr(struct dai *dai, struct rsc *src) in dai_set_srt_srcr() argument
283 dai->hw->dai_srt_set_srco(dai->ctrl_blk, src->ops->index(src)); in dai_set_srt_srcr()
287 static int dai_set_srt_msr(struct dai *dai, unsigned int msr) in dai_set_srt_msr() argument
294 dai->hw->dai_srt_set_rsr(dai->ctrl_blk, rsr); in dai_set_srt_msr()
298 static int dai_set_enb_src(struct dai *dai, unsigned int enb) in dai_set_enb_src() argument
300 dai->hw->dai_srt_set_ec(dai->ctrl_blk, enb); in dai_set_enb_src()
304 static int dai_set_enb_srt(struct dai *dai, unsigned int enb) in dai_set_enb_srt() argument
306 dai->hw->dai_srt_set_et(dai->ctrl_blk, enb); in dai_set_enb_srt()
310 static int dai_commit_write(struct dai *dai) in dai_commit_write() argument
312 dai->hw->dai_commit_write(dai->hw, in dai_commit_write()
313 daio_device_index(dai->daio.type, dai->hw), dai->ctrl_blk); in dai_commit_write()
462 static int dai_rsc_init(struct dai *dai, in dai_rsc_init() argument
470 err = daio_rsc_init(&dai->daio, desc, mgr->mgr.hw); in dai_rsc_init()
474 dai->ops = &dai_ops; in dai_rsc_init()
475 dai->hw = mgr->mgr.hw; in dai_rsc_init()
476 err = hw->dai_get_ctrl_blk(&dai->ctrl_blk); in dai_rsc_init()
483 hw->dai_srt_set_rsr(dai->ctrl_blk, rsr); in dai_rsc_init()
484 hw->dai_srt_set_drat(dai->ctrl_blk, 0); in dai_rsc_init()
486 hw->dai_srt_set_ec(dai->ctrl_blk, 0); in dai_rsc_init()
487 hw->dai_srt_set_et(dai->ctrl_blk, 0); /* default to disabling SRT */ in dai_rsc_init()
489 daio_device_index(dai->daio.type, dai->hw), dai->ctrl_blk); in dai_rsc_init()
494 daio_rsc_uninit(&dai->daio); in dai_rsc_init()
498 static int dai_rsc_uninit(struct dai *dai) in dai_rsc_uninit() argument
500 dai->hw->dai_put_ctrl_blk(dai->ctrl_blk); in dai_rsc_uninit()
501 dai->hw = dai->ctrl_blk = NULL; in dai_rsc_uninit()
502 daio_rsc_uninit(&dai->daio); in dai_rsc_uninit()
557 struct dai *dai = kzalloc(sizeof(*dai), GFP_KERNEL); in get_daio_rsc() local
558 if (!dai) in get_daio_rsc()
561 err = dai_rsc_init(dai, desc, mgr); in get_daio_rsc()
563 kfree(dai); in get_daio_rsc()
567 *rdaio = &dai->daio; in get_daio_rsc()
597 dai_rsc_uninit(container_of(daio, struct dai, daio)); in put_daio_rsc()
598 kfree(container_of(daio, struct dai, daio)); in put_daio_rsc()