[PATCH 04/14] ASoC: Intel: avs: non-HDA PCM BE operations
Cezary Rojewski
cezary.rojewski at intel.com
Sun May 1 12:48:07 CEST 2022
On 2022-04-26 11:40 PM, Pierre-Louis Bossart wrote:
>
>> +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?
The suspend/resume support for the PCM streaming is split and part of a
separate patch. Because of this, all related triggers have been skipped
in current series.
>> + }
>> +
>> + return ret;
>> +}
More information about the Alsa-devel
mailing list