Lines Matching +full:serial +full:- +full:dir

1 // SPDX-License-Identifier: GPL-2.0-only
44 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i" in psc_i2s_hw_params()
64 dev_dbg(psc_dma->dev, "invalid format\n"); in psc_i2s_hw_params()
65 return -EINVAL; in psc_i2s_hw_params()
67 out_be32(&psc_dma->psc_regs->sicr, psc_dma->sicr | mode); in psc_i2s_hw_params()
84 * @dir: SND_SOC_CLOCK_IN (clock slave) or SND_SOC_CLOCK_OUT (clock master)
87 int clk_id, unsigned int freq, int dir) in psc_i2s_set_sysclk() argument
90 dev_dbg(psc_dma->dev, "psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\n", in psc_i2s_set_sysclk()
91 cpu_dai, dir); in psc_i2s_set_sysclk()
92 return (dir == SND_SOC_CLOCK_IN) ? 0 : -EINVAL; in psc_i2s_set_sysclk()
96 * psc_i2s_set_fmt: set the serial format.
98 * This function is called by the machine driver to tell us what serial
109 dev_dbg(psc_dma->dev, "psc_i2s_set_fmt(cpu_dai=%p, format=%i)\n", in psc_i2s_set_fmt()
111 return (format == SND_SOC_DAIFMT_I2S) ? 0 : -EINVAL; in psc_i2s_set_fmt()
114 /* ---------------------------------------------------------------------
117 * - Digital Audio Interface (DAI) template
118 * - create/destroy dai hooks
131 .name = "mpc5200-psc-i2s.0",
150 .name = "mpc5200-i2s",
154 /* ---------------------------------------------------------------------
156 * - Probe/remove operations
157 * - OF device match table
169 rc = snd_soc_register_component(&op->dev, &psc_i2s_component, in psc_i2s_of_probe()
176 psc_dma = dev_get_drvdata(&op->dev); in psc_i2s_of_probe()
177 regs = psc_dma->psc_regs; in psc_i2s_of_probe()
179 /* Configure the serial interface mode; defaulting to CODEC8 mode */ in psc_i2s_of_probe()
180 psc_dma->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S | in psc_i2s_of_probe()
182 out_be32(&psc_dma->psc_regs->sicr, in psc_i2s_of_probe()
183 psc_dma->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8); in psc_i2s_of_probe()
187 if (!of_property_present(op->dev.of_node, "codec-handle")) in psc_i2s_of_probe()
195 while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) != 0) in psc_i2s_of_probe()
198 while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) == 0) in psc_i2s_of_probe()
205 out_8(&psc_dma->psc_regs->command, in psc_i2s_of_probe()
215 snd_soc_unregister_component(&op->dev); in psc_i2s_of_remove()
220 { .compatible = "fsl,mpc5200-psc-i2s", },
221 { .compatible = "fsl,mpc5200b-psc-i2s", },
230 .name = "mpc5200-psc-i2s",