Update livoxGen1 stimbuffapi

This commit is contained in:
2025-10-01 13:46:29 -04:00
parent b771856330
commit b69572eee7
3 changed files with 87 additions and 72 deletions
+31 -31
View File
@@ -23,11 +23,11 @@ perceptual inputs -- like your own sense organs. For example, if you attach a
camera as a sensor, salmanoff will experience it in the same way that you
experience the visual sense data from your eyes.
## StimIface (Stimulus Interface):
## QualeIface (Quale Interface):
A StimIface is a **Stim**ulus **I**nter**face** library that connects to a
A QualeIface is a **Quale** **I**nter**face** library that connects to a
particular stim buffer and allows the mind to process the stim features
presented in the device's stim buffers. StimIface libraries replace the
presented in the device's stim buffers. QualeIface libraries replace the
previous notion of an implexor. They provide the interface between raw device
data and the mind's processing capabilities.
@@ -35,7 +35,7 @@ data and the mind's processing capabilities.
The general format of a DAP specification is:
```
sensor-type|dev-identifier|stim-iface-api|stim-buff-api(api-params)|provider(provider-params)|dev-selector
sensor-type|dev-identifier|quale-iface-api|stim-buff-api(api-params)|provider(provider-params)|dev-selector
```
* `sensor-type` is always either '`+idev`' (interoceptor), '`+edev`'
@@ -44,7 +44,7 @@ sensor-type|dev-identifier|stim-iface-api|stim-buff-api(api-params)|provider(pro
This represents a logical device that can be accessed through multiple
providers and may expose multiple stim features. In a sense it's like a
sense organ or sense modality.
* `stim-iface-api` is the name of the StimIface library that should be used to
* `quale-iface-api` is the name of the QualeIface library that should be used to
process the data from the stim buffer. This replaces the previous implexor
concept.
* `stim-buff-api` is the interface that provides access to a specific stim
@@ -66,7 +66,7 @@ If there's more than one parameter item in a list of `stim-buff-api-params` or
`provider-params`, then the individual items in a list of `stim-buff-api-param` or
`provider-params` should be separated by the h-bar character (`|`). E.g:
```
+edev|soundcard0|audio-stimiface|alsa-audio(shmem|param2|param3)|alsa()|cardname
+edev|soundcard0|audio-qualeiface|alsa-audio(shmem|param2|param3)|alsa()|cardname
```
Each parameter must be in one of these forms:
@@ -78,9 +78,9 @@ Each parameter must be in one of these forms:
The `stim-buff-api-params` should **never** include options related to the
stim buffer's type or format. The `stim-buff-api` must read and infer such
configuration details from the `stim-iface-api` portion of the DAP spec, and
configuration details from the `quale-iface-api` portion of the DAP spec, and
configure itself accordingly to enable connection by the specified
stim-iface library in the way that it has been configured.
quale-iface library in the way that it has been configured.
`stim-buff-api-params` are for options that are:
- Device-specific (not modality-wide)
@@ -148,33 +148,33 @@ required to effectuate the stim-buff controls.
### To attach a particular window from a window manager:
```
+edev|my-window|visual-stimiface|wayland()|wayland(server-socket)|window0
+edev|my-window|visual-qualeiface|wayland()|wayland(server-socket)|window0
```
Connect to the Wayland server that's listening on `server-socket`, using the
`wayland` stim-buff-api. Ask that Wayland server to give salmanoff read-access to all of
the frames composited into the window buffer for `window0`. Use salmanoff's
`visual-stimiface` to process the visual data from that `window0`'s compositor buffer.
`visual-qualeiface` to process the visual data from that `window0`'s compositor buffer.
### To attach a window manager's entire rendered desktop:
```
+edev|my-desktop|visual-stimiface|wayland()|wayland(listen-socket)|all
+edev|my-desktop|visual-qualeiface|wayland()|wayland(listen-socket)|all
```
In most cases, this is basically the same as attempting to attach all of the
underlying GFX server's output.
Connect to the Wayland server that's listening on `listen-socket`, using the
`wayland` stim-buff-api. Ask that Wayland server to give salmanoff read-access to the
entire compositor framebuffer. Use salmanoff's `visual-stimiface` to process the visual data from
entire compositor framebuffer. Use salmanoff's `visual-qualeiface` to process the visual data from
that Wayland server's compositor buffer.
### To attach all of an Xorg server's gfx output to all screens:
```
+edev|my-xorg-display|visual-stimiface|x11()|xorg(listen-socket)|all
+edev|my-xorg-display|visual-qualeiface|x11()|xorg(listen-socket)|all
```
Connect to the Xorg server that's listening on `listen-socket`, using the `x11`
stim-buff-api. Ask that Xorg server to let Salmanoff read out all of the frames written
out to all screens. Use salmanoff's `visual-stimiface` to process the visual data from the
out to all screens. Use salmanoff's `visual-qualeiface` to process the visual data from the
server's gfx framebuffer.
In most cases, this is basically the same as attempting to attach all of the
@@ -186,11 +186,11 @@ WM's output.
### To attach all of an Xorg server's gfx output to a particular screen:
```
+edev|my-screen|visual-stimiface|x11()|xorg(listen-socket)|:0
+edev|my-screen|visual-qualeiface|x11()|xorg(listen-socket)|:0
```
Connect to the Xorg server that's listening on `listen-socket`, using the `x11`
stim-buff-api. Ask that Xorg server to let Salmanoff read out all of the frames written
out to display `:0`. Use salmanoff's `visual-stimiface` to process the visual data from display
out to display `:0`. Use salmanoff's `visual-qualeiface` to process the visual data from display
`:0`'s framebuffer.
* Implementation note:
@@ -199,30 +199,30 @@ out to display `:0`. Use salmanoff's `visual-stimiface` to process the visual da
### To attach a camera device by connecting directly to its Linux driver:
```
+edev|my-camera|visual-stimiface|v4l()|linux()|/dev/video0
+edev|my-camera|visual-qualeiface|v4l()|linux()|/dev/video0
```
We specify that we want to use the `linux` kernel's loaded driver to connect
to communicate with `/dev/video0`, via the `Video4Linux` stim-buff-api. We want salmanoff
to use the `visual-stimiface` library to process the visual data from `/dev/video0`'s stim buffer.
to use the `visual-qualeiface` library to process the visual data from `/dev/video0`'s stim buffer.
If `/dev/video0` is already consumed by another process, this may likely fail.
### To attach a microphone that's managed by ALSA server:
```
+edev|my-microphone|audio-stimiface|alsa-mic(shmem)|alsa()|cardname
+edev|my-microphone|audio-qualeiface|alsa-mic(shmem)|alsa()|cardname
```
Connect to the ALSA server via `shmem`, using the `alsa-mic` stim-buff-api. Request access to
the microphone function of the sound card with the name `cardname`. Use the
`audio-stimiface` library to process the audio data from `cardname`'s microphone stim buffer.
`audio-qualeiface` library to process the audio data from `cardname`'s microphone stim buffer.
### To attach a thermal sensor managed by Linux:
```
+idev|my-thermal|thermal-stimiface|thermal-zone()|linux()|/sys/class/thermal_zone0
+idev|my-thermal|thermal-qualeiface|thermal-zone()|linux()|/sys/class/thermal_zone0
```
Use the `thermal-zone` SysFS stim-buff-api provided by `linux` to connect to the sensor
`/sys/class/thermal_zone0`. Use the `thermal-stimiface` library to process the thermal data from
`/sys/class/thermal_zone0`. Use the `thermal-qualeiface` library to process the thermal data from
`thermal_zone0`'s heat stim buffer.
## Multiple Provider Examples:
@@ -232,9 +232,9 @@ Use the `thermal-zone` SysFS stim-buff-api provided by `linux` to connect to the
The same physical sound card `soundcard0` can be accessed through different providers:
```
+edev|soundcard0|audio-stimiface|alsa-audio()|alsa()|card0
||| +edev|soundcard0|audio-stimiface|direct-file-ops()|linux()|/dev/snd/pcmC0D0p
||| +idev|soundcard0|audio-stimiface|alsa-mic()|alsa()|card0
+edev|soundcard0|audio-qualeiface|alsa-audio()|alsa()|card0
||| +edev|soundcard0|audio-qualeiface|direct-file-ops()|linux()|/dev/snd/pcmC0D0p
||| +idev|soundcard0|audio-qualeiface|alsa-mic()|alsa()|card0
```
This shows:
@@ -247,9 +247,9 @@ This shows:
A camera device `camera0` might expose different data streams:
```
+edev|camera0|visual-stimiface|v4l-rgb()|linux()|/dev/video0
||| +edev|camera0|visual-stimiface|v4l-yuv()|linux()|/dev/video0
||| +idev|camera0|thermal-stimiface|v4l-thermal()|linux()|/dev/video0
+edev|camera0|visual-qualeiface|v4l-rgb()|linux()|/dev/video0
||| +edev|camera0|visual-qualeiface|v4l-yuv()|linux()|/dev/video0
||| +idev|camera0|thermal-qualeiface|v4l-thermal()|linux()|/dev/video0
```
This shows the same camera device providing:
@@ -287,7 +287,7 @@ Separate individual DAP specifications with two consecutive h-bar
characters (`||`),
like this:
```
+edev|my-window|visual-stimiface|wayland()|wayland(server-socket)|window0
|| +edev|my-xorg-display|visual-stimiface|x11()|xorg(listen-socket)|all
|| +idev|my-thermal|thermal-stimiface|thermal-zone()|linux()|/sys/class/thermal_zone0
+edev|my-window|visual-qualeiface|wayland()|wayland(server-socket)|window0
|| +edev|my-xorg-display|visual-qualeiface|x11()|xorg(listen-socket)|all
|| +idev|my-thermal|thermal-qualeiface|thermal-zone()|linux()|/sys/class/thermal_zone0
```