lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65b3ec7e-e753-4692-b778-a9246e9e6664@baylibre.com>
Date: Wed, 10 Apr 2024 17:07:34 +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 10/18] ASoC: mediatek: mt8186-rt1019: Migrate to the
 common mtk_soundcard_startup

What is the purpose of these change ? I don't see the link with the 
migration to the common mtk_soundcard_startup.

On 09/04/2024 13:33, AngeloGioacchino Del Regno wrote:
> diff --git a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
> index bfcfc68ac64d..dbe5afa0e9ee 100644
> --- a/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
> +++ b/sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
> @@ -2729,7 +2729,7 @@ static int mt8186_afe_runtime_resume(struct device *dev)
>   	struct mtk_base_afe *afe = dev_get_drvdata(dev);
>   	struct mt8186_afe_private *afe_priv = afe->platform_priv;
>   	int ret;
> -
> +pr_err("mt8186 afe runtime_resume\n");

Forgot to remove this print ?

>   	ret = mt8186_afe_enable_clock(afe);
>   	if (ret)
>   		return ret;
> @@ -2739,7 +2739,7 @@ static int mt8186_afe_runtime_resume(struct device *dev)
>   		return ret;
>   
>   	if (!afe->regmap || afe_priv->pm_runtime_bypass_reg_ctl)
> -		goto skip_regmap;
> +		return 0;
>   
>   	regcache_cache_only(afe->regmap, false);
>   	regcache_sync(afe->regmap);
> @@ -2758,13 +2758,20 @@ static int mt8186_afe_runtime_resume(struct device *dev)
>   	/* enable AFE */
>   	regmap_update_bits(afe->regmap, AFE_DAC_CON0, AUDIO_AFE_ON_MASK_SFT, BIT(0));
>   
> -skip_regmap:
>   	return 0;
>   }
>   
>   static int mt8186_afe_component_probe(struct snd_soc_component *component)
>   {
> -	mtk_afe_add_sub_dai_control(component);
> +	struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
> +	int ret;
> +
> +	snd_soc_component_init_regmap(component, afe->regmap);
> +
> +	ret = mtk_afe_add_sub_dai_control(component);
> +	if (ret)
> +		return ret;
> +
>   	mt8186_add_misc_control(component);
>   
>   	return 0;
> @@ -2929,6 +2936,10 @@ static int mt8186_afe_pcm_dev_probe(struct platform_device *pdev)
>   		goto err_pm_disable;
>   	}
>   
> +	ret = regmap_reinit_cache(afe->regmap, &mt8186_afe_regmap_config);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
> +
>   	/* others */
>   	afe->mtk_afe_hardware = &mt8186_afe_hardware;
>   	afe->memif_fs = mt8186_memif_fs;
> diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c
> index dbd157d1a1ea..b87b04928678 100644
> --- a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c
> +++ b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c
> @@ -413,7 +413,7 @@ static const struct snd_soc_dapm_widget mtk_dai_adda_widgets[] = {
>   			      SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
>   
>   	SND_SOC_DAPM_SUPPLY_S("AUD_PAD_TOP", SUPPLY_SEQ_ADDA_AUD_PAD_TOP,
> -			      AFE_AUD_PAD_TOP, RG_RX_FIFO_ON_SFT, 0,
> +			      SND_SOC_NOPM, 0, 0,

Is it related to the regmap init function added in the AFE PCM probe ?

>   			      mtk_adda_pad_top_event,
>   			      SND_SOC_DAPM_PRE_PMU),
>   	SND_SOC_DAPM_SUPPLY_S("ADDA_MTKAIF_CFG", SUPPLY_SEQ_ADDA_MTKAIF_CFG,

-- 
Regards,
Alexandre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ