summaryrefslogtreecommitdiffstats
path: root/sound/soc/stm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
commitdc50eab76b709d68175a358d6e23a5a3890764d3 (patch)
treec754d0390db060af0213ff994f0ac310e4cfd6e9 /sound/soc/stm
parentAdding debian version 6.6.15-2. (diff)
downloadlinux-dc50eab76b709d68175a358d6e23a5a3890764d3.tar.xz
linux-dc50eab76b709d68175a358d6e23a5a3890764d3.zip
Merging upstream version 6.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sound/soc/stm')
-rw-r--r--sound/soc/stm/stm32_adfsdm.c24
-rw-r--r--sound/soc/stm/stm32_i2s.c7
-rw-r--r--sound/soc/stm/stm32_sai.c8
-rw-r--r--sound/soc/stm/stm32_sai_sub.c10
-rw-r--r--sound/soc/stm/stm32_spdifrx.c8
5 files changed, 23 insertions, 34 deletions
diff --git a/sound/soc/stm/stm32_adfsdm.c b/sound/soc/stm/stm32_adfsdm.c
index a8fff73786..fb5dd9a68b 100644
--- a/sound/soc/stm/stm32_adfsdm.c
+++ b/sound/soc/stm/stm32_adfsdm.c
@@ -167,7 +167,7 @@ static void stm32_memcpy_32to16(void *dest, const void *src, size_t n)
static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
{
struct stm32_adfsdm_priv *priv = private;
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(priv->substream);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(priv->substream);
u8 *pcm_buff = priv->pcm_buff;
u8 *src_buff = (u8 *)data;
unsigned int old_pos = priv->pos;
@@ -212,9 +212,9 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
static int stm32_adfsdm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct stm32_adfsdm_priv *priv =
- snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
@@ -233,8 +233,8 @@ static int stm32_adfsdm_trigger(struct snd_soc_component *component,
static int stm32_adfsdm_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
- struct stm32_adfsdm_priv *priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct stm32_adfsdm_priv *priv = snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
int ret;
ret = snd_soc_set_runtime_hwparams(substream, &stm32_adfsdm_pcm_hw);
@@ -247,9 +247,9 @@ static int stm32_adfsdm_pcm_open(struct snd_soc_component *component,
static int stm32_adfsdm_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct stm32_adfsdm_priv *priv =
- snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
priv->substream = NULL;
@@ -260,9 +260,9 @@ static snd_pcm_uframes_t stm32_adfsdm_pcm_pointer(
struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct stm32_adfsdm_priv *priv =
- snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
return bytes_to_frames(substream->runtime, priv->pos);
}
@@ -271,9 +271,9 @@ static int stm32_adfsdm_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct stm32_adfsdm_priv *priv =
- snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
priv->pcm_buff = substream->runtime->dma_area;
@@ -286,7 +286,7 @@ static int stm32_adfsdm_pcm_new(struct snd_soc_component *component,
{
struct snd_pcm *pcm = rtd->pcm;
struct stm32_adfsdm_priv *priv =
- snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
+ snd_soc_dai_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0));
unsigned int size = DFSDM_MAX_PERIODS * DFSDM_MAX_PERIOD_SIZE;
snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 06a42130f5..46098e1111 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -1024,7 +1024,6 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
struct stm32_i2s_data *i2s)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *of_id;
struct reset_control *rst;
struct resource *res;
int irq, ret;
@@ -1032,10 +1031,8 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
if (!np)
return -ENODEV;
- of_id = of_match_device(stm32_i2s_ids, &pdev->dev);
- if (of_id)
- i2s->regmap_conf = (const struct regmap_config *)of_id->data;
- else
+ i2s->regmap_conf = device_get_match_data(&pdev->dev);
+ if (!i2s->regmap_conf)
return -EINVAL;
i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 8e21e6f886..b45ee7e24f 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -151,8 +151,8 @@ error:
static int stm32_sai_probe(struct platform_device *pdev)
{
struct stm32_sai_data *sai;
+ const struct stm32_sai_conf *conf;
struct reset_control *rst;
- const struct of_device_id *of_id;
u32 val;
int ret;
@@ -164,9 +164,9 @@ static int stm32_sai_probe(struct platform_device *pdev)
if (IS_ERR(sai->base))
return PTR_ERR(sai->base);
- of_id = of_match_device(stm32_sai_ids, &pdev->dev);
- if (of_id)
- memcpy(&sai->conf, (const struct stm32_sai_conf *)of_id->data,
+ conf = device_get_match_data(&pdev->dev);
+ if (conf)
+ memcpy(&sai->conf, (const struct stm32_sai_conf *)conf,
sizeof(struct stm32_sai_conf));
else
return -EINVAL;
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 0acc848c1f..ad2492efb1 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1249,8 +1249,8 @@ static int stm32_sai_pcm_process_spdif(struct snd_pcm_substream *substream,
unsigned long bytes)
{
struct snd_pcm_runtime *runtime = substream->runtime;
- struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
- struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
struct stm32_sai_sub_data *sai = dev_get_drvdata(cpu_dai->dev);
int *ptr = (int *)(runtime->dma_area + hwoff +
channel * (runtime->dma_bytes / runtime->channels));
@@ -1506,7 +1506,6 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev,
static int stm32_sai_sub_probe(struct platform_device *pdev)
{
struct stm32_sai_sub_data *sai;
- const struct of_device_id *of_id;
const struct snd_dmaengine_pcm_config *conf = &stm32_sai_pcm_config;
int ret;
@@ -1514,10 +1513,7 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
if (!sai)
return -ENOMEM;
- of_id = of_match_device(stm32_sai_sub_ids, &pdev->dev);
- if (!of_id)
- return -EINVAL;
- sai->id = (uintptr_t)of_id->data;
+ sai->id = (uintptr_t)device_get_match_data(&pdev->dev);
sai->pdev = pdev;
mutex_init(&sai->ctrl_lock);
diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index a359b528b2..9eed3c57e3 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -908,17 +908,13 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev,
struct stm32_spdifrx_data *spdifrx)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *of_id;
struct resource *res;
if (!np)
return -ENODEV;
- of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev);
- if (of_id)
- spdifrx->regmap_conf =
- (const struct regmap_config *)of_id->data;
- else
+ spdifrx->regmap_conf = device_get_match_data(&pdev->dev);
+ if (!spdifrx->regmap_conf)
return -EINVAL;
spdifrx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);