Lines Matching +full:serial +full:- +full:dir
1 // SPDX-License-Identifier: GPL-2.0-only
45 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" in psc_i2s_hw_params()
65 dev_dbg(psc_dma->dev, "invalid format\n"); in psc_i2s_hw_params()
66 return -EINVAL; in psc_i2s_hw_params()
68 out_be32(&psc_dma->psc_regs->sicr, psc_dma->sicr | mode); in psc_i2s_hw_params()
85 * @dir: SND_SOC_CLOCK_IN (clock slave) or SND_SOC_CLOCK_OUT (clock master)
88 int clk_id, unsigned int freq, int dir) in psc_i2s_set_sysclk() argument
91 dev_dbg(psc_dma->dev, "psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\n", in psc_i2s_set_sysclk()
92 cpu_dai, dir); in psc_i2s_set_sysclk()
93 return (dir == SND_SOC_CLOCK_IN) ? 0 : -EINVAL; in psc_i2s_set_sysclk()
97 * psc_i2s_set_fmt: set the serial format.
99 * This function is called by the machine driver to tell us what serial
110 dev_dbg(psc_dma->dev, "psc_i2s_set_fmt(cpu_dai=%p, format=%i)\n", in psc_i2s_set_fmt()
112 return (format == SND_SOC_DAIFMT_I2S) ? 0 : -EINVAL; in psc_i2s_set_fmt()
115 /* ---------------------------------------------------------------------
118 * - Digital Audio Interface (DAI) template
119 * - create/destroy dai hooks
132 .name = "mpc5200-psc-i2s.0",
151 .name = "mpc5200-i2s",
155 /* ---------------------------------------------------------------------
157 * - Probe/remove operations
158 * - OF device match table
170 rc = snd_soc_register_component(&op->dev, &psc_i2s_component, in psc_i2s_of_probe()
177 psc_dma = dev_get_drvdata(&op->dev); in psc_i2s_of_probe()
178 regs = psc_dma->psc_regs; in psc_i2s_of_probe()
180 /* Configure the serial interface mode; defaulting to CODEC8 mode */ in psc_i2s_of_probe()
181 psc_dma->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S | in psc_i2s_of_probe()
183 out_be32(&psc_dma->psc_regs->sicr, in psc_i2s_of_probe()
184 psc_dma->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8); in psc_i2s_of_probe()
188 if (!of_get_property(op->dev.of_node, "codec-handle", NULL)) in psc_i2s_of_probe()
196 while ((in_8(®s->ipcr_acr.ipcr) & 0x80) != 0) in psc_i2s_of_probe()
199 while ((in_8(®s->ipcr_acr.ipcr) & 0x80) == 0) in psc_i2s_of_probe()
206 out_8(&psc_dma->psc_regs->command, in psc_i2s_of_probe()
216 snd_soc_unregister_component(&op->dev); in psc_i2s_of_remove()
222 { .compatible = "fsl,mpc5200-psc-i2s", },
223 { .compatible = "fsl,mpc5200b-psc-i2s", },
232 .name = "mpc5200-psc-i2s",