From 2d0b8e026d9af56b1abc40bd323a7a975ee756bc Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Tue, 17 Mar 2020 15:23:08 -0700 Subject: [PATCH] ANDROID: GKI: sound: soc: Resolve ABI diff for struct snd_compr_stream Also resolves ABI diff for struct snd_soc_dai_link. Also adds a new member to struct snd_soc_pcm_runtime to reduce ABI diff. Test: build Bug: 151372815 Signed-off-by: Walter Yang Signed-off-by: Fred Oh Signed-off-by: Banajit Goswami Signed-off-by: Meng Wang Change-Id: I2b523cff2dba1ac45209cf5acb5331e2ed5267e9 (cherry picked from commit 11323a0833b7900dddd2471b9cc39ab3aa350e03) [hridya: amended to only include ABI diff] Signed-off-by: Hridya Valsaraju --- include/sound/compress_driver.h | 1 + include/sound/soc.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) 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;