Merge "audio: update audio_platform and mixer" into qt-qpr1-dev
diff --git a/audio/acdbdata/Bluetooth_cal.acdb b/audio/acdbdata/Bluetooth_cal.acdb
index be9007c..8a85d35 100644
--- a/audio/acdbdata/Bluetooth_cal.acdb
+++ b/audio/acdbdata/Bluetooth_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/General_cal.acdb b/audio/acdbdata/General_cal.acdb
index 5b7455b..dcee848 100644
--- a/audio/acdbdata/General_cal.acdb
+++ b/audio/acdbdata/General_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/Global_cal.acdb b/audio/acdbdata/Global_cal.acdb
index 76f8a84..a26596e 100644
--- a/audio/acdbdata/Global_cal.acdb
+++ b/audio/acdbdata/Global_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/Handset_cal.acdb b/audio/acdbdata/Handset_cal.acdb
index 36fda6f..7e16ad2 100644
--- a/audio/acdbdata/Handset_cal.acdb
+++ b/audio/acdbdata/Handset_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/Hdmi_cal.acdb b/audio/acdbdata/Hdmi_cal.acdb
index f0cf359..d29437e 100644
--- a/audio/acdbdata/Hdmi_cal.acdb
+++ b/audio/acdbdata/Hdmi_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/Headset_cal.acdb b/audio/acdbdata/Headset_cal.acdb
index a96c6d5..9c8da6e 100644
--- a/audio/acdbdata/Headset_cal.acdb
+++ b/audio/acdbdata/Headset_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/Speaker_cal.acdb b/audio/acdbdata/Speaker_cal.acdb
index cd4fd76..bd32fe6 100644
--- a/audio/acdbdata/Speaker_cal.acdb
+++ b/audio/acdbdata/Speaker_cal.acdb
Binary files differ
diff --git a/audio/acdbdata/adsp_avs_config.acdb b/audio/acdbdata/adsp_avs_config.acdb
index 1e9f933..b9c6dc6 100644
--- a/audio/acdbdata/adsp_avs_config.acdb
+++ b/audio/acdbdata/adsp_avs_config.acdb
Binary files differ
diff --git a/audio/acdbdata/workspaceFile.qwsp b/audio/acdbdata/workspaceFile.qwsp
index 3f34ad3..d14812a 100644
--- a/audio/acdbdata/workspaceFile.qwsp
+++ b/audio/acdbdata/workspaceFile.qwsp
Binary files differ
diff --git a/audio/mixer_paths_bolero_snd.xml b/audio/mixer_paths_bolero_snd.xml
index 3fff231..4713349 100644
--- a/audio/mixer_paths_bolero_snd.xml
+++ b/audio/mixer_paths_bolero_snd.xml
@@ -485,7 +485,7 @@
 
     <!-- CS35L41 config -->
     <!-- QCT QUIN TDM settings -->
-    <ctl name="QUIN_TDM_RX_0 Channels" value="Four" />
+    <ctl name="QUIN_TDM_RX_0 Channels" value="Two" />
     <ctl name="QUIN_TDM_TX_0 Channels" value="Four" />
     <ctl name="QUIN_TDM_RX_0 Format" value="S32_LE" />
     <ctl name="QUIN_TDM_TX_0 Format" value="S32_LE" />
diff --git a/bramble/BoardConfig.mk b/bramble/BoardConfig.mk
index ddfbf19..c6c7819 100644
--- a/bramble/BoardConfig.mk
+++ b/bramble/BoardConfig.mk
@@ -34,7 +34,9 @@
 TARGET_RECOVERY_UI_LIB := \
   librecovery_ui_bramble \
   libnos_citadel_for_recovery \
-  libnos_for_recovery
+  libnos_for_recovery \
+  libbootloader_message \
+  libfstab
 
 TARGET_FS_CONFIG_GEN := device/google/bramble/config.fs
 
diff --git a/bramble/init.bramble.rc b/bramble/init.bramble.rc
index 3e7819a..b299703 100644
--- a/bramble/init.bramble.rc
+++ b/bramble/init.bramble.rc
@@ -17,7 +17,7 @@
 import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.rc
 
 on property:vendor.all.modules.ready=1
-    chown system system /sys/class/spi_master/spi1/spi1.0/stm_fts_cmd
+    chown system system /sys/class/spi_master/spi0/spi0.0/stm_fts_cmd
 
 service vendor.mdm_helper /vendor/bin/mdm_helper
     class core
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp
index 8d7f5a5..c50ddee 100755
--- a/dumpstate/DumpstateDevice.cpp
+++ b/dumpstate/DumpstateDevice.cpp
@@ -240,7 +240,7 @@
 }
 
 static void DumpTouch(int fd) {
-    const char touch_spi_path[] = "/sys/class/spi_master/spi1/spi1.0";
+    const char touch_spi_path[] = "/sys/class/spi_master/spi0/spi0.0";
     char cmd[256];
 
     snprintf(cmd, sizeof(cmd), "%s/appid", touch_spi_path);
@@ -423,6 +423,7 @@
         return Void();
     }
 
+    RunCommandToFd(fd, "Notify modem", {"/vendor/bin/modem_svc", "-s"}, CommandOptions::WithTimeout(1).Build());
     RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"});
     DumpFileToFd(fd, "SoC serial number", "/sys/devices/soc0/serial_number");
     DumpFileToFd(fd, "CPU present", "/sys/devices/system/cpu/present");
diff --git a/fingerprint.mk b/fingerprint.mk
index d9a30a5..59965f6 100644
--- a/fingerprint.mk
+++ b/fingerprint.mk
@@ -1,5 +1,3 @@
-include vendor/google_devices/bramble/proprietary/FingerprintConfig.mk
-
 # Fingerprint
 PRODUCT_PACKAGES += \
     android.hardware.biometrics.fingerprint@2.1-service.fpc \
diff --git a/recovery/Android.bp b/recovery/Android.bp
index 37cf203..bbd4b6b 100644
--- a/recovery/Android.bp
+++ b/recovery/Android.bp
@@ -29,6 +29,7 @@
 
     static_libs: [
         "libbase",
+        "libbootloader_message",
         "libnos_for_recovery",
         "libnos_citadel_for_recovery",
     ],
diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp
index 55e686d..779d684 100644
--- a/recovery/recovery_ui.cpp
+++ b/recovery/recovery_ui.cpp
@@ -14,13 +14,18 @@
  * limitations under the License.
  */
 
+#include <stdint.h>
+#include <string.h>
+
+#include <string>
+#include <vector>
+
 #include <android-base/endian.h>
 #include <android-base/logging.h>
-
 #include <app_nugget.h>
-#include <nos/debug.h>
+#include <bootloader_message/bootloader_message.h>
 #include <nos/NuggetClient.h>
-
+#include <nos/debug.h>
 #include <recovery_ui/device.h>
 #include <recovery_ui/screen_ui.h>
 
@@ -57,6 +62,20 @@
     return true;
 }
 
+// Wipes the boot theme flag as part of data wipe.
+bool WipeBootThemeFlag() {
+    // Must be consistent with the one in init.hardware.rc (10-byte `theme-dark`).
+    const std::string wipe_str(10, '\x00');
+    constexpr size_t kThemeFlagOffsetInVendorSpace = 0;
+    if (std::string err; !WriteMiscPartitionVendorSpace(wipe_str.data(), wipe_str.size(),
+                                                        kThemeFlagOffsetInVendorSpace, &err)) {
+        LOG(ERROR) << "Failed to write wipe string: " << err;
+        return false;
+    }
+    LOG(INFO) << "Theme flag wiped successfully";
+    return true;
+}
+
 } // namespace
 
 class BrambleDevice : public ::Device
@@ -75,6 +94,10 @@
             totalSuccess = false;
         }
 
+        if (!WipeBootThemeFlag()) {
+            totalSuccess = false;
+        }
+
         // Extendable to wipe other components
 
         return totalSuccess;