mirror of https://github.com/thesofproject/sof.git
Volume: Code cleanup for minimum gain value limiting
This patch changes the condition for limiting the smallest gain to eliminate a never executed code part when VOL_MIN is defined as zero. The variable v is unsigned integer so less than zero is not possible. The functionality is not modified by this patch. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
53976e4c38
commit
33b144d2fe
|
@ -427,7 +427,7 @@ static inline void volume_set_chan(struct comp_dev *dev, int chan, uint32_t vol)
|
|||
* multiplication overflow with the 32 bit value. Non-zero MIN option
|
||||
* can be useful to prevent totally muted small volume gain.
|
||||
*/
|
||||
if (v < VOL_MIN)
|
||||
if (v <= VOL_MIN)
|
||||
v = VOL_MIN;
|
||||
|
||||
if (v > VOL_MAX)
|
||||
|
|
Loading…
Reference in New Issue