-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tapping the internal microphones #259
Commits on Oct 23, 2022
-
m1n1.utils: Fix chexundump exception
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for ed8628f - Browse repository at this point
Copy the full SHA ed8628fView commit details -
m1n1.utils: Skip empty lines on chexundump input
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1941333 - Browse repository at this point
Copy the full SHA 1941333View commit details -
m1n1.utils: Accept 'base' in chexundump
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2ce1849 - Browse repository at this point
Copy the full SHA 2ce1849View commit details -
m1n1.hw.admac: Add CHAN_SRAM_CARVEOUT registers
The new registers contain SRAM limits allocated to each channel. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for fa4929b - Browse repository at this point
Copy the full SHA fa4929bView commit details -
tools/admac_stream.py: Add tool for engaging ADMAC
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0dbba2d - Browse repository at this point
Copy the full SHA 0dbba2dView commit details -
m1n1.fw.afk: Fix TX/RX_BUFSIZE confusion
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 0c21d2c - Browse repository at this point
Copy the full SHA 0c21d2cView commit details -
m1n1.trace: Drop stale super().__init__() call
The Reloadable parent doesn't have an __init__ method, so calling the super may call at unexpected places in richer inheritance hierarchies. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 485cb80 - Browse repository at this point
Copy the full SHA 485cb80View commit details -
m1n1.hw.dart: Pass in kwargs arguments of from_adt()
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for fd37637 - Browse repository at this point
Copy the full SHA fd37637View commit details -
m1n1.proxyutils: Accept M1N1HEAP environment variable
Let user override the proxyutils heap base for concurrent running of two proxyclient sessions. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 15a2e71 - Browse repository at this point
Copy the full SHA 15a2e71View commit details -
m1n1.hw.adt: Add prop parsing rules related to AOP audio
We need to adapt the prop-parsing logic to give precedence to path matching over name matching, since otherwise the audio-* rule (which is already in the list) catches (...)/aop-audio/audio-pdm2. We want that to fall under *aop-audio* rule instead. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for a271764 - Browse repository at this point
Copy the full SHA a271764View commit details -
m1n1.fw.afk: Accept AOP buffer magic
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for b97361e - Browse repository at this point
Copy the full SHA b97361eView commit details -
experiments/aop.py: Work around ADT inconsistencies
In t6000 ADT, the AOP SRAM base is specified *including* the bus offset where the bus offset isn't expected, so our decoding of it includes the bus offset twice. Patch it. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for d518311 - Browse repository at this point
Copy the full SHA d518311View commit details -
m1n1.fw.aop: Split off ASCArgumentSection from experiments/aop.py
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4acebcf - Browse repository at this point
Copy the full SHA 4acebcfView commit details -
experiments/aop.py: Make _bootargs_span a property
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for db0856c - Browse repository at this point
Copy the full SHA db0856cView commit details -
experiments/aop.py: Allocate oslog buffer on request
We need to allocate a buffer for the AOP on the OSLog endpoint for it to fully boot. Copy in a modified version of the general OSLog endpoint driver to do that. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1458adb - Browse repository at this point
Copy the full SHA 1458adbView commit details -
m1n1.fw.aop: Move bootargs helpers to new class AOPBase
The new class can possibly be shared between the m1n1 AOP tracer and AOP client. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for e7b1616 - Browse repository at this point
Copy the full SHA e7b1616View commit details -
m1n1.fw.aop: Tweak bootargs diff format
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8898970 - Browse repository at this point
Copy the full SHA 8898970View commit details -
m1n1.fw.aop: In AOPBase only refer to ProxyUtils attribute
Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 93db28a - Browse repository at this point
Copy the full SHA 93db28aView commit details -
experiments/aop.py: Extend AOP experiment, add tracer
The AOP uses an 'EPIC' protocol similar to the one other coprocessor firmware is using but not in the exact same version. Add code for tracing the AOP calls and extend the aop.py experiment with the client side of it. Include description of audio calls and some other calls related to sensor discovery. Furthermore, in experiments/aop.py, do some AOP audio setup. Once that is done we can start streaming samples from the internal microphones by making what AOP considers power state adjustment calls. That is, we adjust the power state of a 'hpai' device, first to a 'pw1 ' stage, then to 'pwrd' stage. So, to see microphone samples, enter the AOP experiment shell first: $ M1N1DEVICE=/dev/ttyACM0 experiments/aop.py Within the shell, adjust the power state of 'hpai': >>> aop_set_audio_pstate('hpai', 'pw1 ') At that point /arm-io/admac-aop-audio powers up. In parallel to the AOP shell, we can start tools/admac_stream.py on the just powered-up ADMAC instance: $ M1N1HEAP=0x10010000000 M1N1DEVICE=/dev/ttyACM1 tools/admac_stream.py \ --node admac-aop-audio --channel 1 -v | xxd -g 4 -c 12 -e Returning back to the AOP shell, we can then set 'hpai' to 'pwrd' state to kick off the streaming: >>> aop_set_audio_pstate('hpai', 'pwrd') By that point, we should see samples coming out on the ADMAC end. The samples are 32-bit floats packed in groups of three in a frame, e.g. 00000000: ba7ac6a7 ba32d3c3 baa17ae2 ..z...2..z.. 0000000c: 38ccea5f b99c1a37 ba0c4bb1 _..87....K.. 00000018: 39d2354f 3964b5ff 39b209fb O5.9..d9...9 00000024: b96a1d1f 39c8503f 3958fc4f ..j.?P.9O.X9 00000030: b6b1f5ff 39c72b8f 39bbe017 .....+.9...9 0000003c: 3a912de5 36dd4f7f 37f1147f .-.:.O.6...7 This has been tested and will to some degree be specific to 2021 Macbook Pro (t6000). Differences on other models TBD (at the very least the number of microphones can be presumed different). Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for d629ad2 - Browse repository at this point
Copy the full SHA d629ad2View commit details -
experiments/mmio_sweep.py: Patch in AOP power-domains on t6000
The ADT lacks some of the info on AOP power domains on t6000, so fill that in manually. Signed-off-by: Martin Povišer <povik@protonmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3552450 - Browse repository at this point
Copy the full SHA 3552450View commit details