Re: [PATCH] ASoC: meson: aiu-fifo: prevent sleeping when spinlock is held
From: Martin Blumenstingl
Date: Thu Nov 12 2026 - 21:29:47 EST
On Wed, Nov 11, 2026 at 11:09 AM Valerio Setti <vsetti@xxxxxxxxxxxx> wrote:
[...]
> @@ -37,8 +38,11 @@ snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
> struct aiu_fifo *fifo = snd_soc_dai_dma_data_get_playback(dai);
> struct snd_pcm_runtime *runtime = substream->runtime;
> unsigned int addr;
> + int ret;
>
> - addr = snd_soc_component_read(component, fifo->mem_offset + AIU_MEM_RD);
> + ret = regmap_read(component->regmap, fifo->mem_offset + AIU_MEM_RD, &addr);
> + if (ret < 0)
> + return snd_soc_ret(component->dev, ret, "Failed to read FIFO pointer");
As far as I understand:
- snd_pcm_uframes_t is "unsigned long"
- snd_soc_ret() returns a (signed) int
Doesn't that lead to a signed to unsigned conversion error (highest
bit set -> large value)?
axg-fifo simply discards regmap_read's return value.
That seems odd at first, but knowing that its regmap is MMIO backed
(same as for AIU) means there can't ever be any error.
Best regards,
Martin