mirror of https://github.com/thesofproject/sof.git
ipc4: alh.h: handle hw variants directly in alh.h
The alh.h headers have used SOF platform layer to handle differences between different Intel ALH generations. In the end the only difference is the encoding used for DAI index. Move the variation to ipc4/alh.h directly as this only affects Intel builds with ALH support. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
d2a231f216
commit
d0d0702f98
|
@ -36,10 +36,19 @@
|
|||
#define IPC4_ALH_DAI_INDEX_OFFSET 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SOC_SERIES_INTEL_ADSP_CAVS) || \
|
||||
defined(CONFIG_SOC_INTEL_ACE15_MTPM)
|
||||
#define IPC4_DAI_NUM_ALH_BI_DIR_LINKS 16
|
||||
#define IPC4_DAI_NUM_ALH_BI_DIR_LINKS_GROUP 4
|
||||
#else
|
||||
#define IPC4_DAI_NUM_ALH_BI_DIR_LINKS 0
|
||||
#define IPC4_DAI_NUM_ALH_BI_DIR_LINKS_GROUP 0
|
||||
#endif
|
||||
|
||||
/* copier id = (group id << 4) + codec id + IPC4_ALH_DAI_INDEX_OFFSET
|
||||
* dai_index = (group id << 8) + codec id;
|
||||
*/
|
||||
#define IPC4_ALH_DAI_INDEX(x) ((((x) & 0xF0) << DAI_NUM_ALH_BI_DIR_LINKS_GROUP) + \
|
||||
#define IPC4_ALH_DAI_INDEX(x) ((((x) & 0xF0) << IPC4_DAI_NUM_ALH_BI_DIR_LINKS_GROUP) + \
|
||||
(((x) & 0xF) - IPC4_ALH_DAI_INDEX_OFFSET))
|
||||
|
||||
/* Multi-gateways addressing starts from IPC4_ALH_MULTI_GTW_BASE */
|
||||
|
|
Loading…
Reference in New Issue