Skip to content

Commit

Permalink
techpack: audio: LA.UM.9.14.r1-22600-LAHAINA.QSSI12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
psndna88 committed Sep 23, 2023
1 parent 79201ba commit 268df11
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions techpack/audio/asoc/msm-audio-effects-q6-v2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/

#include <linux/slab.h>
Expand Down Expand Up @@ -1002,6 +1003,14 @@ int msm_audio_effects_pbe_handler(struct audio_client *ac,
pbe->config.reserved =
GET_NEXT(values, param_max_offset, rc);

if ((pbe->config.bandpass_filter_order > 3) ||
(pbe->config.bandpass_filter_order < 1)) {
pr_err("%s: Invalid BPF order\n",
__func__);
rc = -EINVAL;
goto invalid_config;
}

p_coeffs = &pbe->config.p1LowPassCoeffs[0];
lpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
hpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
Expand Down

0 comments on commit 268df11

Please sign in to comment.