Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ewoodev
Copy link
Contributor

@ewoodev ewoodev commented Dec 23, 2025

…ialization

To reduce booting time,

  • Add parallel NDP120 initialization if CONFIG_AMP is enabled.
  • Introduce semaphore-based synchronization for NDP120 init completion with timeout.

This change improves boot performance by parallelizing NDP120 audio driver initialization while ensuring proper synchronization and timeout handling.

@ewoodev ewoodev force-pushed the WORK-251223_boot_optimize branch 2 times, most recently from da7d2ff to 5773fd5 Compare December 23, 2025 11:32
@sunghan-chang
Copy link
Contributor

@ewoodev Let's leave time difference in uptime in commit description. Booting logs as well

@ewoodev ewoodev force-pushed the WORK-251223_boot_optimize branch from 5773fd5 to c0148de Compare December 24, 2025 06:13
@ewoodev ewoodev force-pushed the WORK-251223_boot_optimize branch 2 times, most recently from bc12f04 to b347468 Compare December 26, 2025 05:39
Copy link
Contributor

@amandeep-samsung amandeep-samsung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewoodev : As NDP120 driver is initialized by parallelization using core 1 so, can it be done for other drivers as well which are done in serial manner currently?
and
one more thing,
If we make start of ndp120 initialization more early in void board_initialize(void), it can reduce wait time for synchronization. I mean to say we can fix initialization order for board_initialize() and make it early for independent peripherals as I2C etc.

@ewoodev
Copy link
Contributor Author

ewoodev commented Dec 26, 2025

As NDP120 driver is initialized by parallelization using core 1 so, can it be done for other drivers as well which are done in serial manner currently?
and
one more thing,
If we make start of ndp120 initialization more early in void board_initialize(void), it can reduce wait time for synchronization. I mean to say we can fix initialization order for board_initialize() and make it early for independent peripherals as I2C etc.

Thank you for your comment.
it takes about 1.6 seconds to initialize ndp during driver initialization.
The rest of the drvier initialization is less than 1.6.
Therefore, initializing other drivers in parallel can delay the completion of cpu0 after an already long ndp initialization.

ndp120 uses resource fs and smartfs.
Currently, it is the fastest init start time.

…ialization

To reduce booting time,
- Add parallel NDP120 initialization if CONFIG_AMP is enabled.
- Introduce semaphore-based synchronization for NDP120 init completion with timeout.

This change improves boot performance by parallelizing NDP120 audio driver
initialization while ensuring proper synchronization and timeout handling.

Signed-off-by: eunwoo.nam <[email protected]>
@ewoodev ewoodev force-pushed the WORK-251223_boot_optimize branch from b347468 to 5a8edd0 Compare December 26, 2025 10:28
@amandeep-samsung
Copy link
Contributor

As NDP120 driver is initialized by parallelization using core 1 so, can it be done for other drivers as well which are done in serial manner currently?
and
one more thing,
If we make start of ndp120 initialization more early in void board_initialize(void), it can reduce wait time for synchronization. I mean to say we can fix initialization order for board_initialize() and make it early for independent peripherals as I2C etc.

Thank you for your comment. it takes about 1.6 seconds to initialize ndp during driver initialization. The rest of the drvier initialization is less than 1.6. Therefore, initializing other drivers in parallel can delay the completion of cpu0 after an already long ndp initialization.

ndp120 uses resource fs and smartfs. Currently, it is the fastest init start time.

I got your point for keeping ndp120 driver only for core 1.
as a suggestion, can it help

Current order:
board_gpio_initialize();
board_i2c_initialize();
board_i2s_initialize();

#ifdef CONFIG_AUDIO_NDP120
rtl8730_ndp_init_pre();
#endif

New order:
board_gpio_initialize();

#ifdef CONFIG_AUDIO_NDP120
rtl8730_ndp_init_pre();
#endif

board_i2c_initialize();
board_i2s_initialize();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants