1# 2# Machine driver differentiation for dai link ID 3# 4 5# variable that need to be defined in upper m4 6ifdef(`PLATFORM',`',`fatal_error(note: Need to define platform identifier for intel-boards)') 7ifdef(`LINUX_MACHINE_DRIVER',`',`fatal_error(note: Need to define linux machine driver identifier for intel-boards)') 8 9define(`NUM_DMIC_BE_LINK', `2') 10 11ifelse( 12 PLATFORM, `tgl', `define(`NUM_HDMI_BE_LINK', 4)', 13 PLATFORM, `adl', `define(`NUM_HDMI_BE_LINK', 4)', 14 `fatal_error(note: Unknown platform to intel-boards)') 15 16# define the ID base for backend DAI Links 17ifelse( 18 LINUX_MACHINE_DRIVER, `sof_rt5682', ` 19 define(`BOARD_HP_BE_ID', `0') 20 define(`BOARD_DMIC_BE_ID_BASE', eval(BOARD_HP_BE_ID + 1)) 21 define(`BOARD_HDMI_BE_ID_BASE', eval(BOARD_DMIC_BE_ID_BASE + NUM_DMIC_BE_LINK)) 22 ifdef(`NO_AMP', `', `define(`BOARD_SPK_BE_ID', eval(BOARD_HDMI_BE_ID_BASE + NUM_HDMI_BE_LINK))') 23 ifdef(`NO_AMP', `define(`BOARD_BT_BE_ID', eval(BOARD_HDMI_BE_ID_BASE + NUM_HDMI_BE_LINK))', `define(`BOARD_BT_BE_ID', eval(BOARD_SPK_BE_ID + 1))')', 24 LINUX_MACHINE_DRIVER, `sof_ssp_amp', ` 25 define(`BOARD_SPK_BE_ID', `0') 26 ifdef(`NO_DMICS', `', `define(`BOARD_DMIC_BE_ID_BASE', eval(BOARD_SPK_BE_ID + 1))') 27 ifdef(`NO_DMICS', `define(`BOARD_HDMI_BE_ID_BASE', eval(BOARD_SPK_BE_ID + 1))', `define(`BOARD_HDMI_BE_ID_BASE', eval(BOARD_DMIC_BE_ID_BASE + NUM_DMIC_BE_LINK))') 28 define(`BOARD_BT_BE_ID', eval(BOARD_HDMI_BE_ID_BASE + NUM_HDMI_BE_LINK))', 29 `fatal_error(note: Unknown linux machine driver to intel-boards)') 30 31undefine(`NUM_DMIC_BE_LINK') 32undefine(`NUM_HDMI_BE_LINK') 33