summaryrefslogtreecommitdiffstats
path: root/meta-agl.md
blob: be4369656930c5dd6a84118d6d9616bdbb29429e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
## Introduction

The `meta-agl` layer provides the minimal set of software
to boot an AGL Distribution system.
You use this layer as the minimal core on which to build AGL profiles.

**NOTE:** The `meta-agl` layer does not include a reference UI.
  The reference UI is included as part of the
  [`meta-agl-demo`](./meta-agl-demo.html) layer.

## Sub-Layers

The `meta-agl` layer itself contains many sub-layers and files.
Following is a "tree" look at the layer:

```
|-- LICENSE
|-- LICENSE.GPL-2.0-only
|-- LICENSE.MIT
|-- README-AGL.md
|-- README.md -> meta-agl.md
|-- agl-layers-overview.md
|-- docs
|-- meta-agl-bsp
|-- meta-agl-core
|-- meta-agl-core-test
|-- meta-agl-ic
|-- meta-agl-ivi
|-- meta-agl.md
|-- meta-netboot
|-- meta-pipewire
|-- scripts
`-- templates
```

This list provides some overview information on the files and sub-layers
in `meta-agl`:

* LICENSE* : licenses of the various components. 
* README* : RTFM
* agl-layers-overview.md: references to the various layers that make up AGL
* `docs`: Contains files that support AGL documentation.
* `meta-agl-bsp`: Contains adaptations for recipes and required packages
  to boot an AGL distribution on targeted hardware and emulation (i.e. QEMU).
* `meta-agl-core`: This is the core layer with essential recipes and the distro.
* `meta-agl-core-test`: recipes supporting qa images (separate layer due to external dependencies)
* `meta-agl-ic`: Instrument Cluster platform
* `meta-agl-ivi`: IVI platform
* `meta-netboot`: Contains recipes and configuration adjustments to allow network
  boot through network block device (NBD) since network file system (NFS) does not
  support security labels.
* `meta-pipewire`: Configuration and recipes supporting pipewire as audio manager
* `scripts`: AGL development setup and support scripts.
* `templates`: Base, feature, and machine templates used in the AGL development
  environment.

## Packagegroups

This section describes the AGL
[packagegroup](https://yoctoproject.org/docs/2.4.4/dev-manual/dev-manual.html#usingpoky-extend-customimage-customtasks)
design:

### core non-ui packagegroups:
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-connectivity.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-devel.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-security.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-os-commonlibs.bb

### graphical subsystem
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-profile-graphical.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-multimedia.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-graphical-weston.bb

### image-related packagegroups
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-core-boot.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-boot.bb
meta-agl-core/recipes-platform/packagegroups/packagegroup-agl-image-minimal.bb

### QA/Test related packagegroups
meta-agl-core-test/recipes-test/packagegroups
meta-agl-core-test/recipes-test/packagegroups/packagegroup-agl-test.bb

## Images

### (Barely) bootable image
meta-agl-core/recipes-platform/images/agl-image-boot.bb

### minimal image and SDK (console)
meta-agl-core/recipes-platform/images/agl-image-minimal.bb
meta-agl-core/recipes-platform/images/agl-image-minimal-crosssdk.bb

### weston-based image for re-use
meta-agl-core/recipes-platform/images/agl-image-weston.bb

### image for use in the YP autobuilder
meta-agl-core/recipes-platform/images/agl-image-core-autobuilder.bb

### image with extra QA tooling (e.g. to run LTP)
meta-agl-core-test/images/agl-image-minimal-qa.bb
="n">STREAM_MUTED, // Stream is muted STREAM_MUTE_MAXVALUE, // Enum count, keep at the end } StreamMuteT; typedef enum EndpointType { ENDPOINTTYPE_SOURCE = 0, // source devices ENDPOINTTYPE_SINK, // sink devices ENDPOINTTYPE_MAXVALUE // Enum count, keep at the end } EndpointTypeT; typedef enum StreamState { STREAM_STATE_IDLE = 0, // Stream is inactive STREAM_STATE_RUNNING, // Stream is active and running STREAM_STATE_PAUSED, // Stream is active but paused STREAM_STATE_MAXVALUE // Enum count, keep at the end } StreamStateT; // Define default behavior of audio role when interrupting lower priority sources typedef enum InterruptBehavior { INTERRUPTBEHAVIOR_CONTINUE = 0, // Continue to play lower priority source when interrupted (e.g. media may be ducked) INTERRUPTBEHAVIOR_CANCEL, // Abort playback of lower priority source when interrupted (e.g. non-important HMI feedback that does not make sense later) INTERRUPTBEHAVIOR_PAUSE, // Pause lower priority source when interrupted, to be resumed afterwards (e.g. non-temporal guidance) INTERRUPTBEHAVIOR_MAXVALUE, // Enum count, keep at the end } InterruptBehaviorT; typedef enum DeviceURIType { DEVICEURITYPE_ALSA_HW = 0, // Alsa hardware device URI DEVICEURITYPE_ALSA_DMIX, // Alsa Dmix device URI (only for playback devices) DEVICEURITYPE_ALSA_DSNOOP, // Alsa DSnoop device URI (only for capture devices) DEVICEURITYPE_ALSA_SOFTVOL, // Alsa softvol device URI DEVICEURITYPE_ALSA_PLUG, // Alsa plug device URI DEVICEURITYPE_ALSA_OTHER, // Alsa domain URI device of unspecified type DEVICEURITYPE_NOT_ALSA, // Unknown (not ALSA domain) DEVICEURITYPE_MAXVALUE // Enum count, keep at the end } DeviceURITypeT; // CPU endianness assumed in all formats typedef enum SampleType { AHL_FORMAT_UNKNOWN = -1, // Unknown AHL_FORMAT_U8 = 0, // Unsigned 8 bit AHL_FORMAT_S16, // Signed 16 bit Little Endian AHL_FORMAT_S24, // Signed 24 bit Little Endian using low three bytes in 32-bit word AHL_FORMAT_S32, // Signed 32 bit Little Endian AHL_FORMAT_FLOAT, // Float 32 bit Little Endian, Range -1.0 to 1.0 AHL_FORMAT_FLOAT64, // Float 64 bit Little Endian, Range -1.0 to 1.0 AHL_FORMAT_IEC958, // IEC-958 Little Endian (SPDIF) AHL_FORMAT_MU_LAW, // Mu-Law AHL_FORMAT_A_LAW, // A-Law AHL_FORMAT_IMA_ADPCM, // Ima-ADPCM AHL_FORMAT_MPEG, // MPEG AHL_FORMAT_GSM, // GSM AHL_FORMAT_G723, // G723 AHL_FORMAT_DSD, // Direct stream digital AHL_FORMAT_MAXVALUE, // Enum count, keep at the end } SampleTypeT; typedef struct AudioFormat { int sampleRate; // Sample rate int numChannels; // Number of channels SampleTypeT sampleType; // Sample type // TODO: Interleaving? // TODO: Sample sub format? } AudioFormatT; typedef struct AlsaDeviceInfo { int cardNum; // HW card number int deviceNum; // HW device number int subDeviceNum; // HW sub device number } AlsaDeviceInfoT; typedef enum EndpointSelectionMode { ENDPOINTSELMODE_AUTO = 0, // Automatic endpoint selection based on config priority ENDPOINTSELMODE_MANUAL, // Explicit endpoint selection ENDPOINTSELMODEMAXVALUE, // Enum count, keep at the end } EndpointSelectionModeT; typedef struct EndpointInfo { endpointID_t endpointID; // Unique endpoint ID (per type) EndpointTypeT type; // Source or sink device char * gsDeviceName; // Unique device card name char * gsDisplayName; // Application display name char * gsDeviceURI; // Associated URI char * gsDeviceDomain; // Device URI domain (e.g. alsa or pulse) char * pRoleName; // Role assigned to this endpoint DeviceURITypeT deviceURIType; // Device URI type (includes audio domain information) char * gsHALAPIName; // HAL associated with the device (for volume control) AlsaDeviceInfoT alsaInfo; // ALSA specific device information AudioFormatT format; // Preferred audio format supported (later could be array of supported formats) int iVolume; // Storage for current endpoint volume (policy effected). GHashTable * pPropTable; // Storage for array of properties (policy effected) } EndpointInfoT; typedef struct StreamInfo { streamID_t streamID; // Stream unique ID EndpointInfoT * pEndpointInfo; // Associated endpoint information (reference) StreamStateT streamState; // Stream activity state StreamMuteT streamMute; // Stream mute state struct afb_event streamStateEvent; // Stream specific event for stream state changes EndpointSelectionModeT endpointSelMode; // Automatic (priority based) or manual endpoint selection char * pRoleName; // Role string identifier (from role config but could be programatically overriden later) int iPriority; // Role normalized priority (0-100) (from role config but could be programatically overriden later) InterruptBehaviorT eInterruptBehavior; // Role behavior when interrupting lower priority streams (from role config but could be programatically overriden later) } StreamInfoT; typedef struct StreamPolicyInfo { streamID_t streamID; int RolePriority; char * pAudioRole; InterruptBehaviorT interruptBehavior; int iDuckVolume; //duck Volume } StreamPolicyInfoT; typedef struct EndPointPolicyInfo { endpointID_t endpointID; EndpointTypeT type; DeviceURITypeT deviceType; char * pDeviceName; char * pHalApiName; int iVolume; //Current Volume GArray * streamInfo; //List of playing or duck stream at a given endpoint } EndPointPolicyInfoT; void Add_Endpoint_Property_Double( EndpointInfoT * io_pEndpointInfo, char * in_pPropertyName, double in_dPropertyValue); void Add_Endpoint_Property_Int( EndpointInfoT * io_pEndpointInfo, char * in_pPropertyName, int in_iPropertyValue); void Add_Endpoint_Property_String( EndpointInfoT * io_pEndpointInfo, char * in_pPropertyName, const char * in_pPropertyValue); int PolicyEndpointStructToJSON(EndpointInfoT * pPolicyEndpoint, json_object **ppPolicyEndpointJ); int PolicyCtxJSONToEndpoint(json_object *pEndpointJ, EndpointInfoT * pPolicyStream); int PolicyStreamStructToJSON(StreamInfoT * pPolicyStream, json_object **ppPolicyStreamJ); int PolicyCtxJSONToStream(json_object *pStreamJ, StreamInfoT * pPolicyStream); #endif // AHL_POLICY_UTILS_INCLUDE