Audio: Volume: Fix ongoing gain ramp stop and wrong final gain
In IPC4 the individual channel gains are passed in separate messages. One channel may have started to ramp to a new gain while a new channel gain arrives for other channel. If the gain is same as the previous control value, the ongoing ramp is stopped and the gain remains at a transition value.
Draft - there's also other bug to fix with no ramp happening at times.
Still, checking but looks like MCPS is not impacted. But need more tests to be sure.
Here's switch control before and after:
controls were
amixer cset name='Dmic0 Capture Switch' on
sleep 1
amixer cset name='Dmic0 Capture Switch' on,on,on,off
sleep 1
amixer cset name='Dmic0 Capture Switch' on,on,off,off
sleep 1
amixer cset name='Dmic0 Capture Switch' on,off,off,off
sleep 1
amixer cset name='Dmic0 Capture Switch' off,off,off,off
sleep 1
amixer cset name='Dmic0 Capture Switch' off,off,off,on
sleep 1
amixer cset name='Dmic0 Capture Switch' off,off,on,on
sleep 1
amixer cset name='Dmic0 Capture Switch' off,on,on,on
sleep 1
amixer cset name='Dmic0 Capture Switch' on,on,on,on
sleep 1
amixer cset name='Dmic0 Capture Switch' off
Here's volume control before and after:
controls were
amixer cset name='Post Mixer Analog Playback Volume' 45
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 45,40
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 40,45
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 0
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 45
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 1,45
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 45,1
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 45
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 40,38
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 39,41
sleep 1
amixer cset name='Post Mixer Analog Playback Volume' 45
No updates, just rebase to restart CI.
@wszypelt The quildbuild check seems to be stuck, can you check?
@kv2019i Sure, I'm already looking into it
@singalsu Hmm, SDW MTL config has failed in SOF driver CI runs and when I look back, the same SDW target failed in previous PR testing (build ids 39443 and 39061 ). At the same time, SDW MTL passes for other PRs at least today. so this is somewhat suspicious. Let me trigger the SOF CI once more.
SOFCI TEST
@singalsu Hmm, SDW MTL config has failed in SOF driver CI runs and when I look back, the same SDW target failed in previous PR testing (build ids 39443 and 39061 ). At the same time, SDW MTL passes for other PRs at least today. so this is somewhat suspicious. Let me trigger the SOF CI once more.
It shows "NotTested" for SDW. Strange if it runs for other PRs!
Now passing, proceeding with merge.