diff options
author | Jorge E. Moreira <jemoreira@google.com> | 2021-02-08 17:59:31 -0800 |
---|---|---|
committer | Jorge E. Moreira <jemoreira@google.com> | 2021-02-08 17:59:31 -0800 |
commit | dc2b74a983c1182f9f4e05a8e6e91beb04792c51 (patch) | |
tree | 8c44572911d479dc6dca87dd1cc2e9eca46500ba /cras/src/server/cras_dsp_ini.c | |
parent | c8f8b3cd94220d03fcdee753d8fc762224c3d177 (diff) | |
parent | 9668bb7e705f4102e0558c522f1488a966a51826 (diff) | |
download | adhd-dc2b74a983c1182f9f4e05a8e6e91beb04792c51.tar.gz |
Merge branch 'upstream-master'
Change-Id: I25af576b68bcd95ee401067ee798e963f9a96264
Diffstat (limited to 'cras/src/server/cras_dsp_ini.c')
-rw-r--r-- | cras/src/server/cras_dsp_ini.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/cras/src/server/cras_dsp_ini.c b/cras/src/server/cras_dsp_ini.c index 0b844d16..a331acf8 100644 --- a/cras/src/server/cras_dsp_ini.c +++ b/cras/src/server/cras_dsp_ini.c @@ -11,7 +11,7 @@ #define MAX_NR_PORT 128 /* the max number of ports for a plugin */ #define MAX_PORT_NAME_LENGTH 20 /* names like "output_32" */ -#define MAX_DUMMY_INI_CH 20 /* Max number of channels to create dummy ini */ +#define MAX_MOCK_INI_CH 20 /* Max number of channels to create mock ini */ /* Format of the ini file (See dsp.ini.sample for an example). @@ -305,22 +305,21 @@ static int insert_swap_lr_plugin(struct ini *ini) return 0; } -struct ini *create_dummy_ini(const char *purpose, unsigned int num_channels) +struct ini *create_mock_ini(const char *purpose, unsigned int num_channels) { - static char dummy_flow_names[MAX_DUMMY_INI_CH][9] = { - "{tmp:0}", "{tmp:1}", "{tmp:2}", "{tmp:3}", - "{tmp:4}", "{tmp:5}", "{tmp:6}", "{tmp:7}", - "{tmp:8}", "{tmp:9}", "{tmp:10}", "{tmp:11}", - "{tmp:12}", "{tmp:13}", "{tmp:14}", "{tmp:15}", - "{tmp:16}", "{tmp:17}", "{tmp:18}", "{tmp:19}", + static char mock_flow_names[MAX_MOCK_INI_CH][9] = { + "{tmp:0}", "{tmp:1}", "{tmp:2}", "{tmp:3}", "{tmp:4}", + "{tmp:5}", "{tmp:6}", "{tmp:7}", "{tmp:8}", "{tmp:9}", + "{tmp:10}", "{tmp:11}", "{tmp:12}", "{tmp:13}", "{tmp:14}", + "{tmp:15}", "{tmp:16}", "{tmp:17}", "{tmp:18}", "{tmp:19}", }; struct ini *ini; struct plugin *source, *sink; - int tmp_flow_ids[MAX_DUMMY_INI_CH]; + int tmp_flow_ids[MAX_MOCK_INI_CH]; int i; - if (num_channels > MAX_DUMMY_INI_CH) { - syslog(LOG_ERR, "Unable to create %u channels of dummy ini", + if (num_channels > MAX_MOCK_INI_CH) { + syslog(LOG_ERR, "Unable to create %u channels of mock ini", num_channels); return NULL; } @@ -332,7 +331,7 @@ struct ini *create_dummy_ini(const char *purpose, unsigned int num_channels) } for (i = 0; i < num_channels; i++) - tmp_flow_ids[i] = add_new_flow(ini, dummy_flow_names[i]); + tmp_flow_ids[i] = add_new_flow(ini, mock_flow_names[i]); source = ARRAY_APPEND_ZERO(&ini->plugins); source->title = "source"; |