dsp: adm: change sample rate for FLUENCE_EF module

FLUENCE_EF module in COPreP topology doesn't support
44.1Khz sample rate. Set sample rate to 16Khz for
VPM_TX_DM_FLUENCE_EF_COPP_TOPOLOGY, which contains
FLUENCE_EF module.

Change-Id: I527da1a70cacba1014b2a706216172d12066b909
Signed-off-by: kunleiz <kunleiz@codeaurora.org>
This commit is contained in:
kunleiz
2019-01-24 17:15:49 +08:00
committed by Gerrit - the friendly Code Review server
parent 5bb681434b
commit 1529b55bb8
2 changed files with 11 additions and 1 deletions

View File

@@ -2784,8 +2784,14 @@ 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_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) &&
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_32K) &&
(rate != ADM_CMD_COPP_OPEN_SAMPLE_RATE_48K))
rate = 16000;
}
if (topology == VPM_TX_VOICE_SMECNS_V2_COPP_TOPOLOGY)
channel_mode = 1;