asoc: update aw882xx driver to v1.9.0.9

changes:
fix set gain ctl timing issue.

Change-Id: I1e52b9ce38deee2c12b5bb4417fc9a975e481b0a
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2293053
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
guoyf2 authored and Gilberto Gambugge committed 2023-06-01 00:42:19 -03:00
1 parent 48ce8d105a
commit 91411c2350
1 file changed
+5 -3
+5 -3
View File
@@ -35,7 +35,7 @@
#include "aw_log.h" #include "aw_log.h"
#include "aw_dsp.h" #include "aw_dsp.h"
#define AW882XX_DRIVER_VERSION "v1.9.0.7" #define AW882XX_DRIVER_VERSION "v1.9.0.9"
#define AW882XX_I2C_NAME "aw882xxacf_smartpa" #define AW882XX_I2C_NAME "aw882xxacf_smartpa"
#define AW_READ_CHIPID_RETRIES 5 /* 5 times */ #define AW_READ_CHIPID_RETRIES 5 /* 5 times */
@@ -797,9 +797,11 @@ static int aw882xx_dev_gain_ctl_set(struct snd_kcontrol *kcontrol,
int value = 0; int value = 0;
int aw882xx_volume = 0; int aw882xx_volume = 0;
int useful_range = 0;
mutex_lock(&aw882xx->lock);
/* Note: The larger the volume value is, the smaller the actual volume */ /* Note: The larger the volume value is, the smaller the actual volume */
int useful_range = desc->mute_volume - desc->init_volume; useful_range = desc->mute_volume - desc->init_volume;
aw_dev_info(aw882xx->dev, "desc->init_volume = %d mute_volume = %d", aw_dev_info(aw882xx->dev, "desc->init_volume = %d mute_volume = %d",
desc->init_volume, desc->mute_volume ); desc->init_volume, desc->mute_volume );
@@ -817,7 +819,7 @@ static int aw882xx_dev_gain_ctl_set(struct snd_kcontrol *kcontrol,
aw882xx_volume = ((AW882XX_MOTO_MAX_GAIN - value) * useful_range) / AW882XX_MOTO_MAX_GAIN aw882xx_volume = ((AW882XX_MOTO_MAX_GAIN - value) * useful_range) / AW882XX_MOTO_MAX_GAIN
+ desc->init_volume; + desc->init_volume;
mutex_lock(&aw882xx->lock);
aw_dev->ops.aw_set_volume(aw_dev, aw882xx_volume); aw_dev->ops.aw_set_volume(aw_dev, aw882xx_volume);
mutex_unlock(&aw882xx->lock); mutex_unlock(&aw882xx->lock);
aw_dev_info(aw882xx->dev,"set value = %d, set aw882xx volume = %d", value, aw882xx_volume); aw_dev_info(aw882xx->dev,"set value = %d, set aw882xx volume = %d", value, aw882xx_volume);