diff --git a/audio/comet/aidl_config/audio_platform_configuration.xml b/audio/comet/aidl_config/audio_platform_configuration.xml
index cf34984..ff3c1ad 100644
--- a/audio/comet/aidl_config/audio_platform_configuration.xml
+++ b/audio/comet/aidl_config/audio_platform_configuration.xml
@@ -64,7 +64,7 @@
-
+
diff --git a/audio/comet/audio-tables.mk b/audio/comet/audio-tables.mk
index 8cf9277..49123f8 100644
--- a/audio/comet/audio-tables.mk
+++ b/audio/comet/audio-tables.mk
@@ -60,6 +60,8 @@ PRODUCT_PACKAGES += \
mcps.dat \
waves_config.ini \
waves_preset.mps \
+ waves_config_nx.ini \
+ waves_preset_nx.mps \
compens_spk_l_1.conf \
compens_spk_l_2.conf \
compens_spk_r_1.conf \
@@ -89,3 +91,7 @@ PRODUCT_PACKAGES += \
vendor.google.whitechapel.audio.hal.effect.spatializer.mode_2_ch \
vendor.google.whitechapel.audio.hal.effect.spatializer.mode_6_ch \
vendor.google.whitechapel.audio.hal.effect.spatializer.mode_xaural
+
+# Waves nx config
+PRODUCT_PACKAGES += \
+ libNX_Google_Pixel_Android
diff --git a/audio/comet/tuning/Android.bp b/audio/comet/tuning/Android.bp
index 6ce2280..9408763 100644
--- a/audio/comet/tuning/Android.bp
+++ b/audio/comet/tuning/Android.bp
@@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
soong_namespace {}
+
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
@@ -21,111 +22,145 @@ package {
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["device_google_comet_license"],
}
+
prebuilt_defaults {
name: "aoc_defaults",
soc_specific: true,
sub_dir: "aoc",
}
+
prebuilt_etc {
name: "recording.gatf",
src: "bluenote/recording.gatf",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "smartfeature.gstf",
src: "bluenote/smartfeature.gstf",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "template.xml",
src: "bluenote/template.xml",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "tuning_constraints_combination.xml",
src: "bluenote/tuning_constraints_combination.xml",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "compens_spk_l_1.conf",
src: "compensation/compens_spk_l_1.conf",
soc_specific: true,
}
+
prebuilt_etc {
name: "compens_spk_l_2.conf",
src: "compensation/compens_spk_l_2.conf",
soc_specific: true,
}
+
prebuilt_etc {
name: "compens_spk_r_1.conf",
src: "compensation/compens_spk_r_1.conf",
soc_specific: true,
}
+
prebuilt_etc {
name: "compens_spk_r_2.conf",
src: "compensation/compens_spk_r_2.conf",
soc_specific: true,
}
+
prebuilt_etc {
name: "BLUETOOTH.dat",
src: "fortemedia/BLUETOOTH.dat",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "BLUETOOTH.mods",
src: "fortemedia/BLUETOOTH.mods",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HANDSFREE.dat",
src: "fortemedia/HANDSFREE.dat",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HANDSFREE.mods",
src: "fortemedia/HANDSFREE.mods",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HANDSET.dat",
src: "fortemedia/HANDSET.dat",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HANDSET.mods",
src: "fortemedia/HANDSET.mods",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HEADSET.dat",
src: "fortemedia/HEADSET.dat",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "HEADSET.mods",
src: "fortemedia/HEADSET.mods",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "mcps.dat",
src: "fortemedia/mcps.dat",
defaults: ["aoc_defaults"],
}
+
prebuilt_etc {
name: "waves_config.ini",
src: "waves/waves_config.ini",
soc_specific: true,
}
+
prebuilt_etc {
name: "waves_preset.mps",
src: "waves/waves_preset.mps",
soc_specific: true,
}
+
+prebuilt_etc {
+ name: "waves_config_nx.ini",
+ src: "waves/waves_config_nx.ini",
+ soc_specific: true,
+}
+
+prebuilt_etc {
+ name: "waves_preset_nx.mps",
+ src: "waves/waves_preset_nx.mps",
+ soc_specific: true,
+}
+
prebuilt_etc {
name: "test_config.ini",
src: "waves/tests/test_config.ini",
soc_specific: true,
}
+
prebuilt_etc {
name: "test_preset.mps",
src: "waves/tests/test_preset.mps",
diff --git a/audio/comet/tuning/waves/waves_config.ini b/audio/comet/tuning/waves/waves_config.ini
index 911360a..ad00ce9 100644
--- a/audio/comet/tuning/waves/waves_config.ini
+++ b/audio/comet/tuning/waves/waves_config.ini
@@ -27,19 +27,21 @@ OST_SPEAKER = 0:12,90:13,180:12,270:0|13
########################################################################################################
[HAL_SUPPORTED_PRESETS]
SPEAKER_MUSIC_FOLDED_THROTTLE= OM:1,SM:3,OST:OST_SPEAKER
+SPEAKER_MUSIC_FOLDED_THROTTLE_NX= OM:1,SM:3,ST:16,OST:OST_SPEAKER
SPEAKER_MUSIC_UNFOLDED_THROTTLE= OM:9,SM:3,OST:OST_SPEAKER
+SPEAKER_MUSIC_UNFOLDED_THROTTLE_NX= OM:9,SM:3,ST:16,OST:OST_SPEAKER
SPEAKER_MUSIC_CLAMSHELL_THROTTLE= OM:60,SM:3,OST:OST_SPEAKER
+SPEAKER_MUSIC_CLAMSHELL_THROTTLE_NX= OM:60,SM:3,ST:16,OST:OST_SPEAKER
SPEAKER_SAFE_MUSIC_THROTTLE = OM:10,SM:3,OST:OST_SPEAKER
SPEAKER_SAFE_MUSIC_THROTTLE_LITE = OM:8,SM:3
SPEAKER_MUSIC_FOLDED = OM:1,SM:2,OST:OST_SPEAKER
+SPEAKER_MUSIC_FOLDED_NX = OM:1,SM:2,ST:16,OST:OST_SPEAKER
SPEAKER_MUSIC_UNFOLDED = OM:9,SM:2,OST:OST_SPEAKER
+SPEAKER_MUSIC_UNFOLDED_NX = OM:9,SM:2,ST:16,OST:OST_SPEAKER
SPEAKER_MUSIC_CLAMSHELL = OM:60,SM:2,OST:OST_SPEAKER
+SPEAKER_MUSIC_CLAMSHELL_NX = OM:60,SM:2,ST:16,OST:OST_SPEAKER
SPEAKER_SAFE_MUSIC = OM:10,SM:2,OST:OST_SPEAKER
SPEAKER_SAFE_MUSIC_LITE = OM:8,SM:2
-SPEAKER_MUSIC_RESERVED_UNFOLDED = OM:11,SM:2,OST:OST_SPEAKER
-SPEAKER_MUSIC_RESERVED_CLAMSHELL = OM:12,SM:2,OST:OST_SPEAKER
-SPEAKER_MUSIC_RESERVED_UNFOLDED_THROTTLE = OM:11,SM:3,OST:OST_SPEAKER
-SPEAKER_MUSIC_RESERVED_CLAMSHELL_THROTTLE = OM:12,SM:3,OST:OST_SPEAKER
########################################################################################################
# This defines available CONTROL configurations. Only define the CONTROL if you need it.
@@ -47,7 +49,7 @@ SPEAKER_MUSIC_RESERVED_CLAMSHELL_THROTTLE = OM:12,SM:3,OST:OST_SPEAKER
# This can be configured by Waves or platform vendor.
########################################################################################################
[HAL_SUPPORTED_CONTROLS]
-SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC_FOLDED_THROTTLE|SPEAKER_MUSIC_UNFOLDED_THROTTLE|SPEAKER_MUSIC_CLAMSHELL_THROTTLE|SPEAKER_MUSIC_RESERVED_CLAMSHELL_THROTTLE|SPEAKER_MUSIC_RESERVED_UNFOLDED_THROTTLE|SPEAKER_SAFE_MUSIC_THROTTLE|SPEAKER_MUSIC_FOLDED|SPEAKER_MUSIC_UNFOLDED|SPEAKER_MUSIC_CLAMSHELL|SPEAKER_MUSIC_RESERVED_UNFOLDED|SPEAKER_MUSIC_RESERVED_CLAMSHELL|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_MUSIC_LITE|SPEAKER_SAFE_MUSIC_THROTTLE_LITE
+SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC_FOLDED_THROTTLE|SPEAKER_MUSIC_FOLDED_THROTTLE_NX|SPEAKER_MUSIC_UNFOLDED_THROTTLE|SPEAKER_MUSIC_UNFOLDED_THROTTLE_NX|SPEAKER_MUSIC_CLAMSHELL_THROTTLE|SPEAKER_MUSIC_CLAMSHELL_THROTTLE_NX|SPEAKER_SAFE_MUSIC_THROTTLE|SPEAKER_MUSIC_FOLDED|SPEAKER_MUSIC_FOLDED_NX|SPEAKER_MUSIC_UNFOLDED|SPEAKER_MUSIC_UNFOLDED_NX|SPEAKER_MUSIC_CLAMSHELL|SPEAKER_MUSIC_CLAMSHELL_NX|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_MUSIC_LITE|SPEAKER_SAFE_MUSIC_THROTTLE_LITE
[COEFS_CONVERTER_SETTING]
AlgFxPath=/vendor/lib/libAlgFx_HiFi3z.so
@@ -62,25 +64,25 @@ AlgFxPath64=/vendor/lib64/libAlgFx_HiFi3z.so
[CUSTOM_ACTION_257]
CASE_1=PRIORITY:0,NUMBERS:2:0|1:1|2:0|3:0,PRESET:SPEAKER_MUSIC_FOLDED
-CASE_2=PRIORITY:1,NUMBERS:2:0|1:1|2:1:0,PRESET:SPEAKER_MUSIC_CLAMSHELL
-CASE_3=PRIORITY:2,NUMBERS:2:0|1:1|2:2:0,PRESET:SPEAKER_MUSIC_UNFOLDED
-CASE_4=PRIORITY:3,NUMBERS:1|2|4194304:2|3|4:1|2:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_LITE
-CASE_5=PRIORITY:4,NUMBERS:1|4194304:0|1:1|2:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC
-CASE_6=PRIORITY:5,NUMBERS:2:0|1:0:0|3:0|1,PRESET:SPEAKER_MUSIC_FOLDED_THROTTLE
-CASE_7=PRIORITY:6,NUMBERS:2:0|1:0:1:0,PRESET:SPEAKER_MUSIC_CLAMSHELL_THROTTLE
-CASE_8=PRIORITY:7,NUMBERS:2:0|1:0:2:0,PRESET:SPEAKER_MUSIC_UNFOLDED_THROTTLE
-CASE_9=PRIORITY:8,NUMBERS:1|2|4194304:2|3|4:0:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_THROTTLE_LITE
-CASE_10=PRIORITY:9,NUMBERS:1|4194304:0|1:0:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_THROTTLE
-CASE_11=PRIORITY:10,NUMBERS:2:0|1:1|2:0|2:1,PRESET:SPEAKER_MUSIC_RESERVED_UNFOLDED
-CASE_12=PRIORITY:11,NUMBERS:2:0|1:1|2:1:1,PRESET:SPEAKER_MUSIC_RESERVED_CLAMSHELL
-CASE_13=PRIORITY:12,NUMBERS:2:0|1:0:0|2:1,PRESET:SPEAKER_MUSIC_RESERVED_UNFOLDED_THROTTLE
-CASE_14=PRIORITY:13,NUMBERS:2:0|1:0:1:1,PRESET:SPEAKER_MUSIC_RESERVED_CLAMSHELL_THROTTLE
-
+CASE_2=PRIORITY:1,NUMBERS:2:0|1:1|2:0|3:1,PRESET:SPEAKER_MUSIC_FOLDED_NX
+CASE_3=PRIORITY:2,NUMBERS:2:0|1:1|2:1:0,PRESET:SPEAKER_MUSIC_CLAMSHELL
+CASE_4=PRIORITY:3,NUMBERS:2:0|1:1|2:1:1,PRESET:SPEAKER_MUSIC_CLAMSHELL_NX
+CASE_5=PRIORITY:4,NUMBERS:2:0|1:1|2:2:0,PRESET:SPEAKER_MUSIC_UNFOLDED
+CASE_6=PRIORITY:5,NUMBERS:2:0|1:1|2:2:1,PRESET:SPEAKER_MUSIC_UNFOLDED_NX
+CASE_7=PRIORITY:6,NUMBERS:1|2|4194304:2|3|4:1|2:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_LITE
+CASE_8=PRIORITY:7,NUMBERS:1|4194304:0|1:1|2:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC
+CASE_9=PRIORITY:8,NUMBERS:2:0|1:0:0|3:0|1,PRESET:SPEAKER_MUSIC_FOLDED_THROTTLE
+CASE_10=PRIORITY:9,NUMBERS:2:0|1:0:0|3:0|1,PRESET:SPEAKER_MUSIC_FOLDED_THROTTLE_NX
+CASE_11=PRIORITY:10,NUMBERS:2:0|1:0:1:0,PRESET:SPEAKER_MUSIC_CLAMSHELL_THROTTLE
+CASE_12=PRIORITY:11,NUMBERS:2:0|1:0:1:0,PRESET:SPEAKER_MUSIC_CLAMSHELL_THROTTLE_NX
+CASE_13=PRIORITY:12,NUMBERS:2:0|1:0:2:0,PRESET:SPEAKER_MUSIC_UNFOLDED_THROTTLE
+CASE_14=PRIORITY:13,NUMBERS:2:0|1:0:2:0,PRESET:SPEAKER_MUSIC_UNFOLDED_THROTTLE_NX
+CASE_15=PRIORITY:14,NUMBERS:1|2|4194304:2|3|4:0:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_THROTTLE_LITE
+CASE_16=PRIORITY:15,NUMBERS:1|4194304:0|1:0:0|1|2|3:0|1,PRESET:SPEAKER_SAFE_MUSIC_THROTTLE
# Action 257 parameters: audio_devices_t, audio_mode_t, throttle_control_state_t, folded_type_t, sound_usage_t
# - audio_devices_t : current active device
# - audio_mode_t : 0 - normal, 1 - incoming, 2 - voice call, 3 - voip
# - throttle_control_state_t: 0 - Enabled, 1 - Disabled, 2 - Bypassed
# - folded_type_t: 0 - Close, 1 -Clamshell, 2 - Open, 3 - unknown
-# - sound_usage_t: 0 - Music, 1 - Movie
-
+# - sound_usage_t: 0 - NX_off, 1 - NX_on
diff --git a/audio/comet/tuning/waves/waves_config_nx.ini b/audio/comet/tuning/waves/waves_config_nx.ini
new file mode 100644
index 0000000..bc3b8c2
--- /dev/null
+++ b/audio/comet/tuning/waves/waves_config_nx.ini
@@ -0,0 +1,62 @@
+########################################################################################################
+# (Optional) The supported features list for platform vendors to query from.
+# Platform vendors should call maxxaudio_qdsp_is_feature_supported with a string to query from the list.
+# This config has no effect in the MaxxAudioQdspHalController. It's only meaningful for platform vendors.
+# Putting any value other than 1 would be equivalent to not supported.
+########################################################################################################
+[HAL_SUPPORTED_FEATURES]
+CUSTOM_ACTION_261=1
+
+########################################################################################################
+# This defined the options of supported sample rates.
+# This can be configured by Waves or platform vendor.
+########################################################################################################
+[HAL_SUPPORTED_SAMPLE_RATES]
+SR_COMMON = 48000
+
+########################################################################################################
+# (Optional) The subtypes that applies to different angles(0, 90, 180, 270). Can be empty if not applicable.
+# This can be configured by Waves or platform vendor.
+########################################################################################################
+[HAL_ORIENTATION_SUBTYPES]
+OST_SPEAKER = 0:12,90:13,180:12,270:13
+
+########################################################################################################
+# This defines available preset configurations.
+# This should be configured by Waves only unless platform vendor is familiar with MPS structure.
+########################################################################################################
+[HAL_SUPPORTED_PRESETS]
+SPEAKER_MUSIC_FOLDED = OM:1,SM:2,OST:OST_SPEAKER
+SPEAKER_MUSIC_UNFOLDED = OM:9,SM:2,OST:OST_SPEAKER
+SPEAKER_MUSIC_CLAMSHELL = OM:60,SM:2,OST:OST_SPEAKER
+# _RESERVED OM and SM are temporary and will be updated with tuning file.
+
+########################################################################################################
+# This defines available CONTROL configurations. Only define the CONTROL if you need it.
+# The numbers could vary from device to device.
+# This can be configured by Waves or platform vendor.
+########################################################################################################
+[HAL_SUPPORTED_CONTROLS]
+SPEAKER_INSTANCE = INSTANCE:1,DEV:1,SR:SR_COMMON,PRESET:SPEAKER_MUSIC_FOLDED|SPEAKER_MUSIC_UNFOLDED|SPEAKER_MUSIC_CLAMSHELL
+
+[MAXXEFFECT_SETTING]
+MaxxEffectLibPath=/vendor/lib/libNX_Google_Pixel_Android.so
+MaxxEffectLibPath64=/vendor/lib64/libNX_Google_Pixel_Android.so
+#IN_SampleRate=48000
+IN_NumChannels=6
+#IN_SamplesFormat=3
+#IN_SamplesLayout=0
+#IN_FrameSize=4
+#OUT_SampleRate=48000
+#OUT_NumChannels=2
+#OUT_SamplesFormat=3
+#OUT_SamplesLayout=0
+#OUT_FrameSize=4
+
+[CUSTOM_ACTION_261]
+CASE_1=PRIORITY:0,NUMBERS:0|3,PRESET:SPEAKER_MUSIC_FOLDED
+CASE_2=PRIORITY:1,NUMBERS:1,PRESET:SPEAKER_MUSIC_CLAMSHELL
+CASE_3=PRIORITY:2,NUMBERS:2,PRESET:SPEAKER_MUSIC_UNFOLDED
+
+# Action 261 parameters: folded_type_t
+# - folded_type_t: 0 - Close, 1 -Clamshell, 2 - Open, 3 - unknown
diff --git a/audio/comet/tuning/waves/waves_preset.mps b/audio/comet/tuning/waves/waves_preset.mps
index 397226d..b8a8202 100644
Binary files a/audio/comet/tuning/waves/waves_preset.mps and b/audio/comet/tuning/waves/waves_preset.mps differ
diff --git a/audio/comet/tuning/waves/waves_preset_nx.mps b/audio/comet/tuning/waves/waves_preset_nx.mps
new file mode 100644
index 0000000..2ee4e31
Binary files /dev/null and b/audio/comet/tuning/waves/waves_preset_nx.mps differ