diff options
author | Poomarin Phloyphisut <poomarin@google.com> | 2023-06-09 13:04:59 +0000 |
---|---|---|
committer | Joey Poomarin Phloyphisut <poomarin@google.com> | 2023-08-24 07:36:45 +0000 |
commit | baed114a16b44f17708e8ff991d8a486429f82bc (patch) | |
tree | 6a9245e44d9611fb39cf885dc0b03c679f033408 | |
parent | 754a59f2dae5a9e648f2f857cbbea0a018e6e396 (diff) | |
download | amplifiers-android-gs-shusky-5.15-u-qpr1-beta2.tar.gz |
amcs: Fix bug on wrong index lookup in Bt data.android-u-qpr2-beta-2_r0.8android-u-qpr2-beta-1_r0.7android-u-qpr1-beta-2_r0.8android-u-qpr1-beta-2.2_r0.7android-u-qpr1-beta-2.1_r0.8android-14.0.0_r0.81android-14.0.0_r0.80android-14.0.0_r0.45android-14.0.0_r0.38android-gs-shusky-5.15-u-qpr1-beta2android-gs-shusky-5.15-android14-qpr1-betaandroid-gs-shusky-5.15-android14-qpr1android-gs-akita-5.15-android14-d2
Test: local test
Bug: 280248992
Change-Id: I983a24947c1fb01bd8b7add08bbadee65dc488eb
-rw-r--r-- | audiometrics/audiometrics.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audiometrics/audiometrics.c b/audiometrics/audiometrics.c index b0a9051..8c8a833 100644 --- a/audiometrics/audiometrics.c +++ b/audiometrics/audiometrics.c @@ -1071,12 +1071,12 @@ static long amcs_cdev_unlocked_ioctl(struct file *file, unsigned int cmd, unsign case AMCS_OP_BT_ACTIVE_DURATION_INCREASE: ret = 0; - codec = params.val[1]; + codec = params.val[0]; if (codec >= CODEC_MAX_COUNT) { ret = -EINVAL; } else { mutex_lock(&priv->lock); - priv->sz.bt_active_duration[codec] += params.val[2]; + priv->sz.bt_active_duration[codec] += params.val[1]; mutex_unlock(&priv->lock); } break; |