Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# Module

Defines the generic structs that will hold the state and control configuration for each stage.

Enums

enum config_rw_state_t

  Control states, used to communicate between DSP and control threads to notify when control needs processing.

  Values:

  enumerator config_read_pending

    Control waiting to read the updated config from DSP.

  enumerator config_write_pending

    Config written by control and waiting for DSP to update.

  enumerator config_read_updated

    Stage has succesfully consumed a read command.

  enumerator config_none_pending

    All done. Control and DSP not waiting on anything.

struct module_control_t
  #include <adsp_module.h>

  Control related information shared between control thread and DSP.

  Public Members

  void *config

    Pointer to a stage-specific config struct which is used by the control thread.

  uint32_t id

    Unique module identifier assigned by the host.

  uint32_t num_control_commands

    The number of control commands for this stage.

  uint8_t module_type

    Identifies the stage type. Each type of stage has a unique identifier.

  uint8_t cmd_id

    Is set to the current command being processed.

  config_rw_state_t config_rw_state
  intptr_t current_controller

    id of the current control object that requested a read, do not modify.

  swlock_t lock

    lock used by controlling threads to manage access

struct module_instance_t
  #include <adsp_module.h>

  The entire state of a stage in the pipeline.

  Public Members

  void *state

    Pointer to the module’s state memory.

  module_control_t control

    Module’s control state.

  void *constants