[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <757b554b-add9-4d0e-89cf-0a5569187f18@baylibre.com>
Date: Wed, 10 Apr 2024 17:38:48 +0200
From: Alexandre Mergnat <amergnat@...libre.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
broonie@...nel.org
Cc: wenst@...omium.org, lgirdwood@...il.com, robh@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
matthias.bgg@...il.com, perex@...ex.cz, tiwai@...e.com,
trevor.wu@...iatek.com, maso.huang@...iatek.com,
xiazhengqiao@...qin.corp-partner.google.com, arnd@...db.de,
kuninori.morimoto.gx@...esas.com, shraash@...gle.com,
nicolas.ferre@...rochip.com, u.kleine-koenig@...gutronix.de,
dianders@...omium.org, frank.li@...o.com, allen-kh.cheng@...iatek.com,
eugen.hristev@...labora.com, claudiu.beznea@...on.dev,
jarkko.nikula@...mer.com, jiaxin.yu@...iatek.com, alpernebiyasak@...il.com,
ckeepax@...nsource.cirrus.com, zhourui@...qin.corp-partner.google.com,
nfraprado@...labora.com, alsa-devel@...a-project.org,
shane.chien@...iatek.com, linux-sound@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
kernel@...labora.com
Subject: Re: [PATCH v4 13/18] ASoC: mediatek: mt8186: Unify mt8186-mt6366
machine drivers
On 09/04/2024 13:33, AngeloGioacchino Del Regno wrote:
> @@ -318,16 +409,24 @@ static int mt8186_it6505_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
> static int mt8186_sof_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
> struct snd_pcm_hw_params *params)
> {
> + struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
> int ret;
>
> ret = mtk_sof_dai_link_fixup(rtd, params);
>
> if (!strcmp(rtd->dai_link->name, "I2S0") ||
> !strcmp(rtd->dai_link->name, "I2S1") ||
> - !strcmp(rtd->dai_link->name, "I2S2"))
> - mt8186_i2s_hw_params_fixup(rtd, params);
> - else if (!strcmp(rtd->dai_link->name, "I2S3"))
> - mt8186_it6505_i2s_hw_params_fixup(rtd, params);
> + !strcmp(rtd->dai_link->name, "I2S2")) {
> + if (soc_card_data->card_data->flags & DA7219_CODEC_PRESENT)
Is the flag missing like you did for mt8195-mt6359.c ?
if (!(codec_init & MT6359_CODEC_INIT)) {
dai_link->init = mt8195_mt6359_init;
codec_init |= MT6359_CODEC_INIT;
> + mt8186_i2s_hw_params_32le_fixup(rtd, params);
> + else
> + mt8186_i2s_hw_params_24le_fixup(rtd, params);
> + } else if (!strcmp(rtd->dai_link->name, "I2S3")) {
> + if (soc_card_data->card_data->flags & DA7219_CODEC_PRESENT)
> + mt8186_i2s_hw_params_24le_fixup(rtd, params);
> + else
> + mt8186_i2s_hw_params_32le_fixup(rtd, params);
> + }
>
> return ret;
> }
--
Regards,
Alexandre
Powered by blists - more mailing lists