|
35 | 35 | #define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */
|
36 | 36 | #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
|
37 | 37 | #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */
|
| 38 | +#define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */ |
38 | 39 | #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
|
39 | 40 | #define ACPI_SIG_PDTT "PDTT" /* Platform Debug Trigger Table */
|
40 | 41 | #define ACPI_SIG_PHAT "PHAT" /* Platform Health Assessment Table */
|
|
46 | 47 | #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
|
47 | 48 | #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
|
48 | 49 | #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
|
49 |
| -#define ACPI_SIG_NHLT "NHLT" /* Non-HDAudio Link Table */ |
50 | 50 | #define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
|
51 | 51 |
|
52 | 52 | /*
|
@@ -1409,6 +1409,254 @@ struct nfit_device_handle {
|
1409 | 1409 | #define ACPI_NFIT_GET_NODE_ID(handle) \
|
1410 | 1410 | (((handle) & ACPI_NFIT_NODE_ID_MASK) >> ACPI_NFIT_NODE_ID_OFFSET)
|
1411 | 1411 |
|
| 1412 | +/******************************************************************************* |
| 1413 | + * |
| 1414 | + * NHLT - Non HD Audio Link Table |
| 1415 | + * |
| 1416 | + * Conforms to: Intel Smart Sound Technology NHLT Specification |
| 1417 | + * Version 0.8.1, January 2020. |
| 1418 | + * |
| 1419 | + ******************************************************************************/ |
| 1420 | + |
| 1421 | +/* Main table */ |
| 1422 | + |
| 1423 | +struct acpi_table_nhlt { |
| 1424 | + struct acpi_table_header header; /* Common ACPI table header */ |
| 1425 | + u8 endpoint_count; |
| 1426 | +}; |
| 1427 | + |
| 1428 | +struct acpi_nhlt_endpoint { |
| 1429 | + u32 descriptor_length; |
| 1430 | + u8 link_type; |
| 1431 | + u8 instance_id; |
| 1432 | + u16 vendor_id; |
| 1433 | + u16 device_id; |
| 1434 | + u16 revision_id; |
| 1435 | + u32 subsystem_id; |
| 1436 | + u8 device_type; |
| 1437 | + u8 direction; |
| 1438 | + u8 virtual_bus_id; |
| 1439 | +}; |
| 1440 | + |
| 1441 | +/* Types for link_type field above */ |
| 1442 | + |
| 1443 | +#define ACPI_NHLT_RESERVED_HD_AUDIO 0 |
| 1444 | +#define ACPI_NHLT_RESERVED_DSP 1 |
| 1445 | +#define ACPI_NHLT_PDM 2 |
| 1446 | +#define ACPI_NHLT_SSP 3 |
| 1447 | +#define ACPI_NHLT_RESERVED_SLIMBUS 4 |
| 1448 | +#define ACPI_NHLT_RESERVED_SOUNDWIRE 5 |
| 1449 | +#define ACPI_NHLT_TYPE_RESERVED 6 /* 6 and above are reserved */ |
| 1450 | + |
| 1451 | +/* All other values above are reserved */ |
| 1452 | + |
| 1453 | +/* Values for device_id field above */ |
| 1454 | + |
| 1455 | +#define ACPI_NHLT_PDM_DMIC 0xAE20 |
| 1456 | +#define ACPI_NHLT_BT_SIDEBAND 0xAE30 |
| 1457 | +#define ACPI_NHLT_I2S_TDM_CODECS 0xAE23 |
| 1458 | + |
| 1459 | +/* Values for device_type field above */ |
| 1460 | + |
| 1461 | +/* SSP Link */ |
| 1462 | + |
| 1463 | +#define ACPI_NHLT_LINK_BT_SIDEBAND 0 |
| 1464 | +#define ACPI_NHLT_LINK_FM 1 |
| 1465 | +#define ACPI_NHLT_LINK_MODEM 2 |
| 1466 | +/* 3 is reserved */ |
| 1467 | +#define ACPI_NHLT_LINK_SSP_ANALOG_CODEC 4 |
| 1468 | + |
| 1469 | +/* PDM Link */ |
| 1470 | + |
| 1471 | +#define ACPI_NHLT_PDM_ON_CAVS_1P8 0 |
| 1472 | +#define ACPI_NHLT_PDM_ON_CAVS_1P5 1 |
| 1473 | + |
| 1474 | +/* Values for Direction field above */ |
| 1475 | + |
| 1476 | +#define ACPI_NHLT_DIR_RENDER 0 |
| 1477 | +#define ACPI_NHLT_DIR_CAPTURE 1 |
| 1478 | +#define ACPI_NHLT_DIR_RENDER_LOOPBACK 2 |
| 1479 | +#define ACPI_NHLT_DIR_RENDER_FEEDBACK 3 |
| 1480 | +#define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */ |
| 1481 | + |
| 1482 | +struct acpi_nhlt_device_specific_config { |
| 1483 | + u32 capabilities_size; |
| 1484 | + u8 virtual_slot; |
| 1485 | + u8 config_type; |
| 1486 | +}; |
| 1487 | + |
| 1488 | +struct acpi_nhlt_device_specific_config_a { |
| 1489 | + u32 capabilities_size; |
| 1490 | + u8 virtual_slot; |
| 1491 | + u8 config_type; |
| 1492 | + u8 array_type; |
| 1493 | +}; |
| 1494 | + |
| 1495 | +/* Values for Config Type above */ |
| 1496 | + |
| 1497 | +#define ACPI_NHLT_TYPE_MIC_ARRAY 0x01 |
| 1498 | +#define ACPI_NHLT_TYPE_GENERIC 0x00 |
| 1499 | + |
| 1500 | +/* Mask for Extension field of array_type */ |
| 1501 | + |
| 1502 | +#define ACPI_NHLT_ARRAY_TYPE_MASK 0x10 |
| 1503 | + |
| 1504 | +struct acpi_nhlt_device_specific_config_b { |
| 1505 | + u32 capabilities_size; |
| 1506 | +}; |
| 1507 | + |
| 1508 | +struct acpi_nhlt_device_specific_config_c { |
| 1509 | + u32 capabilities_size; |
| 1510 | + u8 virtual_slot; |
| 1511 | +}; |
| 1512 | + |
| 1513 | +struct acpi_nhlt_wave_extensible { |
| 1514 | + u16 format_tag; |
| 1515 | + u16 channel_count; |
| 1516 | + u32 samples_per_sec; |
| 1517 | + u32 avg_bytes_per_sec; |
| 1518 | + u16 block_align; |
| 1519 | + u16 bits_per_sample; |
| 1520 | + u16 extra_format_size; |
| 1521 | + u16 valid_bits_per_sample; |
| 1522 | + u32 channel_mask; |
| 1523 | + u8 sub_format_guid[16]; |
| 1524 | +}; |
| 1525 | + |
| 1526 | +/* Values for channel_mask above */ |
| 1527 | + |
| 1528 | +#define ACPI_NHLT_SPKR_FRONT_LEFT 0x1 |
| 1529 | +#define ACPI_NHLT_SPKR_FRONT_RIGHT 0x2 |
| 1530 | +#define ACPI_NHLT_SPKR_FRONT_CENTER 0x4 |
| 1531 | +#define ACPI_NHLT_SPKR_LOW_FREQ 0x8 |
| 1532 | +#define ACPI_NHLT_SPKR_BACK_LEFT 0x10 |
| 1533 | +#define ACPI_NHLT_SPKR_BACK_RIGHT 0x20 |
| 1534 | +#define ACPI_NHLT_SPKR_FRONT_LEFT_OF_CENTER 0x40 |
| 1535 | +#define ACPI_NHLT_SPKR_FRONT_RIGHT_OF_CENTER 0x80 |
| 1536 | +#define ACPI_NHLT_SPKR_BACK_CENTER 0x100 |
| 1537 | +#define ACPI_NHLT_SPKR_SIDE_LEFT 0x200 |
| 1538 | +#define ACPI_NHLT_SPKR_SIDE_RIGHT 0x400 |
| 1539 | +#define ACPI_NHLT_SPKR_TOP_CENTER 0x800 |
| 1540 | +#define ACPI_NHLT_SPKR_TOP_FRONT_LEFT 0x1000 |
| 1541 | +#define ACPI_NHLT_SPKR_TOP_FRONT_CENTER 0x2000 |
| 1542 | +#define ACPI_NHLT_SPKR_TOP_FRONT_RIGHT 0x4000 |
| 1543 | +#define ACPI_NHLT_SPKR_TOP_BACK_LEFT 0x8000 |
| 1544 | +#define ACPI_NHLT_SPKR_TOP_BACK_CENTER 0x10000 |
| 1545 | +#define ACPI_NHLT_SPKR_TOP_BACK_RIGHT 0x20000 |
| 1546 | + |
| 1547 | +struct acpi_nhlt_format_config { |
| 1548 | + struct acpi_nhlt_wave_extensible format; |
| 1549 | + u32 capability_size; |
| 1550 | + u8 capabilities[]; |
| 1551 | +}; |
| 1552 | + |
| 1553 | +struct acpi_nhlt_formats_config { |
| 1554 | + u8 formats_count; |
| 1555 | +}; |
| 1556 | + |
| 1557 | +struct acpi_nhlt_device_specific_hdr { |
| 1558 | + u8 virtual_slot; |
| 1559 | + u8 config_type; |
| 1560 | +}; |
| 1561 | + |
| 1562 | +/* Types for config_type above */ |
| 1563 | + |
| 1564 | +#define ACPI_NHLT_GENERIC 0 |
| 1565 | +#define ACPI_NHLT_MIC 1 |
| 1566 | +#define ACPI_NHLT_RENDER 3 |
| 1567 | + |
| 1568 | +struct acpi_nhlt_mic_device_specific_config { |
| 1569 | + struct acpi_nhlt_device_specific_hdr device_config; |
| 1570 | + u8 array_type_ext; |
| 1571 | +}; |
| 1572 | + |
| 1573 | +/* Values for array_type_ext above */ |
| 1574 | + |
| 1575 | +#define SMALL_LINEAR_2ELEMENT 0x0A |
| 1576 | +#define BIG_LINEAR_2ELEMENT 0x0B |
| 1577 | +#define FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C |
| 1578 | +#define PLANAR_LSHAPED_4ELEMENT 0x0D |
| 1579 | +#define SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E |
| 1580 | +#define VENDOR_DEFINED 0x0F |
| 1581 | +#define ARRAY_TYPE_MASK 0x0F |
| 1582 | +#define ARRAY_TYPE_EXT_MASK 0x10 |
| 1583 | + |
| 1584 | +#define NO_EXTENSION 0x0 |
| 1585 | +#define MIC_SNR_SENSITIVITY_EXT 0x1 |
| 1586 | + |
| 1587 | +struct acpi_nhlt_vendor_mic_config { |
| 1588 | + u8 type; |
| 1589 | + u8 panel; |
| 1590 | + u16 speaker_position_distance; // mm |
| 1591 | + u16 horizontal_offset; // mm |
| 1592 | + u16 vertical_offset; // mm |
| 1593 | + u8 frequency_low_band; // 5*hz |
| 1594 | + u8 frequency_high_band; // 500*hz |
| 1595 | + u16 direction_angle; // -180 - + 180 |
| 1596 | + u16 elevation_angle; // -180 - + 180 |
| 1597 | + u16 work_vertical_angle_begin; // -180 - + 180 with 2 deg step |
| 1598 | + u16 work_vertical_angle_end; // -180 - + 180 with 2 deg step |
| 1599 | + u16 work_horizontal_angle_begin; // -180 - + 180 with 2 deg step |
| 1600 | + u16 work_horizontal_angle_end; // -180 - + 180 with 2 deg step |
| 1601 | +}; |
| 1602 | + |
| 1603 | +/* Values for Type field above */ |
| 1604 | + |
| 1605 | +#define MIC_OMNIDIRECTIONAL 0 |
| 1606 | +#define MIC_SUBCARDIOID 1 |
| 1607 | +#define MIC_CARDIOID 2 |
| 1608 | +#define MIC_SUPER_CARDIOID 3 |
| 1609 | +#define MIC_HYPER_CARDIOID 4 |
| 1610 | +#define MIC_8_SHAPED 5 |
| 1611 | +#define MIC_VENDOR_DEFINED 7 |
| 1612 | + |
| 1613 | +/* Values for Panel field above */ |
| 1614 | + |
| 1615 | +#define MIC_TOP 0 |
| 1616 | +#define MIC_BOTTOM 1 |
| 1617 | +#define MIC_LEFT 2 |
| 1618 | +#define MIC_RIGHT 3 |
| 1619 | +#define MIC_FRONT 4 |
| 1620 | +#define MIC_REAR 5 |
| 1621 | + |
| 1622 | +struct acpi_nhlt_vendor_mic_device_specific_config { |
| 1623 | + struct acpi_nhlt_mic_device_specific_config mic_array_device_config; |
| 1624 | + u8 number_of_microphones; |
| 1625 | + struct acpi_nhlt_vendor_mic_config mic_config[]; // indexed by number_of_microphones |
| 1626 | +}; |
| 1627 | + |
| 1628 | +/* Microphone SNR and Sensitivity extension */ |
| 1629 | + |
| 1630 | +struct acpi_nhlt_mic_snr_sensitivity_extension { |
| 1631 | + u32 SNR; |
| 1632 | + u32 sensitivity; |
| 1633 | +}; |
| 1634 | + |
| 1635 | +struct acpi_nhlt_render_feedback_device_specific_config { |
| 1636 | + struct acpi_nhlt_device_specific_config device_config; |
| 1637 | + u8 feedback_virtual_slot; // render slot in case of capture |
| 1638 | + u16 feedback_channels; // informative only |
| 1639 | + u16 feedback_valid_bits_per_sample; |
| 1640 | +}; |
| 1641 | + |
| 1642 | +/* Linux-specific structures */ |
| 1643 | + |
| 1644 | +struct acpi_nhlt_linux_specific_count { |
| 1645 | + u8 structure_count; |
| 1646 | +}; |
| 1647 | + |
| 1648 | +struct acpi_nhlt_linux_specific_data { |
| 1649 | + u8 device_id[16]; |
| 1650 | + u8 device_instance_id; |
| 1651 | + u8 device_port_id; |
| 1652 | + u8 filler[18]; |
| 1653 | +}; |
| 1654 | + |
| 1655 | +struct acpi_nhlt_table_terminator { |
| 1656 | + u32 terminator_value; |
| 1657 | + u32 terminator_signature; |
| 1658 | +}; |
| 1659 | + |
1412 | 1660 | /*******************************************************************************
|
1413 | 1661 | *
|
1414 | 1662 | * PCCT - Platform Communications Channel Table (ACPI 5.0)
|
|
0 commit comments