New ESP32 head: SmartMatrix/src/esp32_i2s_parallel.c:129:21: error: 'GPIO_PIN_MUX_REG' undeclared

My older esp32 hardware tree has been working fine with SmartMatrix 4.
when I upgrade to latest head for GitHub - espressif/arduino-esp32: Arduino core for the ESP32, I get:

/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c: In function 'gpio_setup_out':
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:129:21: error: 'GPIO_PIN_MUX_REG' undeclared (first use in this function)
     PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
                     ^~~~~~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/esp_common/include/esp_assert.h:23:71: note: in definition of macro 'TRY_STATIC_ASSERT'
             _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG);   \
                                                                       ^~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:96:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:145:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
             ASSERT_IF_DPORT_REG((_r), REG_SET_FIELD);                                                                  \
             ^~~~~~~~~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:91:46: note: in expansion of macro 'REG_SET_FIELD'
 #define PIN_FUNC_SELECT(PIN_NAME, FUNC)      REG_SET_FIELD(PIN_NAME, MCU_SEL, FUNC)
                                              ^~~~~~~~~~~~~
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:129:5: note: in expansion of macro 'PIN_FUNC_SELECT'
     PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
     ^~~~~~~~~~~~~~~
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:129:21: note: each undeclared identifier is reported only once for each function it appears in
     PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[gpio], PIN_FUNC_GPIO);
                     ^~~~~~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/esp_common/include/esp_assert.h:23:71: note: in definition of macro 'TRY_STATIC_ASSERT'
             _Static_assert(__builtin_choose_expr(__builtin_constant_p(CONDITION), (CONDITION), 1), #MSG);   \
                                                                       ^~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:96:57: note: in expansion of macro 'IS_DPORT_REG'
 #define ASSERT_IF_DPORT_REG(_r, OP)  TRY_STATIC_ASSERT(!IS_DPORT_REG(_r), (Cannot use OP for DPORT registers use DPORT_##OP));
                                                         ^~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/soc.h:145:13: note: in expansion of macro 'ASSERT_IF_DPORT_REG'
             ASSERT_IF_DPORT_REG((_r), REG_SET_FIELD);                                                                  \
             ^~~~~~~~~~~~~~~~~~~
/home/merlin/Arduino/hardware/espressif/esp32/tools/sdk/esp32/include/soc/esp32/include/soc/io_mux_reg.h:91:46: note: in expansion of macro 'REG_SET_FIELD'
 #define PIN_FUNC_SELECT(PIN_NAME, FUNC)      REG_SET_FIELD(PIN_NAME, MCU_SEL, FUNC)
                                              ^~~~~~~~~~~~~
(...)

Is anyone using a recent ESP32 head?

Looks like GPIO_PIN_MUX_REG is still there, maybe include/soc/include/soc/gpio_periph.h isn’t included automatically anymore and needs to be included manually by the SmartMatrix Library files that use it?

Sorry for the delay, adding that include didn’t quite fix it.
It may be easiest if you pull esp32 master and check it on your side.
This is what I got now:

/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c: In function 'gpio_setup_out':
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:131:5: warning: implicit declaration of function 'gpio_set_direction'; did you mean 'gpio_setup_out'? [-Wimplicit-function-declaration]
     gpio_set_direction(gpio, GPIO_MODE_DEF_OUTPUT);
     ^~~~~~~~~~~~~~~~~~
     gpio_setup_out
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:131:30: error: 'GPIO_MODE_DEF_OUTPUT' undeclared (first use in this function)
     gpio_set_direction(gpio, GPIO_MODE_DEF_OUTPUT);
                              ^~~~~~~~~~~~~~~~~~~~
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:131:30: note: each undeclared identifier is reported only once for each function it appears in
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:132:5: warning: implicit declaration of function 'gpio_matrix_out'; did you mean 'gpio_setup_out'? [-Wimplicit-function-declaration]
     gpio_matrix_out(gpio, sig, false, false);
     ^~~~~~~~~~~~~~~
     gpio_setup_out
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c: In function 'gpio_setup_out_invert':
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:138:31: error: 'GPIO_MODE_DEF_OUTPUT' undeclared (first use in this function)
      gpio_set_direction(gpio, GPIO_MODE_DEF_OUTPUT);
                               ^~~~~~~~~~~~~~~~~~~~
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c: In function 'i2s_parallel_setup_without_malloc':
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:385:5: warning: implicit declaration of function 'esp_intr_alloc'; did you mean 'ets_intr_unlock'? [-Wimplicit-function-declaration]
     esp_intr_alloc(ETS_I2S1_INTR_SOURCE, (int)(ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1), i2s_isr, NULL, NULL);
     ^~~~~~~~~~~~~~
     ets_intr_unlock
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:385:48: error: 'ESP_INTR_FLAG_IRAM' undeclared (first use in this function); did you mean 'ESP_ERR_FLASH_BASE'?
     esp_intr_alloc(ETS_I2S1_INTR_SOURCE, (int)(ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1), i2s_isr, NULL, NULL);
                                                ^~~~~~~~~~~~~~~~~~
                                                ESP_ERR_FLASH_BASE
/home/merlin/Arduino/libraries/SmartMatrix/src/esp32_i2s_parallel.c:385:69: error: 'ESP_INTR_FLAG_LEVEL1' undeclared (first use in this function); did you mean 'PS_INTLEVEL'?
     esp_intr_alloc(ETS_I2S1_INTR_SOURCE, (int)(ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_LEVEL1), i2s_isr, NULL, NULL);
                                                                     ^~~~~~~~~~~~~~~~~~~~
                                                                     PS_INTLEVEL