Loading asoc/msm-pcm-routing-v2.c +58 −8 Original line number Original line Diff line number Diff line Loading @@ -1426,7 +1426,47 @@ static struct cal_block_data *msm_routing_find_topology(int path, cal_index); cal_index); } } static int msm_routing_find_topology_on_index(int session_type, int app_type, static struct cal_block_data *msm_routing_find_topology_by_buf_number(int usecase, int path, int app_type, int acdb_id, int cal_index, bool exact) { struct list_head *ptr, *next; struct cal_block_data *cal_block = NULL; struct audio_cal_info_adm_top *cal_info; int buffer_idx_w_path; pr_debug("%s\n", __func__); buffer_idx_w_path = path + MAX_SESSION_TYPES * usecase; list_for_each_safe(ptr, next, &cal_data[cal_index]->cal_blocks) { cal_block = list_entry(ptr, struct cal_block_data, list); if (cal_utils_is_cal_stale(cal_block)) continue; cal_info = (struct audio_cal_info_adm_top *) cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (cal_info->path == path) && (cal_info->app_type == app_type) && (cal_info->acdb_id == acdb_id)) { return cal_block; } } pr_debug("%s: Can't find topology for buffer_number %d, path %d, app %d, acdb_id %d %s\n", __func__, buffer_idx_w_path, path, app_type, acdb_id, exact ? "fail" : "defaulting to search by path, app_type and acdb_id"); return exact ? NULL : msm_routing_find_topology(path, app_type, acdb_id, cal_index, exact); } static int msm_routing_find_topology_on_index(int fedai_id, int session_type, int app_type, int acdb_dev_id, int idx, int acdb_dev_id, int idx, bool exact) bool exact) { { Loading @@ -1434,8 +1474,16 @@ static int msm_routing_find_topology_on_index(int session_type, int app_type, struct cal_block_data *cal_block = NULL; struct cal_block_data *cal_block = NULL; mutex_lock(&cal_data[idx]->lock); mutex_lock(&cal_data[idx]->lock); if (idx == ADM_TOPOLOGY_CAL_TYPE_IDX) cal_block = msm_routing_find_topology_by_buf_number(fedai_id, session_type, app_type, acdb_dev_id, idx, exact); else cal_block = msm_routing_find_topology(session_type, app_type, cal_block = msm_routing_find_topology(session_type, app_type, acdb_dev_id, idx, exact); acdb_dev_id, idx, exact); if (cal_block != NULL) { if (cal_block != NULL) { topology = ((struct audio_cal_info_adm_top *) topology = ((struct audio_cal_info_adm_top *) cal_block->cal_info)->topology; cal_block->cal_info)->topology; Loading Loading @@ -1466,14 +1514,16 @@ static int msm_routing_get_adm_topology(int fedai_id, int session_type, fe_dai_app_type_cfg[fedai_id][session_type][be_id].acdb_dev_id; fe_dai_app_type_cfg[fedai_id][session_type][be_id].acdb_dev_id; pr_debug("%s: Check for exact LSM topology\n", __func__); pr_debug("%s: Check for exact LSM topology\n", __func__); topology = msm_routing_find_topology_on_index(session_type, topology = msm_routing_find_topology_on_index(fedai_id, session_type, app_type, app_type, acdb_dev_id, acdb_dev_id, ADM_LSM_TOPOLOGY_CAL_TYPE_IDX, ADM_LSM_TOPOLOGY_CAL_TYPE_IDX, true /*exact*/); true /*exact*/); if (topology < 0) { if (topology < 0) { pr_debug("%s: Check for compatible topology\n", __func__); pr_debug("%s: Check for compatible topology\n", __func__); topology = msm_routing_find_topology_on_index(session_type, topology = msm_routing_find_topology_on_index(fedai_id, session_type, app_type, app_type, acdb_dev_id, acdb_dev_id, ADM_TOPOLOGY_CAL_TYPE_IDX, ADM_TOPOLOGY_CAL_TYPE_IDX, Loading Loading @@ -1540,7 +1590,7 @@ static void msm_pcm_routing_build_matrix(int fedai_id, int sess_type, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][sess_type].strm_id; payload.session_id = fe_dai_map[fedai_id][sess_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fedai_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } } } } Loading Loading @@ -1812,7 +1862,7 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, int perf_mode, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fe_id][session_type].strm_id; payload.session_id = fe_dai_map[fe_id][session_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fe_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } } mutex_unlock(&routing_lock); mutex_unlock(&routing_lock); Loading Loading @@ -2176,7 +2226,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][session_type].strm_id; payload.session_id = fe_dai_map[fedai_id][session_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fedai_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } } dsp/q6adm.c +61 −10 Original line number Original line Diff line number Diff line Loading @@ -2288,6 +2288,54 @@ static struct cal_block_data *adm_find_cal(int cal_index, int path, return adm_find_cal_by_app_type(cal_index, path, app_type); return adm_find_cal_by_app_type(cal_index, path, app_type); } } static struct cal_block_data *adm_find_cal_by_buf_number(int usecase, int cal_index, int path, int app_type, int acdb_id, int sample_rate) { struct list_head *ptr, *next; struct cal_block_data *cal_block = NULL; struct audio_cal_info_audproc *audproc_cal_info = NULL; struct audio_cal_info_audvol *audvol_cal_info = NULL; int buffer_idx_w_path; pr_debug("%s:\n", __func__); buffer_idx_w_path = path + MAX_PATH_TYPE * usecase; list_for_each_safe(ptr, next, &this_adm.cal_data[cal_index]->cal_blocks) { cal_block = list_entry(ptr, struct cal_block_data, list); if (cal_utils_is_cal_stale(cal_block)) continue; if (cal_index == ADM_AUDPROC_CAL || cal_index == ADM_LSM_AUDPROC_CAL || cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) { audproc_cal_info = cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (audproc_cal_info->path == path) && (audproc_cal_info->app_type == app_type) && (audproc_cal_info->acdb_id == acdb_id) && (audproc_cal_info->sample_rate == sample_rate) && (cal_block->cal_data.size > 0)) return cal_block; } else if (cal_index == ADM_AUDVOL_CAL) { audvol_cal_info = cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (audvol_cal_info->path == path) && (audvol_cal_info->app_type == app_type) && (audvol_cal_info->acdb_id == acdb_id) && (cal_block->cal_data.size > 0)) return cal_block; } } pr_debug("%s: Can't find ADM cal for buffer_number %d, cal_index %d, path %d, app %d, acdb_id %d sample_rate %d defaulting to search by app type\n", __func__, buffer_idx_w_path, cal_index, path, app_type, acdb_id, sample_rate); return adm_find_cal(cal_index, path, app_type, acdb_id, sample_rate); } static int adm_remap_and_send_cal_block(int cal_index, int port_id, static int adm_remap_and_send_cal_block(int cal_index, int port_id, int copp_idx, struct cal_block_data *cal_block, int perf_mode, int copp_idx, struct cal_block_data *cal_block, int perf_mode, int app_type, int acdb_id, int sample_rate) int app_type, int acdb_id, int sample_rate) Loading @@ -2309,7 +2357,7 @@ static int adm_remap_and_send_cal_block(int cal_index, int port_id, return ret; return ret; } } static void send_adm_cal_type(int cal_index, int path, int port_id, static void send_adm_cal_type(int fedai_id, int cal_index, int path, int port_id, int copp_idx, int perf_mode, int app_type, int copp_idx, int perf_mode, int app_type, int acdb_id, int sample_rate) int acdb_id, int sample_rate) { { Loading @@ -2328,7 +2376,7 @@ static void send_adm_cal_type(int cal_index, int path, int port_id, } } mutex_lock(&this_adm.cal_data[cal_index]->lock); mutex_lock(&this_adm.cal_data[cal_index]->lock); cal_block = adm_find_cal(cal_index, path, app_type, acdb_id, cal_block = adm_find_cal_by_buf_number(fedai_id, cal_index, path, app_type, acdb_id, sample_rate); sample_rate); if (cal_block == NULL) if (cal_block == NULL) goto unlock; goto unlock; Loading Loading @@ -2374,28 +2422,30 @@ static int get_cal_path(int path) return TX_DEVICE; return TX_DEVICE; } } static void send_adm_cal(int port_id, int copp_idx, int path, int perf_mode, static void send_adm_cal(int fedai_id, int port_id, int copp_idx, int path, int perf_mode, int app_type, int acdb_id, int sample_rate, int app_type, int acdb_id, int sample_rate, int passthr_mode) int passthr_mode) { { pr_debug("%s: port id 0x%x copp_idx %d\n", __func__, port_id, copp_idx); pr_debug("%s: port id 0x%x copp_idx %d\n", __func__, port_id, copp_idx); if (passthr_mode != LISTEN) { if (passthr_mode != LISTEN) { send_adm_cal_type(ADM_AUDPROC_CAL, path, port_id, copp_idx, send_adm_cal_type(fedai_id, ADM_AUDPROC_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); perf_mode, app_type, acdb_id, sample_rate); send_adm_cal_type(ADM_AUDPROC_PERSISTENT_CAL, path, /* send persistent cal only in case of record */ if (path == TX_DEVICE) send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_PERSISTENT_CAL, path, port_id, copp_idx, perf_mode, app_type, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); acdb_id, sample_rate); } else { } else { send_adm_cal_type(ADM_LSM_AUDPROC_CAL, path, port_id, copp_idx, send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); perf_mode, app_type, acdb_id, sample_rate); send_adm_cal_type(ADM_LSM_AUDPROC_PERSISTENT_CAL, path, send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_PERSISTENT_CAL, path, port_id, copp_idx, perf_mode, app_type, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); acdb_id, sample_rate); } } send_adm_cal_type(ADM_AUDVOL_CAL, path, port_id, copp_idx, perf_mode, send_adm_cal_type(fedai_id, ADM_AUDVOL_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); app_type, acdb_id, sample_rate); } } Loading Loading @@ -3614,6 +3664,7 @@ static void route_set_opcode_matrix_id( * adm_matrix_map - * adm_matrix_map - * command to send ADM matrix map for ADM copp list * command to send ADM matrix map for ADM copp list * * * @fedai_id: FrontEnd DAI ID * @path: direction or ADM path type * @path: direction or ADM path type * @payload_map: have info of session id and associated copp_idx/num_copps * @payload_map: have info of session id and associated copp_idx/num_copps * @perf_mode: performance mode like LL/ULL/.. * @perf_mode: performance mode like LL/ULL/.. Loading @@ -3621,7 +3672,7 @@ static void route_set_opcode_matrix_id( * * * Returns 0 on success or error on failure * Returns 0 on success or error on failure */ */ int adm_matrix_map(int path, struct route_payload payload_map, int perf_mode, int adm_matrix_map(int fedai_id, int path, struct route_payload payload_map, int perf_mode, uint32_t passthr_mode) uint32_t passthr_mode) { { struct adm_cmd_matrix_map_routings_v5 *route; struct adm_cmd_matrix_map_routings_v5 *route; Loading Loading @@ -3731,7 +3782,7 @@ int adm_matrix_map(int path, struct route_payload payload_map, int perf_mode, __func__, port_idx, copp_idx); __func__, port_idx, copp_idx); continue; continue; } } send_adm_cal(payload_map.port_id[i], copp_idx, send_adm_cal(fedai_id, payload_map.port_id[i], copp_idx, get_cal_path(path), perf_mode, get_cal_path(path), perf_mode, payload_map.app_type[i], payload_map.app_type[i], payload_map.acdb_dev_id[i], payload_map.acdb_dev_id[i], Loading include/dsp/q6adm-v2.h +2 −2 Original line number Original line Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */ /* /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ */ #ifndef __Q6_ADM_V2_H__ #ifndef __Q6_ADM_V2_H__ #define __Q6_ADM_V2_H__ #define __Q6_ADM_V2_H__ Loading Loading @@ -128,7 +128,7 @@ int adm_unmap_rtac_block(uint32_t *mem_map_handle); int adm_close(int port, int topology, int perf_mode); int adm_close(int port, int topology, int perf_mode); int adm_matrix_map(int path, struct route_payload payload_map, int adm_matrix_map(int fedai_id, int path, struct route_payload payload_map, int perf_mode, uint32_t passthr_mode); int perf_mode, uint32_t passthr_mode); int adm_connect_afe_port(int mode, int session_id, int port_id); int adm_connect_afe_port(int mode, int session_id, int port_id); Loading Loading
asoc/msm-pcm-routing-v2.c +58 −8 Original line number Original line Diff line number Diff line Loading @@ -1426,7 +1426,47 @@ static struct cal_block_data *msm_routing_find_topology(int path, cal_index); cal_index); } } static int msm_routing_find_topology_on_index(int session_type, int app_type, static struct cal_block_data *msm_routing_find_topology_by_buf_number(int usecase, int path, int app_type, int acdb_id, int cal_index, bool exact) { struct list_head *ptr, *next; struct cal_block_data *cal_block = NULL; struct audio_cal_info_adm_top *cal_info; int buffer_idx_w_path; pr_debug("%s\n", __func__); buffer_idx_w_path = path + MAX_SESSION_TYPES * usecase; list_for_each_safe(ptr, next, &cal_data[cal_index]->cal_blocks) { cal_block = list_entry(ptr, struct cal_block_data, list); if (cal_utils_is_cal_stale(cal_block)) continue; cal_info = (struct audio_cal_info_adm_top *) cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (cal_info->path == path) && (cal_info->app_type == app_type) && (cal_info->acdb_id == acdb_id)) { return cal_block; } } pr_debug("%s: Can't find topology for buffer_number %d, path %d, app %d, acdb_id %d %s\n", __func__, buffer_idx_w_path, path, app_type, acdb_id, exact ? "fail" : "defaulting to search by path, app_type and acdb_id"); return exact ? NULL : msm_routing_find_topology(path, app_type, acdb_id, cal_index, exact); } static int msm_routing_find_topology_on_index(int fedai_id, int session_type, int app_type, int acdb_dev_id, int idx, int acdb_dev_id, int idx, bool exact) bool exact) { { Loading @@ -1434,8 +1474,16 @@ static int msm_routing_find_topology_on_index(int session_type, int app_type, struct cal_block_data *cal_block = NULL; struct cal_block_data *cal_block = NULL; mutex_lock(&cal_data[idx]->lock); mutex_lock(&cal_data[idx]->lock); if (idx == ADM_TOPOLOGY_CAL_TYPE_IDX) cal_block = msm_routing_find_topology_by_buf_number(fedai_id, session_type, app_type, acdb_dev_id, idx, exact); else cal_block = msm_routing_find_topology(session_type, app_type, cal_block = msm_routing_find_topology(session_type, app_type, acdb_dev_id, idx, exact); acdb_dev_id, idx, exact); if (cal_block != NULL) { if (cal_block != NULL) { topology = ((struct audio_cal_info_adm_top *) topology = ((struct audio_cal_info_adm_top *) cal_block->cal_info)->topology; cal_block->cal_info)->topology; Loading Loading @@ -1466,14 +1514,16 @@ static int msm_routing_get_adm_topology(int fedai_id, int session_type, fe_dai_app_type_cfg[fedai_id][session_type][be_id].acdb_dev_id; fe_dai_app_type_cfg[fedai_id][session_type][be_id].acdb_dev_id; pr_debug("%s: Check for exact LSM topology\n", __func__); pr_debug("%s: Check for exact LSM topology\n", __func__); topology = msm_routing_find_topology_on_index(session_type, topology = msm_routing_find_topology_on_index(fedai_id, session_type, app_type, app_type, acdb_dev_id, acdb_dev_id, ADM_LSM_TOPOLOGY_CAL_TYPE_IDX, ADM_LSM_TOPOLOGY_CAL_TYPE_IDX, true /*exact*/); true /*exact*/); if (topology < 0) { if (topology < 0) { pr_debug("%s: Check for compatible topology\n", __func__); pr_debug("%s: Check for compatible topology\n", __func__); topology = msm_routing_find_topology_on_index(session_type, topology = msm_routing_find_topology_on_index(fedai_id, session_type, app_type, app_type, acdb_dev_id, acdb_dev_id, ADM_TOPOLOGY_CAL_TYPE_IDX, ADM_TOPOLOGY_CAL_TYPE_IDX, Loading Loading @@ -1540,7 +1590,7 @@ static void msm_pcm_routing_build_matrix(int fedai_id, int sess_type, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][sess_type].strm_id; payload.session_id = fe_dai_map[fedai_id][sess_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fedai_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } } } } Loading Loading @@ -1812,7 +1862,7 @@ int msm_pcm_routing_reg_phy_compr_stream(int fe_id, int perf_mode, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fe_id][session_type].strm_id; payload.session_id = fe_dai_map[fe_id][session_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fe_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } } mutex_unlock(&routing_lock); mutex_unlock(&routing_lock); Loading Loading @@ -2176,7 +2226,7 @@ int msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode, if (num_copps) { if (num_copps) { payload.num_copps = num_copps; payload.num_copps = num_copps; payload.session_id = fe_dai_map[fedai_id][session_type].strm_id; payload.session_id = fe_dai_map[fedai_id][session_type].strm_id; adm_matrix_map(path_type, payload, perf_mode, passthr_mode); adm_matrix_map(fedai_id, path_type, payload, perf_mode, passthr_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); msm_pcm_routng_cfg_matrix_map_pp(payload, path_type, perf_mode); } }
dsp/q6adm.c +61 −10 Original line number Original line Diff line number Diff line Loading @@ -2288,6 +2288,54 @@ static struct cal_block_data *adm_find_cal(int cal_index, int path, return adm_find_cal_by_app_type(cal_index, path, app_type); return adm_find_cal_by_app_type(cal_index, path, app_type); } } static struct cal_block_data *adm_find_cal_by_buf_number(int usecase, int cal_index, int path, int app_type, int acdb_id, int sample_rate) { struct list_head *ptr, *next; struct cal_block_data *cal_block = NULL; struct audio_cal_info_audproc *audproc_cal_info = NULL; struct audio_cal_info_audvol *audvol_cal_info = NULL; int buffer_idx_w_path; pr_debug("%s:\n", __func__); buffer_idx_w_path = path + MAX_PATH_TYPE * usecase; list_for_each_safe(ptr, next, &this_adm.cal_data[cal_index]->cal_blocks) { cal_block = list_entry(ptr, struct cal_block_data, list); if (cal_utils_is_cal_stale(cal_block)) continue; if (cal_index == ADM_AUDPROC_CAL || cal_index == ADM_LSM_AUDPROC_CAL || cal_index == ADM_LSM_AUDPROC_PERSISTENT_CAL) { audproc_cal_info = cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (audproc_cal_info->path == path) && (audproc_cal_info->app_type == app_type) && (audproc_cal_info->acdb_id == acdb_id) && (audproc_cal_info->sample_rate == sample_rate) && (cal_block->cal_data.size > 0)) return cal_block; } else if (cal_index == ADM_AUDVOL_CAL) { audvol_cal_info = cal_block->cal_info; if ((cal_block->buffer_number == buffer_idx_w_path) && (audvol_cal_info->path == path) && (audvol_cal_info->app_type == app_type) && (audvol_cal_info->acdb_id == acdb_id) && (cal_block->cal_data.size > 0)) return cal_block; } } pr_debug("%s: Can't find ADM cal for buffer_number %d, cal_index %d, path %d, app %d, acdb_id %d sample_rate %d defaulting to search by app type\n", __func__, buffer_idx_w_path, cal_index, path, app_type, acdb_id, sample_rate); return adm_find_cal(cal_index, path, app_type, acdb_id, sample_rate); } static int adm_remap_and_send_cal_block(int cal_index, int port_id, static int adm_remap_and_send_cal_block(int cal_index, int port_id, int copp_idx, struct cal_block_data *cal_block, int perf_mode, int copp_idx, struct cal_block_data *cal_block, int perf_mode, int app_type, int acdb_id, int sample_rate) int app_type, int acdb_id, int sample_rate) Loading @@ -2309,7 +2357,7 @@ static int adm_remap_and_send_cal_block(int cal_index, int port_id, return ret; return ret; } } static void send_adm_cal_type(int cal_index, int path, int port_id, static void send_adm_cal_type(int fedai_id, int cal_index, int path, int port_id, int copp_idx, int perf_mode, int app_type, int copp_idx, int perf_mode, int app_type, int acdb_id, int sample_rate) int acdb_id, int sample_rate) { { Loading @@ -2328,7 +2376,7 @@ static void send_adm_cal_type(int cal_index, int path, int port_id, } } mutex_lock(&this_adm.cal_data[cal_index]->lock); mutex_lock(&this_adm.cal_data[cal_index]->lock); cal_block = adm_find_cal(cal_index, path, app_type, acdb_id, cal_block = adm_find_cal_by_buf_number(fedai_id, cal_index, path, app_type, acdb_id, sample_rate); sample_rate); if (cal_block == NULL) if (cal_block == NULL) goto unlock; goto unlock; Loading Loading @@ -2374,28 +2422,30 @@ static int get_cal_path(int path) return TX_DEVICE; return TX_DEVICE; } } static void send_adm_cal(int port_id, int copp_idx, int path, int perf_mode, static void send_adm_cal(int fedai_id, int port_id, int copp_idx, int path, int perf_mode, int app_type, int acdb_id, int sample_rate, int app_type, int acdb_id, int sample_rate, int passthr_mode) int passthr_mode) { { pr_debug("%s: port id 0x%x copp_idx %d\n", __func__, port_id, copp_idx); pr_debug("%s: port id 0x%x copp_idx %d\n", __func__, port_id, copp_idx); if (passthr_mode != LISTEN) { if (passthr_mode != LISTEN) { send_adm_cal_type(ADM_AUDPROC_CAL, path, port_id, copp_idx, send_adm_cal_type(fedai_id, ADM_AUDPROC_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); perf_mode, app_type, acdb_id, sample_rate); send_adm_cal_type(ADM_AUDPROC_PERSISTENT_CAL, path, /* send persistent cal only in case of record */ if (path == TX_DEVICE) send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_PERSISTENT_CAL, path, port_id, copp_idx, perf_mode, app_type, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); acdb_id, sample_rate); } else { } else { send_adm_cal_type(ADM_LSM_AUDPROC_CAL, path, port_id, copp_idx, send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); perf_mode, app_type, acdb_id, sample_rate); send_adm_cal_type(ADM_LSM_AUDPROC_PERSISTENT_CAL, path, send_adm_cal_type(fedai_id, ADM_LSM_AUDPROC_PERSISTENT_CAL, path, port_id, copp_idx, perf_mode, app_type, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); acdb_id, sample_rate); } } send_adm_cal_type(ADM_AUDVOL_CAL, path, port_id, copp_idx, perf_mode, send_adm_cal_type(fedai_id, ADM_AUDVOL_CAL, path, port_id, copp_idx, perf_mode, app_type, acdb_id, sample_rate); app_type, acdb_id, sample_rate); } } Loading Loading @@ -3614,6 +3664,7 @@ static void route_set_opcode_matrix_id( * adm_matrix_map - * adm_matrix_map - * command to send ADM matrix map for ADM copp list * command to send ADM matrix map for ADM copp list * * * @fedai_id: FrontEnd DAI ID * @path: direction or ADM path type * @path: direction or ADM path type * @payload_map: have info of session id and associated copp_idx/num_copps * @payload_map: have info of session id and associated copp_idx/num_copps * @perf_mode: performance mode like LL/ULL/.. * @perf_mode: performance mode like LL/ULL/.. Loading @@ -3621,7 +3672,7 @@ static void route_set_opcode_matrix_id( * * * Returns 0 on success or error on failure * Returns 0 on success or error on failure */ */ int adm_matrix_map(int path, struct route_payload payload_map, int perf_mode, int adm_matrix_map(int fedai_id, int path, struct route_payload payload_map, int perf_mode, uint32_t passthr_mode) uint32_t passthr_mode) { { struct adm_cmd_matrix_map_routings_v5 *route; struct adm_cmd_matrix_map_routings_v5 *route; Loading Loading @@ -3731,7 +3782,7 @@ int adm_matrix_map(int path, struct route_payload payload_map, int perf_mode, __func__, port_idx, copp_idx); __func__, port_idx, copp_idx); continue; continue; } } send_adm_cal(payload_map.port_id[i], copp_idx, send_adm_cal(fedai_id, payload_map.port_id[i], copp_idx, get_cal_path(path), perf_mode, get_cal_path(path), perf_mode, payload_map.app_type[i], payload_map.app_type[i], payload_map.acdb_dev_id[i], payload_map.acdb_dev_id[i], Loading
include/dsp/q6adm-v2.h +2 −2 Original line number Original line Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */ /* /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ */ #ifndef __Q6_ADM_V2_H__ #ifndef __Q6_ADM_V2_H__ #define __Q6_ADM_V2_H__ #define __Q6_ADM_V2_H__ Loading Loading @@ -128,7 +128,7 @@ int adm_unmap_rtac_block(uint32_t *mem_map_handle); int adm_close(int port, int topology, int perf_mode); int adm_close(int port, int topology, int perf_mode); int adm_matrix_map(int path, struct route_payload payload_map, int adm_matrix_map(int fedai_id, int path, struct route_payload payload_map, int perf_mode, uint32_t passthr_mode); int perf_mode, uint32_t passthr_mode); int adm_connect_afe_port(int mode, int session_id, int port_id); int adm_connect_afe_port(int mode, int session_id, int port_id); Loading