From: Cezary Rojewski <cezary.rojewski@intel.com>
To: rafael@kernel.org
Cc: linux-acpi@vger.kernel.org, robert.moore@intel.com,
amadeuszx.slawinski@linux.intel.com,
andriy.shevchenko@linux.intel.com,
pierre-louis.bossart@linux.intel.com,
Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH v5 0/4] ACPI: NHLT: Access and query helpers
Date: Mon, 4 Mar 2024 17:13:31 +0100 [thread overview]
Message-ID: <20240304161335.1734134-1-cezary.rojewski@intel.com> (raw)
The goal of this patchset is to refactor existing interface of
Non HDAudio Link Table (NHLT) table so it becomes useful for the Intel
AudioDSP sound-drivers. Right now the useful duplicate resides in
sound/hda/intel-nhlt.c.
The API takes form of query functions that help access device or
audio-format configuration space. This information can be then utilized
by a sound-driver to perform necessary programming and facilitate
streaming over I2S/PDM interfaces. Once the series is merged, existing
sound-drivers can move from utilizing sound/hda/intel-nhlt.c to this
very code and ultimately the former file can be removed.
Paired with equivalent change on ACPICA [1].
-
Non HDAudio Link Table (NHLT) is designed to separate hardware-related
description (registers) from AudioDSP firmware-related one i.e.:
pipelines and modules that together make up the audio stream on Intel
DSPs. This task is important as same set of hardware registers can be
used with different topologies and vice versa, same topology could be
utilized with different set of hardware. As the hardware registers
description is directly tied to specific platform, intention is to have
such description part of low-level firmware e.g.: BIOS.
The initial design has been provided in early Sky Lake (SKL) days. The
audio architecture goes by the name cAVS. SKL is a representative of
cAVS 1.5. The table helps describe endpoint capabilities ever since.
While Raptor Lake (RPL) is the last of cAVS architecture - cAVS 2.5 to
be precise - its successor, the ACE architecture which begun with
Meteor Lake (MTL) inherited the design for all I2S and PDM
configurations. These two configurations are the primary targets for
NHLT table.
Due to naming conflicts with existing code, several structs are named
'nhlt2' rather than 'nhlt'. Last patch cleans the situation up.
Changes in v5:
- split find_endpoint/fmtcfg() into tb-less and tb-aware variants.
This is to make API scale with 2+ NHLTs and removes the need for
acpi_gbl_nhlt to be accessible globally.
- acpi_nhlt_device_config now a union that encompasses all device_config
types.
Changes in v4:
- relocated ACPI_NHLT kconfig in the drivers/acpi/Kconfig to a more
relevant area within the file
Changes in v3:
- uncapitalized acpi_gbl_NHLT
- fixed compilation problems when CONFIG_ACPI_NHLT is disabled
- dropped Reviewed-by tags in the 2/4 patch due to above, those were not
one-line changes
Changes in v2:
- minor wording improvements in kernel-doc for patch 3/4
- dropped parentheses around loop cursors in for_each_nhlt_*() macros
- readability improvements in compound if-statements within query
functions
- dropped NULL-checks in query functions
[1]: https://github.com/acpica/acpica/pull/912
Cezary Rojewski (4):
ACPI: NHLT: Reintroduce types the table consists of
ACPI: NHLT: Introduce API for the table
ACPI: NHLT: Drop redundant types
ACPI: NHLT: Streamline struct naming
drivers/acpi/Kconfig | 3 +
drivers/acpi/Makefile | 1 +
drivers/acpi/nhlt.c | 284 +++++++++++++++++++++++++++++++++++++++++
include/acpi/actbl2.h | 290 ++++++++++++++++--------------------------
include/acpi/nhlt.h | 180 ++++++++++++++++++++++++++
5 files changed, 577 insertions(+), 181 deletions(-)
create mode 100644 drivers/acpi/nhlt.c
create mode 100644 include/acpi/nhlt.h
--
2.25.1
next reply other threads:[~2024-03-04 16:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 16:13 Cezary Rojewski [this message]
2024-03-04 16:13 ` [PATCH v5 1/4] ACPI: NHLT: Reintroduce types the table consists of Cezary Rojewski
2024-03-04 16:57 ` Pierre-Louis Bossart
2024-03-04 19:49 ` Andy Shevchenko
2024-03-04 20:22 ` Pierre-Louis Bossart
2024-03-04 20:34 ` Cezary Rojewski
2024-03-04 20:46 ` Pierre-Louis Bossart
2024-03-06 16:17 ` Cezary Rojewski
2024-03-06 16:30 ` Pierre-Louis Bossart
2024-03-04 16:13 ` [PATCH v5 2/4] ACPI: NHLT: Introduce API for the table Cezary Rojewski
2024-03-04 16:13 ` [PATCH v5 3/4] ACPI: NHLT: Drop redundant types Cezary Rojewski
2024-03-04 16:13 ` [PATCH v5 4/4] ACPI: NHLT: Streamline struct naming Cezary Rojewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240304161335.1734134-1-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox