Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/audio/igo_nr/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The AI Noise Reduction Software contained herein is the proprietary intellectual property of British Cayman Islands Intelligo Technology, Inc. All rights reserved. Customer who desires to obtain more information or the license to incorporate this Software into their systems and/or devices may contact Intelligo at support@intelli-go.ai.
51 changes: 2 additions & 49 deletions src/audio/igo_nr/igo_nr.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,6 @@

#define SOF_IGO_NR_MAX_SIZE 4096 /* Max size for coef data in bytes */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add one patch per type of issues fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Just split it to four commits.


struct IGO_PARAMS {
uint32_t igo_params_ver;
uint32_t dump_data;
uint32_t nr_bypass;
uint32_t nr_mode1_en;
uint32_t nr_mode3_en;
uint32_t nr_ul_enable;
uint32_t agc_gain;
uint32_t nr_voice_str;
uint32_t nr_level;
uint32_t nr_mode1_floor;
uint32_t nr_mode1_od;
uint32_t nr_mode1_pp_param7;
uint32_t nr_mode1_pp_param8;
uint32_t nr_mode1_pp_param10;
uint32_t nr_mode3_floor;
uint32_t nr_mode1_pp_param53;
} __attribute__((packed));

enum IGO_NR_ENUM {
IGO_NR_ONOFF_SWITCH = 0,
IGO_NR_ENUM_LAST,
Expand Down Expand Up @@ -239,7 +220,7 @@ static struct comp_dev *igo_nr_new(const struct comp_driver *drv,
struct sof_ipc_comp_process *ipc_igo_nr =
(struct sof_ipc_comp_process *)comp;
struct comp_dev *dev;
struct comp_data *cd = NULL;
struct comp_data *cd;
size_t bs = ipc_igo_nr->size;
int32_t ret;

Expand Down Expand Up @@ -440,20 +421,6 @@ static int32_t igo_nr_cmd_get_value(struct comp_dev *dev, struct sof_ipc_ctrl_da
int32_t ret = 0;

switch (cdata->cmd) {
case SOF_CTRL_CMD_ENUM:
comp_info(dev, "igo_nr_cmd_get_value(), SOF_CTRL_CMD_ENUM index=%d", cdata->index);
switch (cdata->index) {
case IGO_NR_ONOFF_SWITCH:
for (j = 0; j < cdata->num_elems; j++)
cdata->chanv[j].value = cd->process_enable[j];
break;
default:
comp_err(dev, "igo_nr_cmd_get_value() error: invalid cdata->index %d",
cdata->index);
ret = -EINVAL;
break;
}
break;
case SOF_CTRL_CMD_SWITCH:
for (j = 0; j < cdata->num_elems; j++) {
cdata->chanv[j].channel = j;
Expand Down Expand Up @@ -520,19 +487,6 @@ static int32_t igo_nr_cmd_set_value(struct comp_dev *dev, struct sof_ipc_ctrl_da
int32_t ret;

switch (cdata->cmd) {
case SOF_CTRL_CMD_ENUM:
comp_dbg(dev, "igo_nr_cmd_set_value(), SOF_CTRL_CMD_ENUM index=%d", cdata->index);
switch (cdata->index) {
case IGO_NR_ONOFF_SWITCH:
ret = igo_nr_set_chan(dev, cdata);
break;
default:
comp_err(dev, "igo_nr_cmd_set_value() error: invalid cdata->index %d",
cdata->index);
ret = -EINVAL;
break;
}
break;
case SOF_CTRL_CMD_SWITCH:
comp_dbg(dev, "igo_nr_cmd_set_value(), SOF_CTRL_CMD_SWITCH, cdata->comp_id = %u",
cdata->comp_id);
Expand Down Expand Up @@ -597,10 +551,9 @@ static void igo_nr_process(struct comp_dev *dev,
static void igo_nr_get_igo_params(struct comp_dev *dev)
{
struct comp_data *cd = comp_get_drvdata(dev);

struct sof_igo_nr_config *p_config = comp_get_data_blob(cd->model_handler, NULL, NULL);
comp_info(dev, "igo_nr_get_igo_params()");

comp_info(dev, "igo_nr_get_igo_params()");
if (p_config) {
cd->config = *p_config;

Expand Down
19 changes: 19 additions & 0 deletions src/include/user/igo_nr.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@

#include <stdint.h>

struct IGO_PARAMS {
uint32_t igo_params_ver;
uint32_t dump_data;
uint32_t nr_bypass;
uint32_t nr_mode1_en;
uint32_t nr_mode3_en;
uint32_t nr_ul_enable;
uint32_t agc_gain;
uint32_t nr_voice_str;
uint32_t nr_level;
uint32_t nr_mode1_floor;
uint32_t nr_mode1_od;
uint32_t nr_mode1_pp_param7;
uint32_t nr_mode1_pp_param8;
uint32_t nr_mode1_pp_param10;
uint32_t nr_mode3_floor;
uint32_t nr_mode1_pp_param53;
} __attribute__((packed));

struct sof_igo_nr_config {
/* reserved */
struct IGO_PARAMS igo_params;
Expand Down