summaryrefslogtreecommitdiff
path: root/sound/soc/amd/ps/ps-pdm-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/amd/ps/ps-pdm-dma.c')
-rw-r--r--sound/soc/amd/ps/ps-pdm-dma.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c
index 318fc260f293..04c014349347 100644
--- a/sound/soc/amd/ps/ps-pdm-dma.c
+++ b/sound/soc/amd/ps/ps-pdm-dma.c
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * AMD ALSA SoC Pink Sardine PDM Driver
+ * AMD ALSA SoC common PDM Driver for ACP6.3, ACP7.0 & ACP7.1 platforms.
*
- * Copyright 2022 Advanced Micro Devices, Inc.
+ * Copyright 2022, 2025 Advanced Micro Devices, Inc.
*/
#include <linux/platform_device.h>
@@ -189,7 +189,7 @@ static int acp63_pdm_dma_open(struct snd_soc_component *component,
runtime = substream->runtime;
adata = dev_get_drvdata(component->dev);
- pdm_data = kzalloc(sizeof(*pdm_data), GFP_KERNEL);
+ pdm_data = kzalloc_obj(*pdm_data);
if (!pdm_data)
return -EINVAL;
@@ -351,7 +351,8 @@ static const struct snd_soc_component_driver acp63_pdm_component = {
.close = acp63_pdm_dma_close,
.hw_params = acp63_pdm_dma_hw_params,
.pointer = acp63_pdm_dma_pointer,
- .pcm_construct = acp63_pdm_dma_new,
+ .pcm_new = acp63_pdm_dma_new,
+ .use_dai_pcm_id = true,
};
static int acp63_pdm_audio_probe(struct platform_device *pdev)
@@ -402,7 +403,7 @@ static void acp63_pdm_audio_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
}
-static int __maybe_unused acp63_pdm_resume(struct device *dev)
+static int acp63_pdm_resume(struct device *dev)
{
struct pdm_dev_data *adata;
struct snd_pcm_runtime *runtime;
@@ -423,7 +424,7 @@ static int __maybe_unused acp63_pdm_resume(struct device *dev)
return 0;
}
-static int __maybe_unused acp63_pdm_suspend(struct device *dev)
+static int acp63_pdm_suspend(struct device *dev)
{
struct pdm_dev_data *adata;
@@ -432,7 +433,7 @@ static int __maybe_unused acp63_pdm_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused acp63_pdm_runtime_resume(struct device *dev)
+static int acp63_pdm_runtime_resume(struct device *dev)
{
struct pdm_dev_data *adata;
@@ -442,8 +443,8 @@ static int __maybe_unused acp63_pdm_runtime_resume(struct device *dev)
}
static const struct dev_pm_ops acp63_pdm_pm_ops = {
- SET_RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume)
+ RUNTIME_PM_OPS(acp63_pdm_suspend, acp63_pdm_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(acp63_pdm_suspend, acp63_pdm_resume)
};
static struct platform_driver acp63_pdm_dma_driver = {
@@ -451,13 +452,13 @@ static struct platform_driver acp63_pdm_dma_driver = {
.remove = acp63_pdm_audio_remove,
.driver = {
.name = "acp_ps_pdm_dma",
- .pm = &acp63_pdm_pm_ops,
+ .pm = pm_ptr(&acp63_pdm_pm_ops),
},
};
module_platform_driver(acp63_pdm_dma_driver);
MODULE_AUTHOR("Syed.SabaKareem@amd.com");
-MODULE_DESCRIPTION("AMD PINK SARDINE PDM Driver");
+MODULE_DESCRIPTION("AMD common PDM Driver for ACP6.3, ACP7,0 & ACP7.1 platforms");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:" DRV_NAME);