control: tlv: Check dB range only within the control's volume range
control: tlv: Check dB range only within the control's volume range

The DB_RANGE need to be used on some HW, since the gain on
volume control is not continuous, and has to be divided into
several sub DB_SCALE ranges.
ASoC has a feature to override the HW default volume range,
and in this case when the volume range is less than the
HW maximum we do not need to go through the whole DB_RANGE,
but we need to stop where the kcontrol's maximum tell us.

Signed-off-by: Peter Ujfalusi <e5c0b4cdf99ae1d408b9c497159e74b54e02e008@nokia.com>
Signed-off-by: Jaroslav Kysela <72edd5e1a572f82f059ccbb83c92b74d6cb051ff@perex.cz>

alsa-project/alsa-lib,mikelima/alsa-lib,mengdonglin/alsa-lib,lgirdwood/alsa-lib,zedongchen/alsa-lib,tiwai/alsa-lib,tiwai/alsa-lib,mengdonglin/alsa-lib,mikelima/alsa-lib,alsa-project/alsa-lib,Distrotech/alsa-lib,zedongchen/alsa-lib,takaswie/alsa-lib,takaswie/alsa-lib,Distrotech/alsa-lib,mengdonglin/alsa-lib,alsa-project/alsa-lib,zedongchen/alsa-lib,mikelima/alsa-lib,mengdonglin/alsa-lib,alsa-project/alsa-lib,lgirdwood/alsa-lib,takaswie/alsa-lib,mikelima/alsa-lib,mengdonglin/alsa-lib,tiwai/alsa-lib,tiwai/alsa-lib,takaswie/alsa-lib,Distrotech/alsa-lib,Distrotech/alsa-lib,lgirdwood/alsa-lib,zedongchen/alsa-lib,Distrotech/alsa-lib,lgirdwood/alsa-lib,mikelima/alsa-lib,lgirdwood/alsa-lib,zedongchen/alsa-lib,takaswie/alsa-lib