[PATCH 04/14] ASoC: Intel: avs: non-HDA PCM BE operations
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Apr 26 23:40:44 CEST 2022
> +static int avs_dai_nonhda_be_trigger(struct snd_pcm_substream *substream, int cmd,
> + struct snd_soc_dai *dai)
> +{
> + struct avs_dma_data *data;
> + int ret = 0;
> +
> + data = snd_soc_dai_get_dma_data(dai, substream);
> +
> + switch (cmd) {
> + case SNDRV_PCM_TRIGGER_START:
> + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> + ret = avs_path_run(data->path, AVS_TPLG_TRIGGER_AUTO);
> + if (ret < 0)
> + dev_err(dai->dev, "run BE path failed: %d\n", ret);
> + break;
> +
> + case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
> + case SNDRV_PCM_TRIGGER_STOP:
> + ret = avs_path_pause(data->path);
> + if (ret < 0)
> + dev_err(dai->dev, "pause BE path failed: %d\n", ret);
> +
> + if (cmd == SNDRV_PCM_TRIGGER_STOP) {
> + ret = avs_path_reset(data->path);
> + if (ret < 0)
> + dev_err(dai->dev, "reset BE path failed: %d\n", ret);
> + }
> + break;
> +
> + default:
> + ret = -EINVAL;
> + break;
TRIGGER_SUSPEND will result in -EINVAL?
Have you tried suspend-resume while playing audio?
> + }
> +
> + return ret;
> +}
More information about the Alsa-devel
mailing list