Re: [PATCH v4 07/10] ASoC: qcom: Add QAIF PCM operations
From: Harendra Gautam
Date: Mon Sep 07 2026 - 00:36:54 EST
On Fri, Sep 4, 2026 at 1:04 AM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Thu, Sep 03, 2026 at 12:58:58PM +0530, Harendra Gautam wrote:
>
> > Add the PCM platform callbacks needed to use QAIF DAIs for playback
> > and capture.
>
> > +static int qaif_platform_pcmops_open(struct snd_soc_component *component,
> > + struct snd_pcm_substream *substream)
> > +{
>
> > + dma_mem_info->alloc_size = qaif_platform_hardware.buffer_bytes_max;
> > + dma_mem_info->vaddr = dma_alloc_coherent(component->dev,
> > + dma_mem_info->alloc_size,
> > + &dma_mem_info->dma_addr,
> > + GFP_KERNEL);
> > + if (!dma_mem_info->vaddr) {
> > + ret = -ENOMEM;
> > + goto err_free_mem_info;
> > + }
> > +
> > + mutex_lock(&drvdata->stream_lock);
> > + stream_dma_idx = v->alloc_stream_dma_idx(drvdata, dir, dai_id);
> > + mutex_unlock(&drvdata->stream_lock);
> > + if (stream_dma_idx < 0) {
> > + ret = stream_dma_idx;
> > + goto err_free_mem_info;
> > + }
>
> Shouldn't this be err_free_dma from here on?
Thanks for pointing this out. Yes, you are right. This I overlooked. I
will correct it in next version.
-Harendra