Skip to content

Commit 6a735f1

Browse files
plbossartmwasko
authored andcommitted
ipc: dai: add flags for DAI_CONFIG IPC
The DAI_CONFIG IPC is currently used both for hw_params and hw_free. For some DAIs, there are hacky ways with e.g. invalid DMA channels to indicate a hw_free. Rather than adding a new IPC for hw_params and hw_free, let's add a flag that indicates if the DAI_CONFIG is really applied during a hw_params or hw_free stage. This is tagged as a ABI 3.19 change. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com>
1 parent 4f5f780 commit 6a735f1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/include/ipc/dai.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@
5252
#define SOF_DAI_FMT_INV_MASK 0x0f00
5353
#define SOF_DAI_FMT_CLOCK_PROVIDER_MASK 0xf000
5454

55+
/* DAI_CONFIG flags */
56+
#define SOF_DAI_CONFIG_FLAGS_MASK 0x3
57+
#define SOF_DAI_CONFIG_FLAGS_NONE (0 << 0) /**< DAI_CONFIG sent without stage information */
58+
#define SOF_DAI_CONFIG_FLAGS_HW_PARAMS (1 << 0) /**< DAI_CONFIG sent during hw_params stage */
59+
#define SOF_DAI_CONFIG_FLAGS_HW_FREE (2 << 0) /**< DAI_CONFIG sent during hw_free stage */
60+
#define SOF_DAI_CONFIG_FLAGS_RFU (3 << 0) /**< not used, reserved for future use */
61+
5562
/** \brief Types of DAI */
5663
enum sof_ipc_dai_type {
5764
SOF_DAI_INTEL_NONE = 0, /**< None */
@@ -72,7 +79,7 @@ struct sof_ipc_dai_config {
7279
/* physical protocol and clocking */
7380
uint16_t format; /**< SOF_DAI_FMT_ */
7481
uint8_t group_id; /**< group ID, 0 means no group (ABI 3.17) */
75-
uint8_t reserved8; /**< alignment */
82+
uint8_t flags; /**< SOF_DAI_CONFIG_FLAGS_ (ABI 3.19) */
7683

7784
/* reserved for future use */
7885
uint32_t reserved[8];

0 commit comments

Comments
 (0)