Re: [PATCH v4 1/2] ASoC: amd: acp: Add support for nau8825 and max98360 card

From: Pierre-Louis Bossart
Date: Wed May 25 2022 - 17:30:55 EST





> +struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[] = {
> + {
> + .id = "AMDI1019",
> + .drv_name = "rmb-dsp",
> + .pdata = &acp_quirk_data,
> + .fw_filename = "sof-rmb.ri",
> + .sof_tplg_filename = "sof-acp-rmb.tplg",
> + },
> + {
> + .id = "10508825",
> + .drv_name = "nau8825-max",
> + .pdata = &acp_quirk_data,
> + .machine_quirk = snd_soc_acpi_codec_list,
> + .quirk_data = &amp_max,
> + .fw_filename = "sof-rmb.ri",
> + .sof_tplg_filename = "sof-acp-rmb.tplg",

this looks rather odd, you have two entries in the table that point to
the exact same pair of firmware and topology files. This is either
intentional and missing a comment, or a copy-paste mistake, or some of
these fields are not required.

> - clk_disable_unprepare(drvdata->wclk);
> + if (!drvdata->soc_mclk)
> + clk_disable_unprepare(drvdata->wclk);
> }

mclk and wclk are different concepts usually.


> struct acp_card_drvdata {
> @@ -49,6 +51,7 @@ struct acp_card_drvdata {
> unsigned int dai_fmt;
> struct clk *wclk;
> struct clk *bclk;
> + bool soc_mclk;

I wonder if soc_mclk means 'soc_clock_provider' ?

it looks like a configuration instead of a real/physical clock?