mirror of https://github.com/thesofproject/sof.git
Audio: Volume: Jump volume directly to target when no ramp
This ensures that volume for a channel changes immediately after receiving the control if ramp duration is zero or if type is no fade. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
e23a663d13
commit
bc506f12c8
|
@ -513,6 +513,9 @@ int volume_set_chan(struct processing_module *mod, int chan,
|
||||||
if (cd->ramp_type == SOF_VOLUME_LINEAR || cd->ramp_type == SOF_VOLUME_LINEAR_ZC)
|
if (cd->ramp_type == SOF_VOLUME_LINEAR || cd->ramp_type == SOF_VOLUME_LINEAR_ZC)
|
||||||
set_linear_ramp_coef(cd, chan, constant_rate_ramp);
|
set_linear_ramp_coef(cd, chan, constant_rate_ramp);
|
||||||
|
|
||||||
|
if (!cd->initial_ramp || cd->ramp_type == SOF_VOLUME_WINDOWS_NO_FADE)
|
||||||
|
cd->volume[chan] = v;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue