Re: [PATCH v4 07/10] ASoC: qcom: Add QAIF PCM operations
From: Mark Brown
Date: Thu Sep 03 2026 - 15:42:37 EST
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?
Attachment:
signature.asc
Description: PGP signature