3.5mm headphone jack doesn't work on Rock PI 4c+

I have recently bought the rock pi 4c+ and installed debian and also the ubuntu (with kde) for 4c plus variant. When I plugin my audio cable to the headphone jack, no audio output is coming. But when the output is set to hdmi, audio works from the monitor, but when chosen the headphone jack, the audio doesn’t work

You can have a try, and it may help you solve the problem.
https://wiki.radxa.com/Rockpi4/dev/headphone-jack-work-on-rock-pi-4cplus

The process on the link works to play .wav file once. But next time when i try to play something, it still goes into same problem

Why do I have to run the first two commands each time to play music? Is there any more elegant solution?