Skip to content

Audio: Continue volume ramp until all channels are complete#3450

Merged
lgirdwood merged 1 commit intomasterfrom
volume_fix_4ch_unique_gains
Sep 23, 2020
Merged

Audio: Continue volume ramp until all channels are complete#3450
lgirdwood merged 1 commit intomasterfrom
volume_fix_4ch_unique_gains

Conversation

@singalsu
Copy link
Copy Markdown
Collaborator

@singalsu singalsu commented Sep 22, 2020

The volume component works correct when all channels receive the same
gain value in volume set command.

This patch fixes a bug that is triggered by applying different
gain values for the channels. The logic with setting cd->ramp_finished
to true caused the check in volume copy() to no more call volume_ramp()
when one of the channel reached their target volume. When the ramp
updating was stopped all other channels remain in intermediate gain
value.

In the fix the logic is set to opposite. Whenever a channel needs a ramp
update it sets a temporary flag. The ramp finish is set only when
no channels needed gain update.

Fixes #3455

Signed-off-by: Seppo Ingalsuo [email protected]

@singalsu
Copy link
Copy Markdown
Collaborator Author

SOFCI TEST

The volume component works correct when all channels receive the same
gain value in volume set command.

This patch fixes a bug that is triggered by applying different
gain values for the channels. The logic with setting cd->ramp_finished
to true caused the check in volume copy() to no more call volume_ramp()
when one of the channel reached their target volume. When the ramp
updating was stopped all other channels remain in intermediate gain
value.

In the fix the logic is set to opposite. Whenever a channel needs a ramp
update it sets a temporary flag. The ramp finish is set only when
no channels needed gain update.

Fixes #3455

Signed-off-by: Seppo Ingalsuo <[email protected]>
@singalsu singalsu force-pushed the volume_fix_4ch_unique_gains branch from 31ed433 to fb19e7f Compare September 23, 2020 10:59
@lgirdwood lgirdwood added this to the v1.6 milestone Sep 23, 2020
@singalsu singalsu changed the title [RFC] Audio: Continue volume ramp until all channels are complete Audio: Continue volume ramp until all channels are complete Sep 23, 2020
@singalsu singalsu marked this pull request as ready for review September 23, 2020 11:00
@lgirdwood
Copy link
Copy Markdown
Member

@singalsu can you check CI

@lgirdwood
Copy link
Copy Markdown
Member

@zrombel can you comment on CI SNR failure for DMIC, could this be subjective to ramp ? @singalsu any inputs here ?

@singalsu
Copy link
Copy Markdown
Collaborator Author

There were not these fails with the previous [RFC] version of the patch. I recall there was one BSW fail that should be unrelated.

@lgirdwood
Copy link
Copy Markdown
Member

Passing now, must have been a CI issue.

@lgirdwood lgirdwood merged commit 1d6887f into master Sep 23, 2020
@singalsu singalsu deleted the volume_fix_4ch_unique_gains branch January 27, 2021 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Non-symmetrical per channel volume controls cause wrong gain

2 participants