Please tell us some basic information before asking for help:
Model Name: ZenFone 9
Firmware Version: WW_32.2030.2030.26
Rooted or not: No
Frequency of Occurrence: Always on maximum volume when music file/stream is loud enough
APP Name & APP Version (If your issue relates to the app): All audio apps
Steps to reproduce:
Connect headphones or amplifier to headphone jack.
Set volume (on the phone!) to maximum.
Play an audio file (e.g. from Deezer, but disable audio normalization).
On louder songs you'll hear audio crackling (occasionally or often - depends on the song).
To boost the effect (audio crackling), use audio equalizer from system settings.
"zf9_music_normal.mp4" - normal music playback (Deezer, no audio normalization, max volume) - audio is distorted (captured by PC's Line-In).
"zf9_music_with_equalizer.mp4" - music playback with equalizer (Deezer, no audio normalization, max volume) - audio is rather distorted (captured by PC's Line-In).
"sine.mp4" - sine wave prepared for testing purposes.
"zf9_sine.mp4" - sine wave played on ZenFone 9 and captured by PC's Line-In.
Audio files has been converted, because it's not possible to upload WAV or FLAC file here.
Screenshot shows the sine wave played by ZenFone 9 and recorded by PC's Line-In. The file was played without equalizer.
Problem doesn't exist on ZenFone 8. Maybe overall volume is higher on ZenFone 9 and it's causing an integer overflow?