Merge "dsp: adm: use default rate for unsupported sample rates"

This commit is contained in:
qctecmdr
2019-09-21 22:14:56 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -3044,8 +3044,6 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
}
if ((topology == VPM_TX_SM_ECNS_V2_COPP_TOPOLOGY) ||
(topology == VPM_TX_DM_FLUENCE_COPP_TOPOLOGY) ||
(topology == VPM_TX_DM_RFECNS_COPP_TOPOLOGY)||
(topology == VPM_TX_DM_FLUENCE_EF_COPP_TOPOLOGY)) {
if ((rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_8K) &&
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_16K) &&
@@ -3053,6 +3051,13 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_48K))
rate = 16000;
}
if ((topology == VPM_TX_DM_FLUENCE_COPP_TOPOLOGY) ||
(topology == VPM_TX_DM_RFECNS_COPP_TOPOLOGY)) {
if ((rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_8K) &&
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_16K) &&
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_32K))
rate = 16000;
}
if (topology == FFECNS_TOPOLOGY) {
this_adm.ffecns_port_id = port_id;