alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
	Mark Brown <broonie@kernel.org>,
	Bard liao <yung-chuan.liao@linux.intel.com>
Subject: [alsa-devel] Applied "ASoC: soc-acpi: add _ADR-based link descriptors" to the asoc tree
Date: Mon, 13 Jan 2020 15:13:15 +0000 (GMT)	[thread overview]
Message-ID: <applied-20200110222530.30303-2-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20200110222530.30303-2-pierre-louis.bossart@linux.intel.com>

The patch

   ASoC: soc-acpi: add _ADR-based link descriptors

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.6

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From efb6f3159e874f09992b7318cea12e8e27e8389b Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Fri, 10 Jan 2020 16:25:25 -0600
Subject: [PATCH] ASoC: soc-acpi: add _ADR-based link descriptors

For SoundWire support, we added a 'link_mask' to describe the PCB hardware
layout. This helped form a signature that can be used as a first-order way
of detecting the hardware and selecting the machine driver.

The concept of link_mask is however not enough. Some BIOS enable all links,
even when there are no devices physically connected. We can also see
variations with multiple devices attached on one link, or different types
of devices connected on the same link. To accurately represent the
hardware, we need to build static tables where each link exposes a list of
expected devices represented by the 64-bit _ADR field (which uniquely
identifies each device).

The new 'links' field is optional when the link_mask is sufficient to
represent a platform in a unique way.

The existing mechanism to support I2C devices is left as is, it'd be too
invasive to change the existing support for _HID and the notion of link is
not relevant either.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200110222530.30303-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 include/sound/soc-acpi.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index c4c997bd0379..a217a87cae86 100644
--- a/include/sound/soc-acpi.h
+++ b/include/sound/soc-acpi.h
@@ -61,6 +61,8 @@ static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
  * @platform: string used for HDaudio codec support
  * @codec_mask: used for HDAudio support
  * @common_hdmi_codec_drv: use commom HDAudio HDMI codec driver
+ * @link_mask: links enabled on the board
+ * @links: array of link _ADR descriptors, null terminated
  */
 struct snd_soc_acpi_mach_params {
 	u32 acpi_ipc_irq_index;
@@ -68,6 +70,23 @@ struct snd_soc_acpi_mach_params {
 	u32 codec_mask;
 	u32 dmic_num;
 	bool common_hdmi_codec_drv;
+	u32 link_mask;
+	const struct snd_soc_acpi_link_adr *links;
+};
+
+/**
+ * snd_soc_acpi_link_adr: ACPI-based list of _ADR, with a variable
+ * number of devices per link
+ *
+ * @mask: one bit set indicates the link this list applies to
+ * @num_adr: ARRAY_SIZE of adr
+ * @adr: array of _ADR (represented as u64).
+ */
+
+struct snd_soc_acpi_link_adr {
+	const u32 mask;
+	const u32 num_adr;
+	const u64 *adr;
 };
 
 /**
@@ -78,6 +97,7 @@ struct snd_soc_acpi_mach_params {
  *
  * @id: ACPI ID (usually the codec's) used to find a matching machine driver.
  * @link_mask: describes required board layout, e.g. for SoundWire.
+ * @links: array of link _ADR descriptors, null terminated.
  * @drv_name: machine driver name
  * @fw_filename: firmware file name. Used when SOF is not enabled.
  * @board: board name
@@ -94,6 +114,7 @@ struct snd_soc_acpi_mach_params {
 struct snd_soc_acpi_mach {
 	const u8 id[ACPI_ID_LEN];
 	const u32 link_mask;
+	const struct snd_soc_acpi_link_adr *links;
 	const char *drv_name;
 	const char *fw_filename;
 	const char *board;
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2020-01-14 13:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 22:25 [alsa-devel] [PATCH 0/6] ASoC: soc-acpi: add support for SoundWire-based machines Pierre-Louis Bossart
2020-01-10 22:25 ` [alsa-devel] [PATCH 1/6] ASoC: soc-acpi: add _ADR-based link descriptors Pierre-Louis Bossart
2020-01-13 15:13   ` Mark Brown [this message]
2020-01-10 22:25 ` [alsa-devel] [PATCH 2/6] ASoC: Intel: common: soc-acpi: declare new tables for SoundWire Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: common: soc-acpi: declare new tables for SoundWire" to the asoc tree Mark Brown
2020-01-10 22:25 ` [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: common: add match tables for ICL w/ SoundWire" to the asoc tree Mark Brown
2020-03-10 22:12   ` [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire Jaroslav Kysela
2020-03-11  1:35     ` Pierre-Louis Bossart
2020-03-11  6:39       ` Jaroslav Kysela
2020-03-11  9:07         ` Vinod Koul
2020-03-11 14:47           ` Pierre-Louis Bossart
2020-03-13 11:44             ` Vinod Koul
2020-03-13 16:28               ` Pierre-Louis Bossart
2020-03-14  9:37                 ` Vinod Koul
2020-01-10 22:25 ` [alsa-devel] [PATCH 4/6] ASoC: Intel: common: add match tables for CNL/CFL/CML " Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire" to the asoc tree Mark Brown
2020-01-10 22:25 ` [alsa-devel] [PATCH 5/6] ASoC: Intel: common: add match tables for TGL w/ SoundWire Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: Intel: common: add match tables for TGL w/ SoundWire" to the asoc tree Mark Brown
2020-01-10 22:25 ` [alsa-devel] [PATCH 6/6] ASoC: SOF: Intel: reference SoundWire machine lists Pierre-Louis Bossart
2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: SOF: Intel: reference SoundWire machine lists" to the asoc tree Mark Brown

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=applied-20200110222530.30303-2-pierre-louis.bossart@linux.intel.com \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.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;
as well as URLs for NNTP newsgroup(s).