Lines Matching full:mclk
54 saif->mclk = freq; in mxs_saif_set_dai_sysclk()
74 * Set SAIF clock and MCLK
77 unsigned int mclk, in mxs_saif_set_clk() argument
84 dev_dbg(saif->dev, "mclk %d rate %d\n", mclk, rate); in mxs_saif_set_clk()
109 * If MCLK is used, the SAIF clk ratio needs to match mclk ratio. in mxs_saif_set_clk()
113 * If MCLK is not used, we just set saif clk to 512*fs. in mxs_saif_set_clk()
120 switch (mclk / rate) { in mxs_saif_set_clk()
137 /* SAIF MCLK should be a sub-rate of 512x or 384x */ in mxs_saif_set_clk()
159 * Program the over-sample rate for MCLK output in mxs_saif_set_clk()
161 * The available MCLK range is 32x, 48x... 512x. The rate in mxs_saif_set_clk()
164 switch (mclk / rate) { in mxs_saif_set_clk()
202 * Put and disable MCLK.
220 /* disable MCLK output */ in mxs_saif_put_mclk()
232 * Get MCLK and set clock rate, then enable it
234 * This interface is used for codecs who are using MCLK provided
237 int mxs_saif_get_mclk(unsigned int saif_id, unsigned int mclk, in mxs_saif_get_mclk() argument
258 dev_err(saif->dev, "can not get mclk from a non-master saif\n"); in mxs_saif_get_mclk()
269 ret = mxs_saif_set_clk(saif, mclk, rate); in mxs_saif_get_mclk()
277 /* enable MCLK output */ in mxs_saif_get_mclk()
426 /* mclk should already be set */ in mxs_saif_hw_params()
427 if (!saif->mclk && saif->mclk_in_use) { in mxs_saif_hw_params()
428 dev_err(cpu_dai->dev, "set mclk first\n"); in mxs_saif_hw_params()
440 * If mclk is used, we also set mclk, if not, saif->mclk is in mxs_saif_hw_params()
443 ret = mxs_saif_set_clk(saif, saif->mclk, params_rate(params)); in mxs_saif_hw_params()
714 dev_err(&pdev->dev, "failed to register mclk: %d\n", ret); in mxs_saif_mclk_init()