Repository navigation
Conversation
This is good to print for completeness, and can be useful when extending fopen to not just allow read operations. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Make sure that the message is useful and doesn't just print a hex number like "1f050100". "Unexpected buffer count for method 31: 1f050100 (in: 5 vs 2, out: 1 vs 1)" is a much more descriptive and helpful error. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
EditorConfig is a file format and collection of text editor plugins for maintaining consistent coding styles between different editors and IDEs. Add a config for hexagonrpc with the preferred indentation style, and some other settings. Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
I think it's just the same function with a different data type for the file descriptor, where it's
I don't even see the use case for writing to any backing files and persistently storing them, beyond offloading the JSON config-to-registry conversions. |
|
Where do you suggest we store the files temporarily then? Just in RAM, in |
I'd say, |
|
Do you have an idea how to resolve the situation that we probably want to continue to have the read-only Open file read-only:
Open file read-write:
Delete file:
If we wanted to support deleting a file that's originally provided in |
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21 Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls) This package comes with the hexagonrpcd service which works alongside libssc Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work. Signed-off-by: Gianni Spadoni <me@gio.blue>
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21 Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls) This package comes with the hexagonrpcd service which works alongside libssc Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work. Signed-off-by: Gianni Spadoni <me@gio.blue>
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21 Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls) This package comes with the hexagonrpcd service which works alongside libssc Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work. Signed-off-by: Gianni Spadoni <me@gio.blue>
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21 Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls) This package comes with the hexagonrpcd service which works alongside libssc Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work. Signed-off-by: Gianni Spadoni <me@gio.blue>
NOTE: This package is using the tree from this PR: linux-msm/hexagonrpc#21 Without this PR (by @z3ntu), newer Snapdragon chips won't work (as there are missing calls) This package comes with the hexagonrpcd service which works alongside libssc Both this service and the data files in /usr/share/qcom are required for the Qualcomm SSC sensors to work. Signed-off-by: Gianni Spadoni <me@gio.blue>
|
@lumag ping, since we were talking about this :) |
|
@z3ntu Okay. My rough guess: |
Confirmation from SC8280XP (Windows firmware)I can confirm the method 5 signature DSP writes through method 5My DSP writes Two config files control whether method 5 is triggeredThis might explain why the issue hasn't surfaced on Android devices:
On our platform, using the correct text-format Sequence when method 5 is NULL (upstream)Test results with stub fwriteWith a stub analogous to this PR (accept
Tested with libssc + ssc-bridge → uinput evdev. Thanks for working on this! |
|
The |
|
After !13, the format for method definitions will change. In In (I would have put the example inline in a click-to-open if I could) |
|
(correct link: #13) Just a sidenote, I don't think I'll be able to work on this in the coming month for example, there's too many other things pending for me to do that have higher priority. But I'd definitely be happy to continue working on this, to get this to a state that can be merged. |
Implement the apps_std methods the sensor framework's registry initialisation calls (ids as in quic/fastrpc inc/apps_std.h: fopen 0, fwrite 5, fsync 23, fremove 24, ftrunc 32, frename 33; ids above 30 travel in the first primitive word), open w/a/+ modes read-write, and let fopen_with_env open an absolute name whatever search variable the DSP names. Refusing the first write (fremove, then fopen of the DIR marker for writing) made the X1E80100 firmware assert in sns_registry_sensor.c and take the whole ADSP down. Unlike the stubs proposed in pull request 21, the writes reach the files, so what the framework persists (its parsed registry, calibration) is there at the next start. Link: linux-msm#19 Link: linux-msm#21
…rsist exists The framework writes /persist/sensors/registry/fstempfile and renames it into /persist/sensors/registry/registry, and it looks for sns_reg_version and parsed_file_list.csv next to the registry directory (it creates sns_reg_version through that temporary file when the file is missing). With DIR/sensors/persist/ present that directory backs the whole of /persist/sensors/registry, its registry/ subdirectory being the registry; without it the tree is as before. Link: linux-msm#19 Link: linux-msm#21
Implement the apps_std methods the sensor framework's registry initialisation calls (ids as in quic/fastrpc inc/apps_std.h: fopen 0, fwrite 5, fsync 23, fremove 24, ftrunc 32, frename 33; ids above 30 travel in the first primitive word), open w/a/+ modes read-write, and let fopen_with_env open an absolute name whatever search variable the DSP names. Refusing the first write (fremove, then fopen of the DIR marker for writing) made the X1E80100 firmware assert in sns_registry_sensor.c and take the whole ADSP down. Unlike the stubs proposed in pull request 21, the writes reach the files, so what the framework persists (its parsed registry, calibration) is there at the next start. Link: linux-msm#19 Link: linux-msm#21
…rsist exists The framework writes /persist/sensors/registry/fstempfile and renames it into /persist/sensors/registry/registry, and it looks for sns_reg_version and parsed_file_list.csv next to the registry directory (it creates sns_reg_version through that temporary file when the file is missing). With DIR/sensors/persist/ present that directory backs the whole of /persist/sensors/registry, its registry/ subdirectory being the registry; without it the tree is as before. Link: linux-msm#19 Link: linux-msm#21
Implement the apps_std methods the sensor framework's registry initialisation calls (ids as in quic/fastrpc inc/apps_std.h: fopen 0, fwrite 5, fsync 23, fremove 24, ftrunc 32, frename 33; ids above 30 travel in the first primitive word), open w/a/+ modes read-write, and let fopen_with_env open an absolute name whatever search variable the DSP names. Refusing the first write (fremove, then fopen of the DIR marker for writing) made the X1E80100 firmware assert in sns_registry_sensor.c and take the whole ADSP down. Unlike the stubs proposed in pull request 21, the writes reach the files, so what the framework persists (its parsed registry, calibration) is there at the next start. Link: linux-msm#19 Link: linux-msm#21 Signed-off-by: Fady <me@fadyackad.dev>
…rsist exists The framework writes /persist/sensors/registry/fstempfile and renames it into /persist/sensors/registry/registry, and it looks for sns_reg_version and parsed_file_list.csv next to the registry directory (it creates sns_reg_version through that temporary file when the file is missing). With DIR/sensors/persist/ present that directory backs the whole of /persist/sensors/registry, its registry/ subdirectory being the registry; without it the tree is as before. Link: linux-msm#19 Link: linux-msm#21 Signed-off-by: Fady <me@fadyackad.dev>
Initial feedback welcome,
the first commits can be applied in my opinion(see #22), not sure how we want to do the later commits.For
fopen_with_env_fd(or thefopen_fdfunction that I haven't implemented) I'm honestly not sure what thefdshould be or would be used for. It's the same data type as the "fd" for the other functions (e.g. fread) but seems for a different purpose? Not quite sure, but the ADSP is happy enough getting random stub data there.Also in general, not sure how to handle a mutable version of hexagonrpc, I know rmtfs has a similar issue but there it keeps a copy of the original file in-memory or something, but it's obviously more difficult for a whole file system. Maybe copy the read-only version from
/usr/share/qcomto/var/lib/hexagonrpc/and modify it there only, depending on what's requested?Log on Milos (Fairphone (Gen. 6)), initializing the sensors far enough to work with iio-sensor-proxy:
output.txt
Fixes #19