Преглед на файлове

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 <[email protected]>
kunleiz преди 6 години
родител
ревизия
1529b55bb8
променени са 2 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 7 1
      dsp/q6adm.c
  2. 4 0
      include/dsp/apr_audio-v2.h

+ 7 - 1
dsp/q6adm.c

@@ -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;

+ 4 - 0
include/dsp/apr_audio-v2.h

@@ -254,6 +254,9 @@ struct adm_cmd_matrix_map_routings_v5 {
 /* Sample rate is 16000 Hz.*/
 #define ADM_CMD_COPP_OPEN_SAMPLE_RATE_16K 16000
 
+/* Sample rate is 32000 Hz.*/
+#define ADM_CMD_COPP_OPEN_SAMPLE_RATE_32K 32000
+
 /* Sample rate is 48000 Hz.*/
 #define ADM_CMD_COPP_OPEN_SAMPLE_RATE_48K 48000
 
@@ -5082,6 +5085,7 @@ struct afe_param_id_lpass_core_shared_clk_cfg {
 #define VPM_TX_DM_RFECNS_COPP_TOPOLOGY			0x00010F86
 #define ADM_CMD_COPP_OPEN_TOPOLOGY_ID_DTS_HPX		0x10015002
 #define ADM_CMD_COPP_OPEN_TOPOLOGY_ID_AUDIOSPHERE	0x10028000
+#define VPM_TX_DM_FLUENCE_EF_COPP_TOPOLOGY		0x10000005
 
 /* Memory map regions command payload used by the
  * #ASM_CMD_SHARED_MEM_MAP_REGIONS ,#ADM_CMD_SHARED_MEM_MAP_REGIONS