Merge "ASoC: msm-audio-effects-q6-v2: Add BPF order check"
This commit is contained in:
commit
c011875a23
@ -1,5 +1,6 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
@ -1002,6 +1003,14 @@ int msm_audio_effects_pbe_handler(struct audio_client *ac,
|
|||||||
pbe->config.reserved =
|
pbe->config.reserved =
|
||||||
GET_NEXT(values, param_max_offset, rc);
|
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];
|
p_coeffs = &pbe->config.p1LowPassCoeffs[0];
|
||||||
lpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
|
lpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
|
||||||
hpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
|
hpf_len = (pbe->config.xover_filter_order == 3) ? 10 : 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user