diff --git a/launch_env.sh b/launch_env.sh index a0e1e0406b..56d949a11d 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -16,7 +16,7 @@ export VECLIB_MAXIMUM_THREADS=1 export QCOM_PRIORITY=12 if [ -z "$AGNOS_VERSION" ]; then - export AGNOS_VERSION="19.1" + export AGNOS_VERSION="19.2" fi export STAGING_ROOT="/data/safe_staging" diff --git a/openpilot/common/hardware/tici/agnos.json b/openpilot/common/hardware/tici/agnos.json index 20af397f92..1997367e6b 100644 --- a/openpilot/common/hardware/tici/agnos.json +++ b/openpilot/common/hardware/tici/agnos.json @@ -67,17 +67,17 @@ }, { "name": "system", - "url": "https://commadist.azureedge.net/agnosupdate/system-4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263.img.xz", - "hash": "cb171de8b8e55c24cf5c67a588606e813a39d878d13593a41babc474ea2bc979", - "hash_raw": "4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263", + "url": "https://commadist.azureedge.net/agnosupdate/system-9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba.img.xz", + "hash": "c0e4597f026c51d4be565e4e0cee23c05c8aca6a96461ff078fa334798df1250", + "hash_raw": "9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba", "size": 4718592000, "sparse": true, "full_check": false, "has_ab": true, - "ondevice_hash": "f527a58b03d9b109b02df1bc2c3bf9584a025320909f0601557a26710c825add", + "ondevice_hash": "0b850a104c8bbc2ce45039ddae9c2c66a3caf9786878e7c2e1fac56938df5232", "alt": { - "hash": "4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263", - "url": "https://commadist.azureedge.net/agnosupdate/system-4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263.img", + "hash": "9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba", + "url": "https://commadist.azureedge.net/agnosupdate/system-9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba.img", "size": 4718592000 } } diff --git a/openpilot/common/hardware/tici/all-partitions.json b/openpilot/common/hardware/tici/all-partitions.json index dc4f4efd94..26ddc1e90b 100644 --- a/openpilot/common/hardware/tici/all-partitions.json +++ b/openpilot/common/hardware/tici/all-partitions.json @@ -350,40 +350,40 @@ }, { "name": "system", - "url": "https://commadist.azureedge.net/agnosupdate/system-4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263.img.xz", - "hash": "cb171de8b8e55c24cf5c67a588606e813a39d878d13593a41babc474ea2bc979", - "hash_raw": "4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263", + "url": "https://commadist.azureedge.net/agnosupdate/system-9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba.img.xz", + "hash": "c0e4597f026c51d4be565e4e0cee23c05c8aca6a96461ff078fa334798df1250", + "hash_raw": "9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba", "size": 4718592000, "sparse": true, "full_check": false, "has_ab": true, - "ondevice_hash": "f527a58b03d9b109b02df1bc2c3bf9584a025320909f0601557a26710c825add", + "ondevice_hash": "0b850a104c8bbc2ce45039ddae9c2c66a3caf9786878e7c2e1fac56938df5232", "alt": { - "hash": "4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263", - "url": "https://commadist.azureedge.net/agnosupdate/system-4f8d76444eff2b755dae059d62f4d4a389a1f95b2b50931e65df1885dd9f2263.img", + "hash": "9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba", + "url": "https://commadist.azureedge.net/agnosupdate/system-9486af38dc318596afb19fe464bb955a2de2c06a1719494a2f261c4fee5e44ba.img", "size": 4718592000 } }, { "name": "userdata_90", - "url": "https://commadist.azureedge.net/agnosupdate/userdata_90-e13160c3abfadaaf52fdd7776446b64b5b8731ec8317acd5e0a2d2af7324b33b.img.xz", - "hash": "515d03b2abdd14ca6d6ff5615128ba0adac913005e7319df909cfa5ee00fb8b1", - "hash_raw": "e13160c3abfadaaf52fdd7776446b64b5b8731ec8317acd5e0a2d2af7324b33b", + "url": "https://commadist.azureedge.net/agnosupdate/userdata_90-f881a77ae79930c852dc2c9f85f0e916ecae70edd7b3dcd532ea8305291f9639.img.xz", + "hash": "f3f37a9d79177071860158f464dd15c1d05bacff58653243108017b3334ba792", + "hash_raw": "f881a77ae79930c852dc2c9f85f0e916ecae70edd7b3dcd532ea8305291f9639", "size": 96636764160, "sparse": true, "full_check": true, "has_ab": false, - "ondevice_hash": "011c32076d6f2e6b6b45ca7a282c4ff6510250f7f6f0e7995cfb6bf33e0ab8a1" + "ondevice_hash": "6a20c75ea6faf658e37bbcead7e5b6d9d73b5a43a6bfe551812defe40680b9fe" }, { "name": "userdata_89", - "url": "https://commadist.azureedge.net/agnosupdate/userdata_89-a5f9ddbaceded14e34a0c65d552a3218d625d7b2cfe60348159a6a69ea044579.img.xz", - "hash": "22f4b0cf5c2b55eb6bbced58c78f1d66457b4a884af33ad4d5e35625608d266d", - "hash_raw": "a5f9ddbaceded14e34a0c65d552a3218d625d7b2cfe60348159a6a69ea044579", + "url": "https://commadist.azureedge.net/agnosupdate/userdata_89-5948cf37ed7890226e21dc080918d60ae9b685ed73fc2450036e39b2bdf2f46f.img.xz", + "hash": "7278019b0e8ede246260d943762951eb543452eced412f9c89322020374cdc45", + "hash_raw": "5948cf37ed7890226e21dc080918d60ae9b685ed73fc2450036e39b2bdf2f46f", "size": 95563022336, "sparse": true, "full_check": true, "has_ab": false, - "ondevice_hash": "8392a3bd58b88e899383e1c30db41cc3a8faf1d85ff83ec709367723506adaa8" + "ondevice_hash": "c92e2f7e16c99ad6755848eb7ea59d2bf19a0211b33809423581128c49927473" } ] \ No newline at end of file diff --git a/openpilot/selfdrive/pandad/tests/test_pandad.py b/openpilot/selfdrive/pandad/tests/test_pandad.py index bf70d5af79..0b5ea89a9d 100755 --- a/openpilot/selfdrive/pandad/tests/test_pandad.py +++ b/openpilot/selfdrive/pandad/tests/test_pandad.py @@ -18,6 +18,13 @@ HERE = os.path.dirname(os.path.realpath(__file__)) class TestPandad(OpenpilotTestCase): TICI_TEST = True + + def setUp(self): + super().setUp() + managed_processes['pandad'].stop() + if not Panda.list(): + self._run_test() + def teardown_method(self): managed_processes['pandad'].stop() diff --git a/openpilot/selfdrive/ui/soundd.py b/openpilot/selfdrive/ui/soundd.py index a740f02c5d..55bf9c8466 100644 --- a/openpilot/selfdrive/ui/soundd.py +++ b/openpilot/selfdrive/ui/soundd.py @@ -165,6 +165,7 @@ class Soundd: def soundd_thread(self): # sounddevice must be imported after forking processes import sounddevice as sd + micd.patch_sounddevice(sd) sm = messaging.SubMaster(['selfdriveState', 'soundPressure']) diff --git a/openpilot/system/micd.py b/openpilot/system/micd.py index a3a93c8c1a..7167aad137 100755 --- a/openpilot/system/micd.py +++ b/openpilot/system/micd.py @@ -15,6 +15,14 @@ SAMPLE_RATE = 16000 SAMPLE_BUFFER = 800 # 50ms +def patch_sounddevice(sd): + # TODO: remove once sounddevice uses np.reshape internally. + def sounddevice_array(buffer, channels, dtype): + return np.frombuffer(buffer, dtype=dtype).reshape(-1, channels) + + sd._array = sounddevice_array + + @cache def get_a_weighting_filter(): # Calculate the A-weighting filter @@ -104,6 +112,7 @@ class Mic: def micd_thread(self): # sounddevice must be imported after forking processes import sounddevice as sd + patch_sounddevice(sd) with self.get_stream(sd) as stream: cloudlog.info(f"micd stream started: {stream.samplerate=} {stream.channels=} {stream.dtype=} {stream.device=}, {stream.blocksize=}")