Re: [RFC PATCH v1] ASoC: wm8904: enable fll with fixed mclk

From: Andrejs Cainikovs
Date: Fri Mar 15 2024 - 06:33:46 EST


On Tue, Mar 12, 2024 at 01:51:02PM +0000, Charles Keepax wrote:
> Ah, ok I see what I was missing here. simple_card_utils calls
> clk_set_rate if you specify mclk_fs. Which you don't want in this
> case. My gut reaction is that really the problem here is the machine
> driver doesn't support the clocking setup you have.
>
> Having a quick look through the simple card stuff can you remove:
>
> clocks = <&audio_refclk1>;
>
> From the machine driver DT stuff, and add mclk-fs. I think that
> should cause the simple card to call the codec dai_set_sysclk
> but without ever touching the audio_refclk. A small change in
> simple_util_parse_clk might also be needed to allow it to return
> without finding a clock. Which feels like a much simpler and less
> scary change.

Thanks for your help, Charles. Your suggestion works as expected.
Btw, there was no need to touch simple_util_parse_clk as it does
allow to return without finding a clock.

Best regards,
Andrejs.

> My only slight reservation is the automatic clocking thing only
> really exists as a hack to support simple card anyway. But overal
> I think it might be better to try to move the direction of travel
> more to adding support for the clocking systems that exist into
> simple-card rather than tweaking the codec driver to work around
> it.
>
> Thanks,
> Charles