Lines Matching full:aio
244 static int audio_ssp_init_portregs(struct cygnus_aio_port *aio) in audio_ssp_init_portregs() argument
249 switch (aio->port_type) { in audio_ssp_init_portregs()
251 value = readl(aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_init_portregs()
255 writel(aio->portnum, in audio_ssp_init_portregs()
256 aio->cygaud->audio + aio->regs.bf_sourcech_grp); in audio_ssp_init_portregs()
259 value |= aio->portnum << I2S_OUT_STREAM_CFG_GROUP_ID; in audio_ssp_init_portregs()
260 value |= aio->portnum; /* FCI ID is the port num */ in audio_ssp_init_portregs()
262 writel(value, aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_init_portregs()
265 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_init_portregs()
269 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_init_portregs()
272 value = readl(aio->cygaud->i2s_in + in audio_ssp_init_portregs()
273 aio->regs.i2s_cap_stream_cfg); in audio_ssp_init_portregs()
275 value |= aio->portnum << I2S_IN_STREAM_CFG_0_GROUP_ID; in audio_ssp_init_portregs()
276 writel(value, aio->cygaud->i2s_in + in audio_ssp_init_portregs()
277 aio->regs.i2s_cap_stream_cfg); in audio_ssp_init_portregs()
280 fci_id = CAPTURE_FCI_ID_BASE + aio->portnum; in audio_ssp_init_portregs()
282 value = readl(aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_init_portregs()
287 writel(value, aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_init_portregs()
290 value = readl(aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in audio_ssp_init_portregs()
291 value &= ~BIT((aio->portnum * 4) + AUD_MISC_SEROUT_SDAT_OE); in audio_ssp_init_portregs()
292 writel(value, aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in audio_ssp_init_portregs()
295 writel(aio->portnum, aio->cygaud->audio + BF_SRC_GRP3_OFFSET); in audio_ssp_init_portregs()
297 value = readl(aio->cygaud->audio + SPDIF_CTRL_OFFSET); in audio_ssp_init_portregs()
299 writel(value, aio->cygaud->audio + SPDIF_CTRL_OFFSET); in audio_ssp_init_portregs()
302 value = readl(aio->cygaud->audio + SPDIF_STREAM_CFG_OFFSET); in audio_ssp_init_portregs()
304 value |= aio->portnum; /* FCI ID is the port num */ in audio_ssp_init_portregs()
306 writel(value, aio->cygaud->audio + SPDIF_STREAM_CFG_OFFSET); in audio_ssp_init_portregs()
308 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_init_portregs()
312 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_init_portregs()
315 value = readl(aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in audio_ssp_init_portregs()
317 writel(value, aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in audio_ssp_init_portregs()
320 dev_err(aio->cygaud->dev, "Port not supported\n"); in audio_ssp_init_portregs()
327 static void audio_ssp_in_enable(struct cygnus_aio_port *aio) in audio_ssp_in_enable() argument
331 value = readl(aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_in_enable()
333 writel(value, aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_in_enable()
335 writel(0x1, aio->cygaud->audio + aio->regs.bf_destch_ctrl); in audio_ssp_in_enable()
337 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_in_enable()
340 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_in_enable()
342 value = readl(aio->cygaud->i2s_in + aio->regs.i2s_cap_stream_cfg); in audio_ssp_in_enable()
344 writel(value, aio->cygaud->i2s_in + aio->regs.i2s_cap_stream_cfg); in audio_ssp_in_enable()
346 aio->streams_on |= CAPTURE_STREAM_MASK; in audio_ssp_in_enable()
349 static void audio_ssp_in_disable(struct cygnus_aio_port *aio) in audio_ssp_in_disable() argument
353 value = readl(aio->cygaud->i2s_in + aio->regs.i2s_cap_stream_cfg); in audio_ssp_in_disable()
355 writel(value, aio->cygaud->i2s_in + aio->regs.i2s_cap_stream_cfg); in audio_ssp_in_disable()
357 aio->streams_on &= ~CAPTURE_STREAM_MASK; in audio_ssp_in_disable()
360 if (!aio->streams_on) { in audio_ssp_in_disable()
361 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_in_disable()
364 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_in_disable()
367 writel(0x0, aio->cygaud->audio + aio->regs.bf_destch_ctrl); in audio_ssp_in_disable()
369 value = readl(aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_in_disable()
371 writel(value, aio->cygaud->audio + aio->regs.bf_destch_cfg); in audio_ssp_in_disable()
374 static int audio_ssp_out_enable(struct cygnus_aio_port *aio) in audio_ssp_out_enable() argument
379 switch (aio->port_type) { in audio_ssp_out_enable()
381 value = readl(aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_out_enable()
383 writel(value, aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_out_enable()
385 writel(1, aio->cygaud->audio + aio->regs.bf_sourcech_ctrl); in audio_ssp_out_enable()
387 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_out_enable()
390 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_out_enable()
392 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_enable()
394 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_enable()
396 aio->streams_on |= PLAYBACK_STREAM_MASK; in audio_ssp_out_enable()
399 value = readl(aio->cygaud->audio + SPDIF_FORMAT_CFG_OFFSET); in audio_ssp_out_enable()
401 writel(value, aio->cygaud->audio + SPDIF_FORMAT_CFG_OFFSET); in audio_ssp_out_enable()
403 writel(1, aio->cygaud->audio + aio->regs.bf_sourcech_ctrl); in audio_ssp_out_enable()
405 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_enable()
407 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_enable()
410 dev_err(aio->cygaud->dev, in audio_ssp_out_enable()
411 "Port not supported %d\n", aio->portnum); in audio_ssp_out_enable()
418 static int audio_ssp_out_disable(struct cygnus_aio_port *aio) in audio_ssp_out_disable() argument
423 switch (aio->port_type) { in audio_ssp_out_disable()
425 aio->streams_on &= ~PLAYBACK_STREAM_MASK; in audio_ssp_out_disable()
428 if (!aio->streams_on) { in audio_ssp_out_disable()
429 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_out_disable()
432 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in audio_ssp_out_disable()
436 value = readl(aio->cygaud->audio + BF_SRC_GRP_SYNC_DIS_OFFSET); in audio_ssp_out_disable()
437 value |= BIT(aio->portnum); in audio_ssp_out_disable()
438 writel(value, aio->cygaud->audio + BF_SRC_GRP_SYNC_DIS_OFFSET); in audio_ssp_out_disable()
440 writel(0, aio->cygaud->audio + aio->regs.bf_sourcech_ctrl); in audio_ssp_out_disable()
442 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_disable()
444 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_disable()
447 value = readl(aio->cygaud->audio + BF_SRC_GRP_SYNC_DIS_OFFSET); in audio_ssp_out_disable()
448 value &= ~BIT(aio->portnum); in audio_ssp_out_disable()
449 writel(value, aio->cygaud->audio + BF_SRC_GRP_SYNC_DIS_OFFSET); in audio_ssp_out_disable()
451 value = readl(aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_out_disable()
453 writel(value, aio->cygaud->audio + aio->regs.i2s_stream_cfg); in audio_ssp_out_disable()
456 value = readl(aio->cygaud->i2s_in + IOP_SW_INIT_LOGIC); in audio_ssp_out_disable()
457 value |= BIT(aio->portnum); in audio_ssp_out_disable()
458 writel(value, aio->cygaud->i2s_in + IOP_SW_INIT_LOGIC); in audio_ssp_out_disable()
459 value &= ~BIT(aio->portnum); in audio_ssp_out_disable()
460 writel(value, aio->cygaud->i2s_in + IOP_SW_INIT_LOGIC); in audio_ssp_out_disable()
463 value = readl(aio->cygaud->audio + SPDIF_FORMAT_CFG_OFFSET); in audio_ssp_out_disable()
465 writel(value, aio->cygaud->audio + SPDIF_FORMAT_CFG_OFFSET); in audio_ssp_out_disable()
466 writel(0, aio->cygaud->audio + aio->regs.bf_sourcech_ctrl); in audio_ssp_out_disable()
468 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_disable()
470 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in audio_ssp_out_disable()
473 dev_err(aio->cygaud->dev, in audio_ssp_out_disable()
474 "Port not supported %d\n", aio->portnum); in audio_ssp_out_disable()
482 struct cygnus_aio_port *aio) in pll_configure_mclk() argument
504 if ((aio->clk_trace.cap_en) && (!aio->clk_trace.cap_clk_en)) { in pll_configure_mclk()
511 aio->clk_trace.cap_clk_en = true; in pll_configure_mclk()
514 if ((aio->clk_trace.play_en) && (!aio->clk_trace.play_clk_en)) { in pll_configure_mclk()
521 aio->clk_trace.play_clk_en = true; in pll_configure_mclk()
534 static int cygnus_ssp_set_clocks(struct cygnus_aio_port *aio) in cygnus_ssp_set_clocks() argument
543 bit_rate = aio->bit_per_frame * aio->lrclk; in cygnus_ssp_set_clocks()
550 if ((aio->mclk % bit_rate) != 0) in cygnus_ssp_set_clocks()
553 ratio = aio->mclk / bit_rate; in cygnus_ssp_set_clocks()
566 dev_err(aio->cygaud->dev, in cygnus_ssp_set_clocks()
568 dev_err(aio->cygaud->dev, "lrclk = %u, bits/frame = %u, mclk = %u\n", in cygnus_ssp_set_clocks()
569 aio->lrclk, aio->bit_per_frame, aio->mclk); in cygnus_ssp_set_clocks()
574 switch (aio->port_type) { in cygnus_ssp_set_clocks()
576 sclk = aio->bit_per_frame; in cygnus_ssp_set_clocks()
584 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_ssp_set_clocks()
587 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_ssp_set_clocks()
588 dev_dbg(aio->cygaud->dev, in cygnus_ssp_set_clocks()
594 dev_err(aio->cygaud->dev, "Unknown port type\n"); in cygnus_ssp_set_clocks()
599 value = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in cygnus_ssp_set_clocks()
602 writel(value, aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in cygnus_ssp_set_clocks()
604 dev_dbg(aio->cygaud->dev, "mclk cfg reg = 0x%x\n", value); in cygnus_ssp_set_clocks()
605 dev_dbg(aio->cygaud->dev, "bits per frame = %u, mclk = %u Hz, lrclk = %u Hz\n", in cygnus_ssp_set_clocks()
606 aio->bit_per_frame, aio->mclk, aio->lrclk); in cygnus_ssp_set_clocks()
614 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); in cygnus_ssp_hw_params() local
620 dev_dbg(aio->cygaud->dev, "%s port = %d\n", __func__, aio->portnum); in cygnus_ssp_hw_params()
621 dev_dbg(aio->cygaud->dev, "params_channels %d\n", in cygnus_ssp_hw_params()
623 dev_dbg(aio->cygaud->dev, "rate %d\n", params_rate(params)); in cygnus_ssp_hw_params()
624 dev_dbg(aio->cygaud->dev, "format %d\n", params_format(params)); in cygnus_ssp_hw_params()
628 switch (aio->mode) { in cygnus_ssp_hw_params()
631 dev_err(aio->cygaud->dev, "Cannot run %d channels at %dHz\n", in cygnus_ssp_hw_params()
637 aio->bit_per_frame = 64; /* I2S must be 64 bit per frame */ in cygnus_ssp_hw_params()
640 dev_err(aio->cygaud->dev, in cygnus_ssp_hw_params()
646 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in cygnus_ssp_hw_params()
649 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in cygnus_ssp_hw_params()
665 value = readl(aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in cygnus_ssp_hw_params()
668 writel(value, aio->cygaud->audio + aio->regs.bf_sourcech_cfg); in cygnus_ssp_hw_params()
674 value = readl(aio->cygaud->audio + in cygnus_ssp_hw_params()
675 aio->regs.bf_destch_cfg); in cygnus_ssp_hw_params()
677 writel(value, aio->cygaud->audio + in cygnus_ssp_hw_params()
678 aio->regs.bf_destch_cfg); in cygnus_ssp_hw_params()
682 value = readl(aio->cygaud->audio + in cygnus_ssp_hw_params()
683 aio->regs.bf_destch_cfg); in cygnus_ssp_hw_params()
685 writel(value, aio->cygaud->audio + in cygnus_ssp_hw_params()
686 aio->regs.bf_destch_cfg); in cygnus_ssp_hw_params()
694 aio->lrclk = rate; in cygnus_ssp_hw_params()
696 if (!aio->is_slave) in cygnus_ssp_hw_params()
697 ret = cygnus_ssp_set_clocks(aio); in cygnus_ssp_hw_params()
710 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); in cygnus_ssp_set_sysclk() local
713 dev_dbg(aio->cygaud->dev, in cygnus_ssp_set_sysclk()
714 "%s Enter port = %d\n", __func__, aio->portnum); in cygnus_ssp_set_sysclk()
715 sel = pll_configure_mclk(cygaud, freq, aio); in cygnus_ssp_set_sysclk()
717 dev_err(aio->cygaud->dev, in cygnus_ssp_set_sysclk()
722 aio->mclk = freq; in cygnus_ssp_set_sysclk()
724 dev_dbg(aio->cygaud->dev, "%s Setting MCLKSEL to %d\n", __func__, sel); in cygnus_ssp_set_sysclk()
725 value = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in cygnus_ssp_set_sysclk()
728 writel(value, aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in cygnus_ssp_set_sysclk()
736 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); in cygnus_ssp_startup() local
738 snd_soc_dai_set_dma_data(dai, substream, aio); in cygnus_ssp_startup()
740 aio->clk_trace.play_en = true; in cygnus_ssp_startup()
742 aio->clk_trace.cap_en = true; in cygnus_ssp_startup()
755 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); in cygnus_ssp_shutdown() local
758 aio->clk_trace.play_en = false; in cygnus_ssp_shutdown()
760 aio->clk_trace.cap_en = false; in cygnus_ssp_shutdown()
762 if (!aio->is_slave) { in cygnus_ssp_shutdown()
765 val = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in cygnus_ssp_shutdown()
767 if (val >= ARRAY_SIZE(aio->cygaud->audio_clk)) { in cygnus_ssp_shutdown()
768 dev_err(aio->cygaud->dev, "Clk index %u is out of bounds\n", in cygnus_ssp_shutdown()
774 if (aio->clk_trace.play_clk_en) { in cygnus_ssp_shutdown()
775 clk_disable_unprepare(aio->cygaud-> in cygnus_ssp_shutdown()
777 aio->clk_trace.play_clk_en = false; in cygnus_ssp_shutdown()
780 if (aio->clk_trace.cap_clk_en) { in cygnus_ssp_shutdown()
781 clk_disable_unprepare(aio->cygaud-> in cygnus_ssp_shutdown()
783 aio->clk_trace.cap_clk_en = false; in cygnus_ssp_shutdown()
813 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); in cygnus_ssp_set_custom_fsync_width() local
816 aio->fsync_width = len; in cygnus_ssp_set_custom_fsync_width()
826 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); in cygnus_ssp_set_fmt() local
834 dev_dbg(aio->cygaud->dev, "%s Enter fmt: %x\n", __func__, fmt); in cygnus_ssp_set_fmt()
836 if (aio->port_type == PORT_SPDIF) in cygnus_ssp_set_fmt()
844 aio->is_slave = 1; in cygnus_ssp_set_fmt()
848 aio->is_slave = 0; in cygnus_ssp_set_fmt()
858 aio->mode = CYGNUS_SSPMODE_I2S; in cygnus_ssp_set_fmt()
869 if ((aio->fsync_width > 0) && (aio->fsync_width < 256)) in cygnus_ssp_set_fmt()
871 (aio->fsync_width << I2S_OUT_CFGX_FSYNC_WIDTH); in cygnus_ssp_set_fmt()
875 aio->mode = CYGNUS_SSPMODE_TDM; in cygnus_ssp_set_fmt()
886 ssp_curcfg = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_ssp_set_fmt()
888 writel(ssp_outcfg, aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_ssp_set_fmt()
894 ssp_curcfg = readl(aio->cygaud->i2s_in + aio->regs.i2s_cap_cfg); in cygnus_ssp_set_fmt()
896 writel(ssp_incfg, aio->cygaud->i2s_in + aio->regs.i2s_cap_cfg); in cygnus_ssp_set_fmt()
898 val = readl(aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in cygnus_ssp_set_fmt()
908 mask = mask << (aio->portnum * 4); in cygnus_ssp_set_fmt()
909 if (aio->is_slave) in cygnus_ssp_set_fmt()
916 dev_dbg(aio->cygaud->dev, "%s Set OE bits 0x%x\n", __func__, val); in cygnus_ssp_set_fmt()
917 writel(val, aio->cygaud->audio + AUD_MISC_SEROUT_OE_REG_BASE); in cygnus_ssp_set_fmt()
925 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); in cygnus_ssp_trigger() local
928 dev_dbg(aio->cygaud->dev, in cygnus_ssp_trigger()
929 "%s cmd %d at port = %d\n", __func__, cmd, aio->portnum); in cygnus_ssp_trigger()
936 audio_ssp_out_enable(aio); in cygnus_ssp_trigger()
938 audio_ssp_in_enable(aio); in cygnus_ssp_trigger()
947 audio_ssp_out_disable(aio); in cygnus_ssp_trigger()
949 audio_ssp_in_disable(aio); in cygnus_ssp_trigger()
963 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); in cygnus_set_dai_tdm_slot() local
972 dev_err(aio->cygaud->dev, in cygnus_set_dai_tdm_slot()
1000 dev_warn(aio->cygaud->dev, in cygnus_set_dai_tdm_slot()
1014 dev_err(aio->cygaud->dev, in cygnus_set_dai_tdm_slot()
1020 aio->bit_per_frame = frame_bits; in cygnus_set_dai_tdm_slot()
1022 dev_dbg(aio->cygaud->dev, "%s active_slots %u, bits per frame %d\n", in cygnus_set_dai_tdm_slot()
1026 value = readl(aio->cygaud->i2s_in + aio->regs.i2s_cap_cfg); in cygnus_set_dai_tdm_slot()
1031 writel(value, aio->cygaud->i2s_in + aio->regs.i2s_cap_cfg); in cygnus_set_dai_tdm_slot()
1034 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_set_dai_tdm_slot()
1039 writel(value, aio->cygaud->audio + aio->regs.i2s_cfg); in cygnus_set_dai_tdm_slot()
1047 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); in __cygnus_ssp_suspend() local
1052 if (!aio->is_slave) { in __cygnus_ssp_suspend()
1055 val = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg); in __cygnus_ssp_suspend()
1057 if (val >= ARRAY_SIZE(aio->cygaud->audio_clk)) { in __cygnus_ssp_suspend()
1058 dev_err(aio->cygaud->dev, "Clk index %u is out of bounds\n", in __cygnus_ssp_suspend()
1063 if (aio->clk_trace.cap_clk_en) in __cygnus_ssp_suspend()
1064 clk_disable_unprepare(aio->cygaud->audio_clk[val]); in __cygnus_ssp_suspend()
1065 if (aio->clk_trace.play_clk_en) in __cygnus_ssp_suspend()
1066 clk_disable_unprepare(aio->cygaud->audio_clk[val]); in __cygnus_ssp_suspend()
1068 aio->pll_clk_num = val; in __cygnus_ssp_suspend()
1087 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); in __cygnus_ssp_resume() local
1093 if (!aio->is_slave) { in __cygnus_ssp_resume()
1094 if (aio->clk_trace.cap_clk_en) { in __cygnus_ssp_resume()
1095 error = clk_prepare_enable(aio->cygaud-> in __cygnus_ssp_resume()
1096 audio_clk[aio->pll_clk_num]); in __cygnus_ssp_resume()
1098 dev_err(aio->cygaud->dev, "%s clk_prepare_enable failed\n", in __cygnus_ssp_resume()
1103 if (aio->clk_trace.play_clk_en) { in __cygnus_ssp_resume()
1104 error = clk_prepare_enable(aio->cygaud-> in __cygnus_ssp_resume()
1105 audio_clk[aio->pll_clk_num]); in __cygnus_ssp_resume()
1107 if (aio->clk_trace.cap_clk_en) in __cygnus_ssp_resume()
1108 clk_disable_unprepare(aio->cygaud-> in __cygnus_ssp_resume()
1109 audio_clk[aio->pll_clk_num]); in __cygnus_ssp_resume()
1110 dev_err(aio->cygaud->dev, "%s clk_prepare_enable failed\n", in __cygnus_ssp_resume()
1210 struct cygnus_aio_port *aio; in parse_ssp_child_node() local
1243 aio = &cygaud->portinfo[portnum]; in parse_ssp_child_node()
1244 aio->cygaud = cygaud; in parse_ssp_child_node()
1245 aio->portnum = portnum; in parse_ssp_child_node()
1246 aio->port_type = port_type; in parse_ssp_child_node()
1247 aio->fsync_width = -1; in parse_ssp_child_node()
1251 aio->regs = ssp_regs[portnum]; in parse_ssp_child_node()
1253 aio->mode = CYGNUS_SSPMODE_UNKNOWN; in parse_ssp_child_node()
1257 aio->regs.bf_sourcech_cfg = BF_SRC_CFG3_OFFSET; in parse_ssp_child_node()
1258 aio->regs.bf_sourcech_ctrl = BF_SRC_CTRL3_OFFSET; in parse_ssp_child_node()
1259 aio->regs.i2s_mclk_cfg = SPDIF_MCLK_CFG_OFFSET; in parse_ssp_child_node()
1260 aio->regs.i2s_stream_cfg = SPDIF_STREAM_CFG_OFFSET; in parse_ssp_child_node()
1264 aio->mode = CYGNUS_SSPMODE_I2S; in parse_ssp_child_node()
1271 dev_dbg(&pdev->dev, "%s portnum = %d\n", __func__, aio->portnum); in parse_ssp_child_node()
1272 aio->streams_on = 0; in parse_ssp_child_node()
1273 aio->cygaud->dev = &pdev->dev; in parse_ssp_child_node()
1274 aio->clk_trace.play_en = false; in parse_ssp_child_node()
1275 aio->clk_trace.cap_en = false; in parse_ssp_child_node()
1277 audio_ssp_init_portregs(aio); in parse_ssp_child_node()