diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h index 127c2713b543..f29c60bc1401 100644 --- a/include/sound/compress_driver.h +++ b/include/sound/compress_driver.h @@ -69,6 +69,7 @@ struct snd_compr_stream { bool metadata_set; bool next_track; void *private_data; + struct snd_soc_pcm_runtime *be; }; /** diff --git a/include/sound/soc.h b/include/sound/soc.h index 981ce5bee896..dc3dcad05929 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -889,6 +889,14 @@ struct snd_soc_dai_link_component { const char *dai_name; }; +enum snd_soc_async_ops { + ASYNC_DPCM_SND_SOC_OPEN = 1 << 0, + ASYNC_DPCM_SND_SOC_CLOSE = 1 << 1, + ASYNC_DPCM_SND_SOC_PREPARE = 1 << 2, + ASYNC_DPCM_SND_SOC_HW_PARAMS = 1 << 3, + ASYNC_DPCM_SND_SOC_FREE = 1 << 4, +}; + struct snd_soc_dai_link { /* config - must be set by machine driver */ const char *name; /* Codec name */ @@ -987,6 +995,9 @@ struct snd_soc_dai_link { struct list_head list; /* DAI link list of the soc card */ struct snd_soc_dobj dobj; /* For topology */ + + /* this value determines what all ops can be started asynchronously */ + enum snd_soc_async_ops async_ops; }; struct snd_soc_codec_conf { @@ -1142,6 +1153,8 @@ struct snd_soc_pcm_runtime { long pmdown_time; + /* err in case of ops failed */ + int err_ops; /* runtime devices */ struct snd_pcm *pcm; struct snd_compr *compr;