/* auto-generated, do not modify */
#pragma once
#include <fwupd-common.h>
typedef enum {
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_UNKNOWN,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX20562 = 20562,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2070X = 20700,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2077X = 20770,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2076X = 20760,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2085X = 20850,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2089X = 20890,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2098X = 20980,
    FU_SYNAPTICS_CXAUDIO_DEVICE_KIND_CX2198X = 21980,
} FuSynapticsCxaudioDeviceKind;
const gchar *fu_synaptics_cxaudio_device_kind_to_string(FuSynapticsCxaudioDeviceKind val);
typedef enum {
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_EEPROM,
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_RAM,
    FU_SYNAPTICS_CXAUDIO_MEM_KIND_CPX_ROM,
} FuSynapticsCxaudioMemKind;
typedef enum {
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_UNKNOWN,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_FW,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2070X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2077X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2076X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2085X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2089X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2098X_PATCH,
    FU_SYNAPTICS_CXAUDIO_FILE_KIND_CX2198X_PATCH,
} FuSynapticsCxaudioFileKind;
const gchar *fu_synaptics_cxaudio_file_kind_to_string(FuSynapticsCxaudioFileKind val);

GByteArray *fu_struct_synaptics_cxaudio_custom_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_patch_version_string_address(const GByteArray *st);
const guint8 *fu_struct_synaptics_cxaudio_custom_info_get_cpx_patch_version(const GByteArray *st, gsize *bufsz);
const guint8 *fu_struct_synaptics_cxaudio_custom_info_get_spx_patch_version(const GByteArray *st, gsize *bufsz);
guint8 fu_struct_synaptics_cxaudio_custom_info_get_layout_signature(const GByteArray *st);
guint8 fu_struct_synaptics_cxaudio_custom_info_get_layout_version(const GByteArray *st);
guint8 fu_struct_synaptics_cxaudio_custom_info_get_application_status(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_vendor_id(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_product_id(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_revision_id(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_language_string_address(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_manufacturer_string_address(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_product_string_address(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_custom_info_get_serial_number_string_address(const GByteArray *st);
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PATCH_VERSION_STRING_ADDRESS 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_CPX_PATCH_VERSION 0x2
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_SPX_PATCH_VERSION 0x5
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LAYOUT_SIGNATURE 0x9
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LAYOUT_VERSION 0xA
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_APPLICATION_STATUS 0xB
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_VENDOR_ID 0xC
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PRODUCT_ID 0xE
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_REVISION_ID 0x10
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_LANGUAGE_STRING_ADDRESS 0x12
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_MANUFACTURER_STRING_ADDRESS 0x14
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_PRODUCT_STRING_ADDRESS 0x16
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_OFFSET_SERIAL_NUMBER_STRING_ADDRESS 0x18
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE_CPX_PATCH_VERSION 0x3
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE_SPX_PATCH_VERSION 0x4
#define FU_STRUCT_SYNAPTICS_CXAUDIO_CUSTOM_INFO_SIZE 0x1A

GByteArray *fu_struct_synaptics_cxaudio_string_header_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint8 fu_struct_synaptics_cxaudio_string_header_get_length(const GByteArray *st);
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_OFFSET_LENGTH 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_OFFSET_TYPE 0x1
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_SIZE 0x2
#define FU_STRUCT_SYNAPTICS_CXAUDIO_STRING_HEADER_DEFAULT_TYPE 0x03

GByteArray *fu_struct_synaptics_cxaudio_validity_signature_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint8 fu_struct_synaptics_cxaudio_validity_signature_get_magic_byte(const GByteArray *st);
guint8 fu_struct_synaptics_cxaudio_validity_signature_get_eeprom_size_code(const GByteArray *st);
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_OFFSET_MAGIC_BYTE 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_OFFSET_EEPROM_SIZE_CODE 0x1
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_SIZE 0x2
#define FU_STRUCT_SYNAPTICS_CXAUDIO_VALIDITY_SIGNATURE_DEFAULT_MAGIC_BYTE 0x4C

GByteArray *fu_struct_synaptics_cxaudio_patch_info_parse(const guint8 *buf, gsize bufsz, gsize offset, GError **error);
guint8 fu_struct_synaptics_cxaudio_patch_info_get_patch_signature(const GByteArray *st);
guint16 fu_struct_synaptics_cxaudio_patch_info_get_patch_address(const GByteArray *st);
void fu_struct_synaptics_cxaudio_patch_info_set_patch_signature(GByteArray *st, guint8 value);
void fu_struct_synaptics_cxaudio_patch_info_set_patch_address(GByteArray *st, guint16 value);
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_OFFSET_PATCH_SIGNATURE 0x0
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_OFFSET_PATCH_ADDRESS 0x1
#define FU_STRUCT_SYNAPTICS_CXAUDIO_PATCH_INFO_SIZE 0x3
