[alsa-devel] [PATCH v3 3/9] ASoC: sti: Add CPU DAI driver for playback

Mark Brown broonie at kernel.org
Fri Jul 10 19:00:46 CEST 2015


On Mon, Jun 22, 2015 at 04:31:07PM +0200, Arnaud Pouliquen wrote:

> +	if (clk_id != 0)
> +		return -EINVAL;
> +
> +	player->mclk = freq;
> +
> +	return clk_set_rate(player->clk, freq);

You should really only set the mclk after clk_set_rate() succeeds but
practically it probably doesn't matter.

> +	case SND_SOC_DAIFMT_IB_NF:
> +		SET_UNIPERIF_I2S_FMT_LR_POL_LOW(player);
> +		SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(player);
> +		break;
> +	case SND_SOC_DAIFMT_IB_IF:
> +		SET_UNIPERIF_I2S_FMT_LR_POL_HIG(player);
> +		SET_UNIPERIF_I2S_FMT_SCLK_EDGE_FALLING(player);
> +	}

Missing break in that last case.

> +	player->clk = of_clk_get(pdev->dev.of_node, 0);
> +	if (IS_ERR(player->clk))
> +		ret = (int)PTR_ERR(player->clk);

You shouldn't need the cast here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150710/db9100a3/attachment.sig>


More information about the Alsa-devel mailing list