Skip to contentSkip to conversation

ASoC: soc-acpi: add support for SoundWire-based machines

PATCH In review Pierre-Louis Bossart 4 participants 21 messages Jan 10, 2020 – Mar 14, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ASoC: soc-acpi: add support for SoundWire-based machines

SoundWire support on Intel platforms relies on ACPI _ADR fields exposed in DSDT tables, with a 64-bit value defining which link a Slave device is connected to and its partId/manufacturerID/uniqueID.

The existing definitions based on a globally-visible _HID used for I2C/I2S are no longer sufficient and need to be extended to detect during the probe steps which machine driver should be selected.

This patchset adds the structure changes, and a set of static tables already used by Intel developers and customers. These tables are provided ahead of time, but they will only be used once all SoundWire-related parts are merged upstream and SoundWire is enabled in the builds.

For reference, the complete set of 100+ patches required for SoundWire on Intel platforms is available here:

https://github.com/thesofproject/linux/pull/1692

Bard Liao (1):
ASoC: Intel: common: add match tables for ICL w/ SoundWire

Pierre-Louis Bossart (4):
ASoC: soc-acpi: add _ADR-based link descriptors
ASoC: Intel: common: soc-acpi: declare new tables for SoundWire
ASoC: Intel: common: add match tables for TGL w/ SoundWire
ASoC: SOF: Intel: reference SoundWire machine lists

Rander Wang (1):
ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire

 include/sound/soc-acpi-intel-match.h          |  6 ++
 include/sound/soc-acpi.h                      | 21 ++++
 .../intel/common/soc-acpi-intel-cfl-match.c   |  5 +
 .../intel/common/soc-acpi-intel-cml-match.c   | 89 +++++++++++++++++
 .../intel/common/soc-acpi-intel-cnl-match.c   |  5 +
 .../intel/common/soc-acpi-intel-icl-match.c   | 98 +++++++++++++++++++
 .../intel/common/soc-acpi-intel-tgl-match.c   | 51 +++++++++-
 sound/soc/sof/sof-pci-dev.c                   |  5 +
 8 files changed, 278 insertions(+), 2 deletions(-)

base-commit: b2e2a13796889e10ba0390ab338949ba63d89462

Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#1 lore raw

PATCH 1/6 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.

---
 include/sound/soc-acpi.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
include/sound/soc-acpi.h +21 -0
index c4c997bd0379..a217a87cae86 100644
@@ -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;
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#2 lore raw

[alsa-devel] Applied "ASoC: soc-acpi: add _ADR-based link descriptors" to the asoc tree

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 <[email protected]>
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.

---
 include/sound/soc-acpi.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
include/sound/soc-acpi.h +21 -0
index c4c997bd0379..a217a87cae86 100644
@@ -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;
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#3 lore raw

PATCH 2/6 ASoC: Intel: common: soc-acpi: declare new tables for SoundWire

In reply to Pierre-Louis Bossart

We cannot really lump SoundWire-based configurations into the same tables since the mechanisms to identify boards is based on link configurations and _ADR instead of _HID for I2S, so define new tables

---
 include/sound/soc-acpi-intel-match.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/sound/soc-acpi-intel-match.h +6 -0
index 20c0bee3b959..ab6f75a86611 100644
@@ -31,6 +31,12 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[];
 
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[];
+
 /*
  * generic table used for HDA codec-based platforms, possibly with
  * additional ACPI-enumerated codecs
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#4 lore raw

[alsa-devel] Applied "ASoC: Intel: common: soc-acpi: declare new tables for SoundWire" to the asoc tree

The patch

ASoC: Intel: common: soc-acpi: declare new tables for SoundWire

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 cf61a42066eae88b4bb0e5528ec9f5f8e50c5343 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Fri, 10 Jan 2020 16:25:26 -0600
Subject: [PATCH] ASoC: Intel: common: soc-acpi: declare new tables for
SoundWire

We cannot really lump SoundWire-based configurations into the same tables since the mechanisms to identify boards is based on link configurations and _ADR instead of _HID for I2S, so define new tables

---
 include/sound/soc-acpi-intel-match.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/sound/soc-acpi-intel-match.h +6 -0
index 20c0bee3b959..ab6f75a86611 100644
@@ -31,6 +31,12 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[];
 extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[];
 
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[];
+extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[];
+
 /*
  * generic table used for HDA codec-based platforms, possibly with
  * additional ACPI-enumerated codecs
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#5 lore raw

PATCH 3/6 ASoC: Intel: common: add match tables for ICL w/ SoundWire

In reply to Pierre-Louis Bossart

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

---
 .../intel/common/soc-acpi-intel-icl-match.c   | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
sound/soc/intel/common/soc-acpi-intel-icl-match.c +98 -0
index 38977669b576..67e9da4635f2 100644
@@ -33,5 +33,103 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
 
+static const u64 rt700_0_adr[] = {
+	0x000010025D070000
+};
+
+static const struct snd_soc_acpi_link_adr icl_rvp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt700_0_adr),
+		.adr = rt700_0_adr,
+	},
+	{}
+};
+
+static const u64 rt711_0_adr[] = {
+	0x000010025D071100
+};
+
+static const u64 rt1308_1_adr[] = {
+	0x000110025D130800
+};
+
+static const u64 rt1308_2_adr[] = {
+	0x000210025D130800
+};
+
+static const u64 rt715_3_adr[] = {
+	0x000310025D715000
+};
+
+static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{
+		.mask = BIT(2),
+		.num_adr = ARRAY_SIZE(rt1308_2_adr),
+		.adr = rt1308_2_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt715_3_adr),
+		.adr = rt715_3_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt715_3_adr),
+		.adr = rt715_3_adr,
+	},
+	{}
+};
+
+struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
+	{
+		.link_mask = 0xF, /* 4 active links required */
+		.links = icl_3_in_1_default,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
+	},
+	{
+		.link_mask = 0xB, /* 3 active links required */
+		.links = icl_3_in_1_mono_amp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
+	},
+	{
+		.link_mask = 0x1, /* rt700 connected on link0 */
+		.links = icl_rvp,
+		.drv_name = "sdw_rt700",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt700.tplg",
+	},
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#6 lore raw

[alsa-devel] Applied "ASoC: Intel: common: add match tables for ICL w/ SoundWire" to the asoc tree

The patch

ASoC: Intel: common: add match tables for ICL w/ SoundWire

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 4313dd3efe5751238f85dd7069bee3a8bbcdbe2f Mon Sep 17 00:00:00 2001
From: Bard Liao <[email protected]>
Date: Fri, 10 Jan 2020 16:25:27 -0600
Subject: [PATCH] ASoC: Intel: common: add match tables for ICL w/ SoundWire

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

---
 .../intel/common/soc-acpi-intel-icl-match.c   | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)
sound/soc/intel/common/soc-acpi-intel-icl-match.c +98 -0
index 38977669b576..67e9da4635f2 100644
@@ -33,5 +33,103 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
 
+static const u64 rt700_0_adr[] = {
+	0x000010025D070000
+};
+
+static const struct snd_soc_acpi_link_adr icl_rvp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt700_0_adr),
+		.adr = rt700_0_adr,
+	},
+	{}
+};
+
+static const u64 rt711_0_adr[] = {
+	0x000010025D071100
+};
+
+static const u64 rt1308_1_adr[] = {
+	0x000110025D130800
+};
+
+static const u64 rt1308_2_adr[] = {
+	0x000210025D130800
+};
+
+static const u64 rt715_3_adr[] = {
+	0x000310025D715000
+};
+
+static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{
+		.mask = BIT(2),
+		.num_adr = ARRAY_SIZE(rt1308_2_adr),
+		.adr = rt1308_2_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt715_3_adr),
+		.adr = rt715_3_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{
+		.mask = BIT(3),
+		.num_adr = ARRAY_SIZE(rt715_3_adr),
+		.adr = rt715_3_adr,
+	},
+	{}
+};
+
+struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[] = {
+	{
+		.link_mask = 0xF, /* 4 active links required */
+		.links = icl_3_in_1_default,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715.tplg",
+	},
+	{
+		.link_mask = 0xB, /* 3 active links required */
+		.links = icl_3_in_1_mono_amp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt711-rt1308-rt715-mono.tplg",
+	},
+	{
+		.link_mask = 0x1, /* rt700 connected on link0 */
+		.links = icl_rvp,
+		.drv_name = "sdw_rt700",
+		.sof_fw_filename = "sof-icl.ri",
+		.sof_tplg_filename = "sof-icl-rt700.tplg",
+	},
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#7 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

In reply to Pierre-Louis Bossart

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 8 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Hi,

I just looking to this code and I miss the Kconfig selection for RT codecs
in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

I believe that those changes should be in sync with the machine description.

Thanks,
Jaroslav

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
#8 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 10 lines · Jaroslav Kysela

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 8 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Quoted 7 lines

Hi,

  I just looking to this code and I miss the Kconfig selection for RT
codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

  I believe that those changes should be in sync with the machine
description.

Sorry Jaroslav, I don't fully understand your question.

These tables are just used to
a) select a firmware file
b) select a topology file
c) select a machine driver.

The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers.

One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested.

If you want to look at the machine drivers for SOF+Realtek drivers, see

https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c

and the Kconfig that selects the relevant codec drivers is here:

https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556

Hope this helps
-Pierre

maintainer
#9 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):

Quoted 42 lines · Jaroslav Kysela
Quoted 11 lines

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 9 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Signed-off-by Pierre-Louis Bossart

<[email protected]>

Quoted 8 lines

Hi,

  I just looking to this code and I miss the Kconfig selection for RT
codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

  I believe that those changes should be in sync with the machine
description.

Sorry Jaroslav, I don't fully understand your question.

These tables are just used to
a) select a firmware file
b) select a topology file
c) select a machine driver.

The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers.

One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested.

Quoted 7 lines

If you want to look at the machine drivers for SOF+Realtek drivers, see

https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c

and the Kconfig that selects the relevant codec drivers is here:

https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556

Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, because this code in the patch is dead without the machine driver code.

Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the market.

Thanks for the clarification,
Jaroslav

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
#10 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 49 lines · Jaroslav Kysela

Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):

Quoted 48 lines · Jaroslav Kysela
Quoted 11 lines

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 9 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Signed-off-by Pierre-Louis Bossart

<[email protected]>

Quoted 8 lines

Hi,

  I just looking to this code and I miss the Kconfig selection for RT
codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

  I believe that those changes should be in sync with the machine
description.

Sorry Jaroslav, I don't fully understand your question.

These tables are just used to
a) select a firmware file
b) select a topology file
c) select a machine driver.

The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers.

One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested.

If you want to look at the machine drivers for SOF+Realtek drivers, see

https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c

and the Kconfig that selects the relevant codec drivers is here:

Quoted 8 lines
Quoted 1 line

https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556

Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, because this code in the patch is dead without the machine driver code.

Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the market.

That would be question for Pierre, I no longer work for Intel.

Signature · 1 line
~Vinod
#11 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 52 lines · Vinod Koul
Quoted 51 lines · Jaroslav Kysela

Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):

Quoted 49 lines · Jaroslav Kysela
Quoted 11 lines

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 9 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Signed-off-by Pierre-Louis Bossart

<[email protected]>

Quoted 8 lines

Hi,

  I just looking to this code and I miss the Kconfig selection for RT
codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

  I believe that those changes should be in sync with the machine
description.

Sorry Jaroslav, I don't fully understand your question.

These tables are just used to
a) select a firmware file
b) select a topology file
c) select a machine driver.

The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers.

One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested.

If you want to look at the machine drivers for SOF+Realtek drivers, see

https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c

and the Kconfig that selects the relevant codec drivers is here:

https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556

Quoted 8 lines
Quoted 6 lines

Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, because this code in the patch is dead without the machine driver code.

Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the market.

That would be question for Pierre, I no longer work for Intel.

We don't discuss product schedules or releases here.

The question was "any ETA to start merging Intel patches"...

#12 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 57 lines · Pierre-Louis Bossart
Quoted 56 lines · Vinod Koul
Quoted 55 lines · Jaroslav Kysela

Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):

Quoted 42 lines · Jaroslav Kysela
Quoted 11 lines

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):

Quoted 9 lines

From: Bard Liao <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0.

Signed-off-by Pierre-Louis Bossart

<[email protected]>

Quoted 8 lines

Hi,

  I just looking to this code and I miss the Kconfig selection for RT
codecs in the SOF SDW driver. How we can enable this driver without selecting SND_SOC_ALL_CODECS ?

  I believe that those changes should be in sync with the machine
description.

Sorry Jaroslav, I don't fully understand your question.

These tables are just used to
a) select a firmware file
b) select a topology file
c) select a machine driver.

The codec selections are not made in this module but handled by the machine drivers in sound/soc/intel/boards/. It's the same mechanism as for all other machine drivers.

One caveat is that the SOF parts and machine drivers for SoundWire have not been provided upstream just yet, since they would not build without patches in drivers/soundwire. GregKH mentioned the patches are 'sane' and provided his Reviewed-by tag. Vinod Koul still has objections to our proposals but has yet to make proposals that would work for Intel, so if you need SoundWire support in the near-term you will need to have a conversation with Vinod. The code is ready and fully-tested.

Quoted 7 lines

If you want to look at the machine drivers for SOF+Realtek drivers, see

https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c

and the Kconfig that selects the relevant codec drivers is here:

https://github.com/thesofproject/linux/blob/d05959d5021cefbbd841773ee25f6c7387e6bfd9/sound/soc/intel/boards/Kconfig#L556

Ohh, it explains all. I was looking for the 'select SND_SOC_RT711_SDW' lines in Kconfig. It's really bad to merge those pieces randomly to the ASoC tree, because this code in the patch is dead without the machine driver code.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Vinod, any ETA? It seems that the Intel's soundwire hardware is reaching the market.

That would be question for Pierre, I no longer work for Intel.

We don't discuss product schedules or releases here.

The question was "any ETA to start merging Intel patches"...

Ah, sorry I missed that part, but again that is for Pierre to answer. Am ready to merge if the series satisfies all the questions :)

Signature · 1 line
~Vinod
#13 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 5 lines
Quoted 2 lines

The question was "any ETA to start merging Intel patches"...

Ah, sorry I missed that part, but again that is for Pierre to answer. Am ready to merge if the series satisfies all the questions :)

The ball is in your court Vinod. I replied to all your suggestions and showed they cannot possibly be implemented without functionality loss or re-inventing pm_runtime.

Just to rehash the same thing, for ASoC integration a device needs to have a struct driver with a .name set, and for power management a device needs a struct driver with the pm_ops set.

So you have two alternatives to choose from, see my email from last Friday.

#14 lore raw

Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire

Quoted 9 lines · Pierre-Louis Bossart
Quoted 5 lines
Quoted 2 lines

The question was "any ETA to start merging Intel patches"...

Ah, sorry I missed that part, but again that is for Pierre to answer. Am ready to merge if the series satisfies all the questions :)

The ball is in your court Vinod. I replied to all your suggestions and showed they cannot possibly be implemented without functionality loss or re-inventing pm_runtime.

Sorry to disagree, I would not like to see Intel specific change in core. That is my only premise.

Would you have this issue if you had a standalone sdw controller(s) ?

Signature · 1 line
~Vinod
#15 lore raw

PATCH 4/6 ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire

In reply to Pierre-Louis Bossart

From: Rander Wang <[email protected]>

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link1.

For now we only have definitions for CML. CNL and CFL are just placeholders.

---
 .../intel/common/soc-acpi-intel-cfl-match.c   |  5 ++
 .../intel/common/soc-acpi-intel-cml-match.c   | 89 +++++++++++++++++++
 .../intel/common/soc-acpi-intel-cnl-match.c   |  5 ++
 3 files changed, 99 insertions(+)
sound/soc/intel/common/soc-acpi-intel-cfl-match.c +5 -0
index d6fd2026d0b8..ff9d6938b9f6 100644
@@ -14,5 +14,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cfl_machines);
 
+struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[] = {
+	{}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cfl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
sound/soc/intel/common/soc-acpi-intel-cml-match.c +89 -0

94 lines not on this page · raw message

sound/soc/intel/common/soc-acpi-intel-cnl-match.c +5 -0
index 27588841c8b0..828980d5630d 100644
@@ -27,5 +27,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
 
+struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = {
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#16 lore raw

[alsa-devel] Applied "ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire" to the asoc tree

The patch

ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire

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 db0b9efb989f01aa7145d30bcdbfb6b07e238875 Mon Sep 17 00:00:00 2001
From: Rander Wang <[email protected]>
Date: Fri, 10 Jan 2020 16:25:28 -0600
Subject: [PATCH] ASoC: Intel: common: add match tables for CNL/CFL/CML w/
SoundWire

The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link1.

For now we only have definitions for CML. CNL and CFL are just placeholders.

---
 .../intel/common/soc-acpi-intel-cfl-match.c   |  5 ++
 .../intel/common/soc-acpi-intel-cml-match.c   | 89 +++++++++++++++++++
 .../intel/common/soc-acpi-intel-cnl-match.c   |  5 ++
 3 files changed, 99 insertions(+)
sound/soc/intel/common/soc-acpi-intel-cfl-match.c +5 -0
index d6fd2026d0b8..ff9d6938b9f6 100644
@@ -14,5 +14,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cfl_machines);
 
+struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[] = {
+	{}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cfl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
sound/soc/intel/common/soc-acpi-intel-cml-match.c +89 -0

94 lines not on this page · raw message

sound/soc/intel/common/soc-acpi-intel-cnl-match.c +5 -0
index 27588841c8b0..828980d5630d 100644
@@ -27,5 +27,10 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_machines);
 
+struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[] = {
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cnl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#17 lore raw

PATCH 5/6 ASoC: Intel: common: add match tables for TGL w/ SoundWire

In reply to Pierre-Louis Bossart

RT711 is in SoundWire mode on link0.
RT1308 is either on SSP2 or on SoundWire link1 (depending on hardware reworks).

---
 .../intel/common/soc-acpi-intel-tgl-match.c   | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +49 -2
index b4687a5d1962..5984dd151f3e 100644
@@ -14,12 +14,46 @@ static struct snd_soc_acpi_codecs tgl_codecs = {
 	.codecs = {"MX98357A"}
 };
 
+static const u64 rt711_0_adr[] = {
+	0x000010025D071100
+};
+
+static const u64 rt1308_1_adr[] = {
+	0x000120025D130800,
+	0x000122025D130800
+};
+
+static const struct snd_soc_acpi_link_adr tgl_i2s_rt1308[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_link_adr tgl_rvp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{}
+};
+
 struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
 	{
 		.id = "10EC1308",
-		.drv_name = "tgl_rt1308",
+		.drv_name = "rt711_rt1308",
+		.link_mask = 0x1, /* RT711 on SoundWire link0 */
+		.links = tgl_i2s_rt1308,
 		.sof_fw_filename = "sof-tgl.ri",
-		.sof_tplg_filename = "sof-tgl-rt1308.tplg",
+		.sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
 	},
 	{
 		.id = "10EC5682",
@@ -33,5 +67,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
 
+/* this table is used when there is no I2S codec present */
+struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
+	{
+		.link_mask = 0x3, /* rt711 on link 0 and 2 rt1308s on link 1 */
+		.links = tgl_rvp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-tgl.ri",
+		.sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
+	},
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#18 lore raw

[alsa-devel] Applied "ASoC: Intel: common: add match tables for TGL w/ SoundWire" to the asoc tree

The patch

ASoC: Intel: common: add match tables for TGL w/ SoundWire

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 d985d208bf8f079979f284864a6d08900597ee04 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Fri, 10 Jan 2020 16:25:29 -0600
Subject: [PATCH] ASoC: Intel: common: add match tables for TGL w/ SoundWire

RT711 is in SoundWire mode on link0.
RT1308 is either on SSP2 or on SoundWire link1 (depending on hardware reworks).

---
 .../intel/common/soc-acpi-intel-tgl-match.c   | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)
sound/soc/intel/common/soc-acpi-intel-tgl-match.c +49 -2
index b4687a5d1962..5984dd151f3e 100644
@@ -14,12 +14,46 @@ static struct snd_soc_acpi_codecs tgl_codecs = {
 	.codecs = {"MX98357A"}
 };
 
+static const u64 rt711_0_adr[] = {
+	0x000010025D071100
+};
+
+static const u64 rt1308_1_adr[] = {
+	0x000120025D130800,
+	0x000122025D130800
+};
+
+static const struct snd_soc_acpi_link_adr tgl_i2s_rt1308[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{}
+};
+
+static const struct snd_soc_acpi_link_adr tgl_rvp[] = {
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt711_0_adr),
+		.adr = rt711_0_adr,
+	},
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt1308_1_adr),
+		.adr = rt1308_1_adr,
+	},
+	{}
+};
+
 struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
 	{
 		.id = "10EC1308",
-		.drv_name = "tgl_rt1308",
+		.drv_name = "rt711_rt1308",
+		.link_mask = 0x1, /* RT711 on SoundWire link0 */
+		.links = tgl_i2s_rt1308,
 		.sof_fw_filename = "sof-tgl.ri",
-		.sof_tplg_filename = "sof-tgl-rt1308.tplg",
+		.sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
 	},
 	{
 		.id = "10EC5682",
@@ -33,5 +67,18 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_machines);
 
+/* this table is used when there is no I2S codec present */
+struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[] = {
+	{
+		.link_mask = 0x3, /* rt711 on link 0 and 2 rt1308s on link 1 */
+		.links = tgl_rvp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-tgl.ri",
+		.sof_tplg_filename = "sof-tgl-rt711-rt1308.tplg",
+	},
+	{},
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_tgl_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#19 lore raw

PATCH 6/6 ASoC: SOF: Intel: reference SoundWire machine lists

In reply to Pierre-Louis Bossart

Use static tables to automatically select the relevant configurations.

---
 sound/soc/sof/sof-pci-dev.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/sof/sof-pci-dev.c +5 -0
index 9993be36d105..d855bc2b76ad 100644
@@ -118,6 +118,7 @@ static const struct sof_dev_desc tng_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE)
 static const struct sof_dev_desc cnl_desc = {
 	.machines		= snd_soc_acpi_intel_cnl_machines,
+	.alt_machines		= snd_soc_acpi_intel_cnl_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -135,6 +136,7 @@ static const struct sof_dev_desc cnl_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
 static const struct sof_dev_desc cfl_desc = {
 	.machines		= snd_soc_acpi_intel_cfl_machines,
+	.alt_machines		= snd_soc_acpi_intel_cfl_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -154,6 +156,7 @@ static const struct sof_dev_desc cfl_desc = {
 
 static const struct sof_dev_desc cml_desc = {
 	.machines		= snd_soc_acpi_intel_cml_machines,
+	.alt_machines		= snd_soc_acpi_intel_cml_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -171,6 +174,7 @@ static const struct sof_dev_desc cml_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
 static const struct sof_dev_desc icl_desc = {
 	.machines               = snd_soc_acpi_intel_icl_machines,
+	.alt_machines		= snd_soc_acpi_intel_icl_sdw_machines,
 	.resindex_lpe_base      = 0,
 	.resindex_pcicfg_base   = -1,
 	.resindex_imr_base      = -1,
@@ -188,6 +192,7 @@ static const struct sof_dev_desc icl_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE)
 static const struct sof_dev_desc tgl_desc = {
 	.machines               = snd_soc_acpi_intel_tgl_machines,
+	.alt_machines		= snd_soc_acpi_intel_tgl_sdw_machines,
 	.resindex_lpe_base      = 0,
 	.resindex_pcicfg_base   = -1,
 	.resindex_imr_base      = -1,
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
maintainer
#20 lore raw

[alsa-devel] Applied "ASoC: SOF: Intel: reference SoundWire machine lists" to the asoc tree

The patch

ASoC: SOF: Intel: reference SoundWire machine lists

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 5732c0fc53eb45565c485a886d027c0b1f86d4c5 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <[email protected]>
Date: Fri, 10 Jan 2020 16:25:30 -0600
Subject: [PATCH] ASoC: SOF: Intel: reference SoundWire machine lists

Use static tables to automatically select the relevant configurations.

---
 sound/soc/sof/sof-pci-dev.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/sof/sof-pci-dev.c +5 -0
index 9993be36d105..d855bc2b76ad 100644
@@ -118,6 +118,7 @@ static const struct sof_dev_desc tng_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_CANNONLAKE)
 static const struct sof_dev_desc cnl_desc = {
 	.machines		= snd_soc_acpi_intel_cnl_machines,
+	.alt_machines		= snd_soc_acpi_intel_cnl_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -135,6 +136,7 @@ static const struct sof_dev_desc cnl_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COFFEELAKE)
 static const struct sof_dev_desc cfl_desc = {
 	.machines		= snd_soc_acpi_intel_cfl_machines,
+	.alt_machines		= snd_soc_acpi_intel_cfl_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -154,6 +156,7 @@ static const struct sof_dev_desc cfl_desc = {
 
 static const struct sof_dev_desc cml_desc = {
 	.machines		= snd_soc_acpi_intel_cml_machines,
+	.alt_machines		= snd_soc_acpi_intel_cml_sdw_machines,
 	.resindex_lpe_base	= 0,
 	.resindex_pcicfg_base	= -1,
 	.resindex_imr_base	= -1,
@@ -171,6 +174,7 @@ static const struct sof_dev_desc cml_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_ICELAKE)
 static const struct sof_dev_desc icl_desc = {
 	.machines               = snd_soc_acpi_intel_icl_machines,
+	.alt_machines		= snd_soc_acpi_intel_icl_sdw_machines,
 	.resindex_lpe_base      = 0,
 	.resindex_pcicfg_base   = -1,
 	.resindex_imr_base      = -1,
@@ -188,6 +192,7 @@ static const struct sof_dev_desc icl_desc = {
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE)
 static const struct sof_dev_desc tgl_desc = {
 	.machines               = snd_soc_acpi_intel_tgl_machines,
+	.alt_machines		= snd_soc_acpi_intel_tgl_sdw_machines,
 	.resindex_lpe_base      = 0,
 	.resindex_pcicfg_base   = -1,
 	.resindex_imr_base      = -1,
Signature · 6 lines
2.20.1

_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel