From ff9dd23d00f3f6fae4b98f7e27f889d691a8f6f8 Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Mon, 23 Jul 2018 13:37:55 +0800 Subject: [PATCH] ASoC: SOF: Refine some IPC data structures to make its size 4bytes aligned Host communicates with dsp by sending or receiving data in memory windows which are in PCI MMIO space. Some platforms like ICL require the transaction size is 4bytes aligned. So it is better to make the data size 4bytes aligned to make it work on all platforms. Signed-off-by: Rander Wang --- include/uapi/sound/sof-ipc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/sound/sof-ipc.h b/include/uapi/sound/sof-ipc.h index f78b5cb56508de..14dafa7515617d 100644 --- a/include/uapi/sound/sof-ipc.h +++ b/include/uapi/sound/sof-ipc.h @@ -252,6 +252,7 @@ struct sof_ipc_dai_dmic_pdm_ctrl { uint16_t polarity_mic_b; /* Optionally invert mic B signal (0 or 1) */ uint16_t clk_edge; /* Optionally swap data clock edge (0 or 1) */ uint16_t skew; /* Adjust PDM data sampling vs. clock (0..15) */ + uint16_t pad; /* Make sure the total size is 4 bytes aligned */ } __attribute__((packed)); /* DMIC Configuration Request - SOF_IPC_DAI_DMIC_CONFIG */ @@ -765,6 +766,7 @@ struct sof_ipc_fw_version { uint8_t date[12]; uint8_t time[10]; uint8_t tag[6]; + uint8_t pad[2]; /* Make sure the total size is 4 bytes aligned */ } __attribute__((packed)); /* FW ready Message - sent by firmware when boot has completed */