28 Oct
2013
28 Oct
'13
9:31 p.m.
On Mon, Oct 28, 2013 at 06:56:16AM +0800, Barry Song wrote:
+static int sirf_usp_pcm_divider(struct snd_soc_dai *dai, int div_id, int rate) +{
- struct sirf_usp *susp = snd_soc_dai_get_drvdata(dai);
- u32 clk_rate, clk_div, clk_div_hi, clk_div_lo;
- if (div_id != SIRF_USP_DIV_MCLK)
return -EINVAL;
This is fine as far as it goes but why is this something that can't be calculated automatically at runtime based on the sample rate the driver is given?
- /* Congiure TX FIFO Level Check register */
Typo.
+static int sirf_usp_pcm_runtime_resume(struct device *dev) +{
- struct sirf_usp *susp = dev_get_drvdata(dev);
- clk_prepare_enable(susp->clk);
Should check the return value here.
- clk_prepare_enable(susp->clk);
Should check the return value.
- ret = snd_soc_register_component(&pdev->dev, &sirf_usp_component,
&sirf_usp_pcm_dai, 1);
devm_snd_soc_register_component() please.
- if (ret) {
dev_err(&pdev->dev, "Register Audio SoC dai failed.\n");
goto err;
- }
- pm_runtime_enable(&pdev->dev);
This needs to happen prior to registration.