AEM Descriptor Help

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
bsoutter
Newbie
Posts: 1
Joined: Mon Nov 26, 2018 6:09 am

AEM Descriptor Help

Postby bsoutter » Tue Dec 04, 2018 1:28 am

Hi all,

I've been trying to add AEM descriptors to the Gigabit I2S master example [AN00202] to enable mute/phantom power/gain control to certain ports that have that functionality.
I believe I have the syntax of the descriptor itself correct in the aem_descriptors.h.in file although I'm not sure how to correctly 'map' this control descriptor to a port:

Code: Select all

.....
unsigned char desc_control_mute[] =
{
  U16(AEM_CONTROL_TYPE),                      /* 0-1 descriptor_type */
  U16(DESCRIPTOR_INDEX_CONTROL_MUTE),                                     /* 2-3 descriptor_id */
  U64(AEM_CONTROL_TYPE_MUTE),                 /* 4-11 control_type */
  U16(AEM_EXTERNAL_PORT_OUTPUT_TYPE),         /* 12-13 control_location_type */
  U16(0),                                     /* 14-15 control_location_id */
  U16(AEM_CONTROL_LINEAR_UINT8),              /* 16-17 control_value_type */
  U16(0),                                     /* 18-19 control_domain */
  "Mute",                                     /* 20-83 control_name */
  U16(AEM_NO_STRING),                        /* 84-85 control_name_string */
  U16(102),                                   /* 86-87 values_offset */
  U16(1),                                     /* 88-89 number_of_values */
  U16(0),                                     /* 90-91 signal_type */
  U16(0),                                     /* 92-93 signal_id */
  U32(0),                                     /* 94-97 block_latency */
  U32(0),                                     /* 98-101 control_latency */
  /* 102-> value_details */
  0,                                          /* minimum_value[0] */
  255,                                        /* maximum_value[0] */
  255,                                        /* step[0] */
  0,                                          /* default_value[0] */
  0,                                          /* current_value[0] */
  U16(AEM_CONTROL_UNITS_UNITLESS),            /* unit[0] */
  U16(AEM_NO_STRING)                            /* string[0] */
};
....


Code: Select all

unsigned int aem_descriptor_list[] = {
.....
AEM_CONTROL_TYPE, 2, sizeof(desc_control_identify), (unsigned)desc_control_identify, sizeof(desc_control_mute), (unsigned)desc_control_mute,
.....
}


I'm also unsure of how I need to handle this descriptor in the main application task to advertise this functionality:

Code: Select all

            case i_1722_1_entity.get_control_value(unsigned short control_index,
                                unsigned int &value_size,
                                unsigned short &values_length,
                                unsigned char values[]) -> unsigned char return_status:{

                                }


Can someone point me in the direction of some documentation of how to program these using the lib_tsn library?

Thanks,
Ben

Who is online

Users browsing this forum: No registered users and 33 guests