[alsa-devel] [PATCH v3 08/11] ASoC: SOF: Generic probe compress operations
Daniel Baluta
daniel.baluta at nxp.com
Wed Jan 29 08:48:33 CET 2020
One comment below:
> +int sof_probe_compr_set_params(struct snd_compr_stream *cstream,
> + struct snd_compr_params *params, struct snd_soc_dai
> *dai)
> +{
> + struct snd_compr_runtime *rtd = cstream->runtime;
> + struct snd_sof_dev *sdev =
> + snd_soc_component_get_drvdata(dai-
> >component);
> + int ret;
> +
> + cstream->dma_buffer.dev.type = SNDRV_DMA_TYPE_DEV_SG;
> + cstream->dma_buffer.dev.dev = sdev->dev;
> + ret = snd_compr_malloc_pages(cstream, rtd->buffer_size);
> + if (ret < 0)
> + return ret;
> +
> + ret = snd_sof_probe_compr_set_params(sdev, cstream, params,
> dai);
> + if (ret < 0)
> + return ret;
> +
> + ret = sof_ipc_probe_init(sdev, sdev->extractor_stream_tag,
> + rtd->dma_bytes);
> + if (ret < 0) {
> + dev_err(dai->dev, "Failed to init probe: %d\n", ret);
> + return ret;
> + }
>
Should we call snd_compr_free_pages on error case?
More information about the Alsa-devel
mailing list