sof icon indicating copy to clipboard operation
sof copied to clipboard

Audio: Volume: Fix ongoing gain ramp stop and wrong final gain

Open singalsu opened this issue 1 year ago • 2 comments

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.

singalsu avatar Mar 14 '24 17:03 singalsu

Draft - there's also other bug to fix with no ramp happening at times.

singalsu avatar Mar 14 '24 17:03 singalsu

Still, checking but looks like MCPS is not impacted. But need more tests to be sure.

Here's switch control before and after: Screenshot from 2024-03-18 19-06-46 Screenshot from 2024-03-18 18-38-39

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: Screenshot from 2024-03-18 18-43-38 Screenshot from 2024-03-18 18-37-55

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

singalsu avatar Mar 18 '24 18:03 singalsu

No updates, just rebase to restart CI.

singalsu avatar Apr 05 '24 07:04 singalsu

@wszypelt The quildbuild check seems to be stuck, can you check?

kv2019i avatar Apr 10 '24 11:04 kv2019i

@kv2019i Sure, I'm already looking into it

wszypelt avatar Apr 10 '24 11:04 wszypelt

@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.

kv2019i avatar Apr 10 '24 19:04 kv2019i

SOFCI TEST

kv2019i avatar Apr 10 '24 19:04 kv2019i

@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!

singalsu avatar Apr 11 '24 08:04 singalsu

Now passing, proceeding with merge.

kv2019i avatar Apr 11 '24 08:04 kv2019i