History log of /linux-master/sound/soc/amd/acp/acp-platform.c
Revision Date Author Comments
# 39d9ee47 21-Oct-2023 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: acp: add machine driver support for pdm use case

add pdm use case machine driver support

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20231021145110.478744-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# a8d1316a 26-Jun-2023 Syed Saba Kareem <Syed.SabaKareem@amd.com>

ASoC: amd: acp: export config_acp_dma() and config_pte_for_stream() symbols

Export config_acp_dma() and config_pte_for_stream() functions.
These functions will be used to restore stream configuration during
system level resume.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20230626135515.1252063-8-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 2f3092e7 16-May-2023 Claudiu Beznea <claudiu.beznea@microchip.com>

ASoC: do not include pm_runtime.h if not used

Do not include pm_runtime.h header in files where APIs exported by
pm_runtime.h are not used.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> # for omap-mcbsp-st.c
Link: https://lore.kernel.org/r/20230517094903.2895238-2-claudiu.beznea@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3420fdb8 17-Nov-2022 Gaosheng Cui <cuigaosheng1@huawei.com>

ASoC: amd: acp: Fix possible UAF in acp_dma_open

Smatch report warning as follows:

sound/soc/amd/acp/acp-platform.c:199 acp_dma_open() warn:
'&stream->list' not removed from list

If snd_pcm_hw_constraint_integer() fails in acp_dma_open(),
stream will be freed, but stream->list will not be removed from
adata->stream_list, then list traversal may cause UAF.

Fix by adding the newly allocated stream to the list once it's fully
initialised.

Fixes: 7929985cfe36 ("ASoC: amd: acp: Initialize list to store acp_stream during pcm_open")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Link: https://lore.kernel.org/r/20221118030056.3135960-1-cuigaosheng1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# a74ec0bf 18-Aug-2022 Dan Carpenter <dan.carpenter@oracle.com>

ASoC: amd: acp: remove unnecessary NULL checks

The list iterator can never be NULL. Delete the bogus NULL checks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/Yv8ePUuBfzaRu6xV@kili
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7929985c 10-Aug-2022 Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>

ASoC: amd: acp: Initialize list to store acp_stream during pcm_open

We are currently allocating acp_stream during pcm_open and saving
it in static array corresponds to array index calculated based on
cpu dai->driver id. This approach will fail if we have single dai
linked to multiple pcm device as we will have same dai->driver id
or array index for multiple pcm open. Initialize new linked list
stream_list to store opened pcm stream info dynamically.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220810132913.1181247-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d8167741 25-Jul-2022 Nathan Chancellor <nathan@kernel.org>

ASoC: amd: acp: Fix initialization of ext_intr_stat1 in i2s_irq_handler()

Clang warns:

../sound/soc/amd/acp/acp-platform.c:117:19: error: variable 'ext_intr_stat1' is uninitialized when used here [-Werror,-Wuninitialized]
if (stream && (ext_intr_stat1 & stream->irq_bit)) {
^~~~~~~~~~~~~~
../sound/soc/amd/acp/acp-platform.c:97:35: note: initialize the variable 'ext_intr_stat1' to silence this warning
u32 ext_intr_stat, ext_intr_stat1, i;
^
= 0
1 error generated.

The variable was not properly renamed, correct it to resolve the
warning.

Fixes: 93f53881473c ("ASoC: amd: acp: Modify local variables name to generic")
Link: https://github.com/ClangBuiltLinux/linux/issues/1675
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20220725180539.1315066-1-nathan@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# afde6727 21-Jul-2022 Venkata Prasad Potturu <venkataprasad.potturu@amd.com>

ASoC: amd: acp: Drop superfluous mmap callback

Remove mmap callback as ASoC AMD drivers just call
the standard mmap handler.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220721062043.3016985-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 93f53881 21-Jul-2022 Venkata Prasad Potturu <venkataprasad.potturu@amd.com>

ASoC: amd: acp: Modify local variables name to generic

Change local variables name to be generic in irq handler.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220721062043.3016985-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# e8a33a94 07-Jul-2022 V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>

ASoC: amd: acp: Add legacy audio driver support for Rembrandt platform

Add i2s and dmic support for Rembrandt platform,
Add machine support for nau8825, max98360 and rt5682s,rt1019 codec
in legacy driver for rembrandt platform.
Here codec is in a slave mode.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20220707161142.491034-4-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# b24484c1 07-Jul-2022 V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>

ASoC: amd: acp: ACP code generic to support newer platforms

ADD Generic code to support to newer platforms, add
control threshold, irq control macros ,added structure for register
offset differences.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20220707161142.491034-3-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0bc1e7d1 23-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: amd: Migrate to new style legacy DAI naming flag

Change the legacy DAI naming flag from opting in to the new scheme
(non_legacy_dai_naming), to opting out of it (legacy_dai_naming).
These drivers appear to be on the CPU side of the DAI link and
currently uses the legacy naming, so add the new flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-19-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# fdde18b9 27-Oct-2021 Yang Yingliang <yangyingliang@huawei.com>

ASoC: amd: acp: Fix return value check in acp_machine_select()

In case of error, platform_device_register_data() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e646b51f5dd5 ("ASoC: amd: acp: Add callback for machine driver on ACP")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20211027065228.833825-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# e646b51f 18-Oct-2021 Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>

ASoC: amd: acp: Add callback for machine driver on ACP

Add method to select and register machine driver for acp platform
based on ACPI ID.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20211019070938.5076-4-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 623621a9 18-Oct-2021 Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>

ASoC: amd: Add common framework to support I2S on ACP SOC

We are using legacy way of exposing dais and DMA configuration that
requires separate driver modules for various ACP SOC with almost
similar hw configuration. Moreover the legacy approach requires
separate I2S and DMA module platform devices registration and need
machine specific quirk to control various I2S endpoints. Add generic
dai driver and platform driver for I2S controller on ACP hw block.
This common framework can be used by various ACP platform devices
that shares common specs.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20211019070938.5076-2-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>