_nobody_
Lurker
NXP_Audio_HAL_2.0 used for Android 7
Please, do note that there are specifics parts of the vendor implementation, such as sampling rate, buffer size and the latency. These data and others (Audio Flinger call backs) should be read by Audio Flinger while changing the cards in the multiple cards' Audio HAL implementation. These parameters for the new card (while opening an output stream as an example) MUST be read by Audio Flinger from the Audio HAL!
In this regard, Audio Flinger of Android 7 has the ugly bug, while changing from the one family card to the another, since Google programmers forgot, while opening the output stream to pass the buffer size, assuming that the buffer size is a fixed value through the live of the Audio Stack (which is NOT). Google programmers pass the other two parameters: sampling rate and the latency!
https://github.com/ZoranStojsavljevic/Android_Audio_Setup/blob/main/Audio_HAL/README.md
Thank you!
Please, do note that there are specifics parts of the vendor implementation, such as sampling rate, buffer size and the latency. These data and others (Audio Flinger call backs) should be read by Audio Flinger while changing the cards in the multiple cards' Audio HAL implementation. These parameters for the new card (while opening an output stream as an example) MUST be read by Audio Flinger from the Audio HAL!
In this regard, Audio Flinger of Android 7 has the ugly bug, while changing from the one family card to the another, since Google programmers forgot, while opening the output stream to pass the buffer size, assuming that the buffer size is a fixed value through the live of the Audio Stack (which is NOT). Google programmers pass the other two parameters: sampling rate and the latency!
https://github.com/ZoranStojsavljevic/Android_Audio_Setup/blob/main/Audio_HAL/README.md
Thank you!