[PATCH] ASoC: meson: aiu-fifo: prevent sleeping when spinlock is held
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Thu Nov 12 15:05:29 PST 2026
On Wed, Nov 11, 2026 at 11:09 AM Valerio Setti <vsetti at baylibre.com> 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
More information about the linux-arm-kernel
mailing list