Loading asoc/msm-pcm-host-voice-v2.c +7 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -626,6 +627,12 @@ static int hpcm_start_vocpcm(char *pcm_id, struct hpcm_drv *prtd, } } if (*no_of_tp != no_of_tp_req && *no_of_tp > 2) { pr_err("%s:: Invalid hpcm start request\n", __func__); memset(&prtd->start_cmd, 0, sizeof(struct start_cmd)); return -EINVAL; } if ((prtd->mixer_conf.tx.enable || prtd->mixer_conf.rx.enable) && *no_of_tp == no_of_tp_req) { voc_send_cvp_start_vocpcm(voc_get_session_id(sess_name), Loading asoc/msm-pcm-q6-v2.c +1 −1 Original line number Diff line number Diff line Loading @@ -1016,7 +1016,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream, goto fail; } if (size == 0 || size < prtd->pcm_count) { if ((size == 0 || size < prtd->pcm_count) && ((offset + size) < prtd->pcm_count)) { memset(bufptr + offset + size, 0, prtd->pcm_count - size); if (fbytes > prtd->pcm_count) size = xfer = prtd->pcm_count; Loading dsp/q6afe.c +11 −0 Original line number Diff line number Diff line Loading @@ -1209,6 +1209,9 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv) sizeof(struct afe_port_mod_evt_rsp_hdr)); uint32_t *dc_presence_flag = num_channels + 1; if (*num_channels < 1 || *num_channels > 4) return -EINVAL; for (i = 0; i < *num_channels; i++) { if (dc_presence_flag[i] == 1) dc_detected = true; Loading Loading @@ -7901,6 +7904,14 @@ static int afe_sidetone_iir(u16 tx_port_id) pr_debug("%s: adding 2 to size:%d\n", __func__, size); size = size + 2; } if (size > MAX_SIDETONE_IIR_DATA_SIZE) { pr_err("%s: iir_config size is out of bounds:%d\n", __func__, size); mutex_unlock(&this_afe.cal_data[cal_index]->lock); ret = -EINVAL; goto done; } memcpy(&filter_data.iir_config, &st_iir_cal_info->iir_config, size); mutex_unlock(&this_afe.cal_data[cal_index]->lock); Loading dsp/q6asm.c +10 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Author: Brian Swetland <swetland@google.com> * * This software is licensed under the terms of the GNU General Public Loading Loading @@ -2289,6 +2290,15 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv) config_debug_fs_read_cb(); if (data->payload_size != (READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t)) { pr_err("%s: payload size of %d is less than expected %d.\n", __func__, data->payload_size, ((READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t))); spin_unlock_irqrestore( &(session[session_id].session_lock), flags); return -EINVAL; } dev_vdbg(ac->dev, "%s: ReadDone: status=%d buff_add=0x%x act_size=%d offset=%d\n", __func__, payload[READDONE_IDX_STATUS], payload[READDONE_IDX_BUFADD_LSW], Loading dsp/q6core.c +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ EXPORT_SYMBOL(q6core_send_uevent); static int parse_fwk_version_info(uint32_t *payload, uint16_t payload_size) { size_t ver_size; int num_services; uint16_t num_services; pr_debug("%s: Payload info num services %d\n", __func__, payload[4]); Loading Loading
asoc/msm-pcm-host-voice-v2.c +7 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/init.h> Loading Loading @@ -626,6 +627,12 @@ static int hpcm_start_vocpcm(char *pcm_id, struct hpcm_drv *prtd, } } if (*no_of_tp != no_of_tp_req && *no_of_tp > 2) { pr_err("%s:: Invalid hpcm start request\n", __func__); memset(&prtd->start_cmd, 0, sizeof(struct start_cmd)); return -EINVAL; } if ((prtd->mixer_conf.tx.enable || prtd->mixer_conf.rx.enable) && *no_of_tp == no_of_tp_req) { voc_send_cvp_start_vocpcm(voc_get_session_id(sess_name), Loading
asoc/msm-pcm-q6-v2.c +1 −1 Original line number Diff line number Diff line Loading @@ -1016,7 +1016,7 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream, goto fail; } if (size == 0 || size < prtd->pcm_count) { if ((size == 0 || size < prtd->pcm_count) && ((offset + size) < prtd->pcm_count)) { memset(bufptr + offset + size, 0, prtd->pcm_count - size); if (fbytes > prtd->pcm_count) size = xfer = prtd->pcm_count; Loading
dsp/q6afe.c +11 −0 Original line number Diff line number Diff line Loading @@ -1209,6 +1209,9 @@ static int32_t afe_callback(struct apr_client_data *data, void *priv) sizeof(struct afe_port_mod_evt_rsp_hdr)); uint32_t *dc_presence_flag = num_channels + 1; if (*num_channels < 1 || *num_channels > 4) return -EINVAL; for (i = 0; i < *num_channels; i++) { if (dc_presence_flag[i] == 1) dc_detected = true; Loading Loading @@ -7901,6 +7904,14 @@ static int afe_sidetone_iir(u16 tx_port_id) pr_debug("%s: adding 2 to size:%d\n", __func__, size); size = size + 2; } if (size > MAX_SIDETONE_IIR_DATA_SIZE) { pr_err("%s: iir_config size is out of bounds:%d\n", __func__, size); mutex_unlock(&this_afe.cal_data[cal_index]->lock); ret = -EINVAL; goto done; } memcpy(&filter_data.iir_config, &st_iir_cal_info->iir_config, size); mutex_unlock(&this_afe.cal_data[cal_index]->lock); Loading
dsp/q6asm.c +10 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Author: Brian Swetland <swetland@google.com> * * This software is licensed under the terms of the GNU General Public Loading Loading @@ -2289,6 +2290,15 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv) config_debug_fs_read_cb(); if (data->payload_size != (READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t)) { pr_err("%s: payload size of %d is less than expected %d.\n", __func__, data->payload_size, ((READDONE_IDX_SEQ_ID + 1) * sizeof(uint32_t))); spin_unlock_irqrestore( &(session[session_id].session_lock), flags); return -EINVAL; } dev_vdbg(ac->dev, "%s: ReadDone: status=%d buff_add=0x%x act_size=%d offset=%d\n", __func__, payload[READDONE_IDX_STATUS], payload[READDONE_IDX_BUFADD_LSW], Loading
dsp/q6core.c +1 −1 Original line number Diff line number Diff line Loading @@ -205,7 +205,7 @@ EXPORT_SYMBOL(q6core_send_uevent); static int parse_fwk_version_info(uint32_t *payload, uint16_t payload_size) { size_t ver_size; int num_services; uint16_t num_services; pr_debug("%s: Payload info num services %d\n", __func__, payload[4]); Loading