Re: [alsa-devel] [PATCH v4 1/3] ASoC: samsung: Add machine driver for Trats2

From: Mark Brown
Date: Tue Jan 27 2015 - 13:48:54 EST


On Tue, Jan 27, 2015 at 06:09:39PM +0100, Sylwester Nawrocki wrote:
> On 23/01/15 06:03, Inha Song wrote:

> > + priv->clk_mclk = of_clk_get_by_name(codec_node, "MCLK1");
> > + if (IS_ERR(priv->clk_mclk)) {
> > + dev_err(&pdev->dev, "Failed to get mclk clock\n");
> > + of_node_put(codec_node);
> > + return PTR_ERR(priv->clk_mclk);
> > + }

> Wouldn't it also work if we added clock handling into the wm8994 codec
> driver instead? Not sure if it is correct to retrieve the codec's clock
> in the machine driver like this. Or perhaps the MCLK1 (SoC CLKOUT) clock
> should be added to the sound DT node and handled only by the machine
> driver, together with the other (MCLK2) clock?

That's definitely where we should end up but there are practical issues
with that approach since it involves coordination with all the machine
drivers using the device.

Attachment: signature.asc
Description: Digital signature