Loading sound/soc/msm/qdsp6/q6adm.c +23 −15 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ struct adm_ctl { atomic_t copp_stat[AFE_MAX_PORTS]; wait_queue_head_t wait; int ec_ref_rx; int prev_index; }; static struct acdb_cal_block mem_addr_audproc[MAX_AUDPROC_TYPES]; Loading Loading @@ -667,6 +668,8 @@ static void send_adm_cal(int port_id, int path) int result = 0; s32 acdb_path; struct acdb_cal_block aud_cal; int flag = 0; int index = afe_get_port_index(port_id); pr_debug("%s\n", __func__); Loading Loading @@ -695,13 +698,16 @@ static void send_adm_cal(int port_id, int path) else mem_addr_audproc[acdb_path] = aud_cal; } if (this_adm.prev_index != index) { if (!send_adm_cal_block(port_id, &aud_cal)) pr_debug("%s: Audproc cal sent for port id: %d, path %d\n", __func__, port_id, acdb_path); else pr_debug("%s: Audproc cal not sent for port id: %d, path %d\n", __func__, port_id, acdb_path); this_adm.prev_index = index; flag = 1; } pr_debug("%s: Sending audvol cal\n", __func__); get_audvol_cal(acdb_path, &aud_cal); Loading @@ -724,7 +730,7 @@ static void send_adm_cal(int port_id, int path) else mem_addr_audvol[acdb_path] = aud_cal; } if ((this_adm.prev_index == index) && (flag == 1)) { if (!send_adm_cal_block(port_id, &aud_cal)) pr_debug("%s: Audvol cal sent for port id: %d, path %d\n", __func__, port_id, acdb_path); Loading @@ -733,6 +739,8 @@ static void send_adm_cal(int port_id, int path) __func__, port_id, acdb_path); } } int adm_connect_afe_port(int mode, int session_id, int port_id) { struct adm_cmd_connect_afe_port cmd; Loading Loading @@ -1621,7 +1629,7 @@ int adm_close(int port_id) atomic_set(&this_adm.copp_id[index], RESET_COPP_ID); atomic_set(&this_adm.copp_stat[index], 0); this_adm.prev_index = 0xffff; pr_debug("%s:coppid %d portid=%d index=%d coppcnt=%d\n", __func__, Loading Loading @@ -1658,7 +1666,7 @@ static int __init adm_init(void) int i = 0; init_waitqueue_head(&this_adm.wait); this_adm.apr = NULL; this_adm.prev_index = 0xffff; for (i = 0; i < AFE_MAX_PORTS; i++) { atomic_set(&this_adm.copp_id[i], RESET_COPP_ID); atomic_set(&this_adm.copp_cnt[i], 0); Loading Loading
sound/soc/msm/qdsp6/q6adm.c +23 −15 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ struct adm_ctl { atomic_t copp_stat[AFE_MAX_PORTS]; wait_queue_head_t wait; int ec_ref_rx; int prev_index; }; static struct acdb_cal_block mem_addr_audproc[MAX_AUDPROC_TYPES]; Loading Loading @@ -667,6 +668,8 @@ static void send_adm_cal(int port_id, int path) int result = 0; s32 acdb_path; struct acdb_cal_block aud_cal; int flag = 0; int index = afe_get_port_index(port_id); pr_debug("%s\n", __func__); Loading Loading @@ -695,13 +698,16 @@ static void send_adm_cal(int port_id, int path) else mem_addr_audproc[acdb_path] = aud_cal; } if (this_adm.prev_index != index) { if (!send_adm_cal_block(port_id, &aud_cal)) pr_debug("%s: Audproc cal sent for port id: %d, path %d\n", __func__, port_id, acdb_path); else pr_debug("%s: Audproc cal not sent for port id: %d, path %d\n", __func__, port_id, acdb_path); this_adm.prev_index = index; flag = 1; } pr_debug("%s: Sending audvol cal\n", __func__); get_audvol_cal(acdb_path, &aud_cal); Loading @@ -724,7 +730,7 @@ static void send_adm_cal(int port_id, int path) else mem_addr_audvol[acdb_path] = aud_cal; } if ((this_adm.prev_index == index) && (flag == 1)) { if (!send_adm_cal_block(port_id, &aud_cal)) pr_debug("%s: Audvol cal sent for port id: %d, path %d\n", __func__, port_id, acdb_path); Loading @@ -733,6 +739,8 @@ static void send_adm_cal(int port_id, int path) __func__, port_id, acdb_path); } } int adm_connect_afe_port(int mode, int session_id, int port_id) { struct adm_cmd_connect_afe_port cmd; Loading Loading @@ -1621,7 +1629,7 @@ int adm_close(int port_id) atomic_set(&this_adm.copp_id[index], RESET_COPP_ID); atomic_set(&this_adm.copp_stat[index], 0); this_adm.prev_index = 0xffff; pr_debug("%s:coppid %d portid=%d index=%d coppcnt=%d\n", __func__, Loading Loading @@ -1658,7 +1666,7 @@ static int __init adm_init(void) int i = 0; init_waitqueue_head(&this_adm.wait); this_adm.apr = NULL; this_adm.prev_index = 0xffff; for (i = 0; i < AFE_MAX_PORTS; i++) { atomic_set(&this_adm.copp_id[i], RESET_COPP_ID); atomic_set(&this_adm.copp_cnt[i], 0); Loading