[Sound-open-firmware] [PATCH] volume: fix bug pertaining to volume ramp down

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Mar 12 09:52:59 CET 2018


On Sun, 2018-03-11 at 22:09 -0700, Ranjani Sridharan wrote:
> This patch fixes the bug in the check for terminating the volume
> ramp down.
> 
> Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
> ---
>  src/audio/volume.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/audio/volume.c b/src/audio/volume.c
> index 45a343e..51a5826 100644
> --- a/src/audio/volume.c
> +++ b/src/audio/volume.c
> @@ -335,7 +335,7 @@ static uint64_t vol_work(void *data, uint64_t delay)
>  			vol -= VOL_RAMP_STEP;
>  
>  			/* ramp completed ? */
> -			if (vol <= cd->tvolume[i] || vol >= VOL_MAX)
> +			if (vol <= cd->tvolume[i] || vol <= VOL_MIN)
>  				vol_update(cd, i);
>  			else {
>  				cd->volume[i] = vol;

Applied.

Thanks

Liam


More information about the Sound-open-firmware mailing list