![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | nhlt_endp_descriptor |
struct | sub_format |
struct | nhlt_specific_config |
struct | nhlt_waveform |
struct | nhlt_format |
struct | nhlt_format_config |
struct | nhlt_endpoint |
struct | nhlt |
struct | nhlt_tdm_config |
struct | nhlt_dmic_array_config |
Macros | |
#define | MAX_FORMATS 2 |
#define | MAX_ENDPOINTS 8 |
Functions | |
struct nhlt * | nhlt_init (void) |
size_t | nhlt_current_size (struct nhlt *nhlt) |
int | nhlt_add_endpoints (struct nhlt *nhlt, const struct nhlt_endp_descriptor *epds, size_t num_epds) |
int | nhlt_add_ssp_endpoints (struct nhlt *nhlt, int virtual_bus_id, const struct nhlt_endp_descriptor *epds, size_t num_epds) |
struct nhlt_endpoint * | nhlt_add_endpoint (struct nhlt *nhlt, int link_type, int device_type, int dir, uint16_t vid, uint16_t did) |
int | nhlt_endpoint_append_config (struct nhlt_endpoint *endpoint, const void *config, size_t config_sz) |
struct nhlt_format * | nhlt_add_format (struct nhlt_endpoint *endpoint, int num_channels, int sample_freq_khz, int container_bits_per_sample, int valid_bits_per_sample, uint32_t speaker_mask) |
int | nhlt_format_append_config (struct nhlt_format *format, const void *config, size_t config_sz) |
int | nhlt_endpoint_add_formats (struct nhlt_endpoint *endpoint, const struct nhlt_format_config *formats, size_t num_formats) |
void | nhlt_next_instance (struct nhlt *nhlt, int link_type) |
uintptr_t | nhlt_serialize (struct nhlt *nhlt, uintptr_t acpi_addr) |
uintptr_t | nhlt_serialize_oem_overrides (struct nhlt *nhlt, uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id, uint32_t oem_revision) |
uintptr_t | nhlt_soc_serialize (struct nhlt *nhlt, uintptr_t acpi_addr) |
uintptr_t | nhlt_soc_serialize_oem_overrides (struct nhlt *nhlt, uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id, uint32_t oem_revision) |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
struct nhlt_endpoint* nhlt_add_endpoint | ( | struct nhlt * | nhlt, |
int | link_type, | ||
int | device_type, | ||
int | dir, | ||
uint16_t | vid, | ||
uint16_t | did | ||
) |
Definition at line 38 of file nhlt.c.
References nhlt::current_instance_id, DEFAULT_VIRTUAL_BUS_ID, nhlt_endpoint::device_id, nhlt_endpoint::device_type, did, nhlt_endpoint::direction, nhlt::endpoints, nhlt_endpoint::instance_id, nhlt_endpoint::link_type, MAX_ENDPOINTS, NHLT_MAX_LINK_TYPES, NHLT_RID, NULL, nhlt::num_endpoints, nhlt_endpoint::revision_id, nhlt_endpoint::subsystem_id, nhlt::subsystem_id, nhlt_endpoint::vendor_id, vid, and nhlt_endpoint::virtual_bus_id.
Referenced by _nhlt_add_single_endpoint().
int nhlt_add_endpoints | ( | struct nhlt * | nhlt, |
const struct nhlt_endp_descriptor * | epds, | ||
size_t | num_epds | ||
) |
Definition at line 459 of file nhlt.c.
References _nhlt_add_endpoints(), and DEFAULT_VIRTUAL_BUS_ID.
Referenced by nhlt_soc_add_dmic_array().
struct nhlt_format* nhlt_add_format | ( | struct nhlt_endpoint * | endpoint, |
int | num_channels, | ||
int | sample_freq_khz, | ||
int | container_bits_per_sample, | ||
int | valid_bits_per_sample, | ||
uint32_t | speaker_mask | ||
) |
Definition at line 102 of file nhlt.c.
References nhlt_waveform::bits_per_sample, nhlt_waveform::block_align, nhlt_waveform::bytes_per_second, nhlt_waveform::channel_mask, nhlt_waveform::extra_size, nhlt_endpoint::formats, KHz, MAX_FORMATS, memcpy(), NULL, nhlt_waveform::num_channels, nhlt_endpoint::num_formats, pcm_subformat, nhlt_waveform::samples_per_second, nhlt_waveform::sub_format, nhlt_waveform::tag, nhlt_waveform::valid_bits_per_sample, nhlt_format::waveform, and WAVEFORMAT_TAG.
Referenced by nhlt_endpoint_add_formats().
int nhlt_add_ssp_endpoints | ( | struct nhlt * | nhlt, |
int | virtual_bus_id, | ||
const struct nhlt_endp_descriptor * | epds, | ||
size_t | num_epds | ||
) |
Definition at line 468 of file nhlt.c.
References _nhlt_add_endpoints(), NHLT_LINK_SSP, nhlt_next_instance(), and nhlt_endpoint::virtual_bus_id.
Referenced by nhlt_soc_add_da7219(), nhlt_soc_add_max98357(), nhlt_soc_add_max98373(), nhlt_soc_add_max98927(), nhlt_soc_add_nau88l25(), nhlt_soc_add_rt5514(), nhlt_soc_add_rt5663(), nhlt_soc_add_rt5682(), and nhlt_soc_add_ssm4567().
Definition at line 256 of file nhlt.c.
References calc_size().
Referenced by nhlt_serialize_oem_overrides(), and nhlt_soc_serialize_oem_overrides().
int nhlt_endpoint_add_formats | ( | struct nhlt_endpoint * | endpoint, |
const struct nhlt_format_config * | formats, | ||
size_t | num_formats | ||
) |
Definition at line 144 of file nhlt.c.
References cbfs_map(), cbfs_unmap(), nhlt_format_config::container_bits_per_sample, nhlt_add_format(), nhlt_format_append_config(), NULL, nhlt_format_config::num_channels, nhlt_format_config::sample_freq_khz, nhlt_format_config::settings_file, nhlt_format_config::speaker_mask, and nhlt_format_config::valid_bits_per_sample.
Referenced by _nhlt_add_single_endpoint().
int nhlt_endpoint_append_config | ( | struct nhlt_endpoint * | endpoint, |
const void * | config, | ||
size_t | config_sz | ||
) |
Definition at line 96 of file nhlt.c.
References append_specific_config(), nhlt_endpoint::config, and config.
Referenced by _nhlt_add_single_endpoint().
int nhlt_format_append_config | ( | struct nhlt_format * | format, |
const void * | config, | ||
size_t | config_sz | ||
) |
Definition at line 138 of file nhlt.c.
References append_specific_config(), nhlt_format::config, and config.
Referenced by nhlt_endpoint_add_formats().
Definition at line 23 of file nhlt.c.
References malloc(), memset(), NHLT_SSID, NULL, and nhlt::subsystem_id.
Referenced by mainboard_write_acpi_tables().
Definition at line 184 of file nhlt.c.
References nhlt::current_instance_id, and NHLT_MAX_LINK_TYPES.
Referenced by nhlt_add_ssp_endpoints().
Definition at line 371 of file nhlt.c.
References nhlt_serialize_oem_overrides(), and NULL.
uintptr_t nhlt_serialize_oem_overrides | ( | struct nhlt * | nhlt, |
uintptr_t | acpi_addr, | ||
const char * | oem_id, | ||
const char * | oem_table_id, | ||
uint32_t | oem_revision | ||
) |
Definition at line 376 of file nhlt.c.
References acpi_checksum(), ACPI_TABLE_CREATOR, ALIGN_UP, ASLC, BIOS_DEBUG, cursor::buf, get_acpi_table_revision(), header, memcpy(), memset(), MIN, NHLT, nhlt_current_size(), nhlt_free_resources(), nhlt_serialize_endpoints(), NULL, OEM_ID, printk, strlen(), write_le32(), and write_le8().
Referenced by nhlt_serialize(), and nhlt_soc_serialize_oem_overrides().
Definition at line 7 of file nhlt.c.
References nhlt_soc_serialize_oem_overrides(), and NULL.
Referenced by mainboard_write_acpi_tables().
uintptr_t nhlt_soc_serialize_oem_overrides | ( | struct nhlt * | nhlt, |
uintptr_t | acpi_addr, | ||
const char * | oem_id, | ||
const char * | oem_table_id, | ||
uint32_t | oem_revision | ||
) |
Definition at line 12 of file nhlt.c.
References acpi_get_gnvs(), gnvs, global_nvs::nhla, global_nvs::nhll, nhlt_current_size(), nhlt_serialize_oem_overrides(), and NULL.
Referenced by mainboard_write_acpi_tables(), and nhlt_soc_serialize().