All of lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH 0/6] ASoC: soc-acpi: add support for SoundWire-based machines
@ 2020-01-10 22:25 Pierre-Louis Bossart
  2020-01-10 22:25 ` [alsa-devel] [PATCH 1/6] ASoC: soc-acpi: add _ADR-based link descriptors Pierre-Louis Bossart
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

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
-- 
2.20.1

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 1/6] ASoC: soc-acpi: add _ADR-based link descriptors
  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 ` Pierre-Louis Bossart
  2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: soc-acpi: add _ADR-based link descriptors" to the asoc tree Mark Brown
  2020-01-10 22:25 ` [alsa-devel] [PATCH 2/6] ASoC: Intel: common: soc-acpi: declare new tables for SoundWire Pierre-Louis Bossart
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Bard liao, Pierre-Louis Bossart

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>
---
 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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 2/6] ASoC: Intel: common: soc-acpi: declare new tables for SoundWire
  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-10 22:25 ` 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
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, 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

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 include/sound/soc-acpi-intel-match.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h
index 20c0bee3b959..ab6f75a86611 100644
--- a/include/sound/soc-acpi-intel-match.h
+++ b/include/sound/soc-acpi-intel-match.h
@@ -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
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  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-10 22:25 ` [alsa-devel] [PATCH 2/6] ASoC: Intel: common: soc-acpi: declare new tables for SoundWire Pierre-Louis Bossart
@ 2020-01-10 22:25 ` 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-01-10 22:25 ` [alsa-devel] [PATCH 4/6] ASoC: Intel: common: add match tables for CNL/CFL/CML " Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Bard Liao, Pierre-Louis Bossart

From: Bard Liao <yung-chuan.liao@linux.intel.com>

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: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 .../intel/common/soc-acpi-intel-icl-match.c   | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
index 38977669b576..67e9da4635f2 100644
--- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 4/6] ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire
  2020-01-10 22:25 [alsa-devel] [PATCH 0/6] ASoC: soc-acpi: add support for SoundWire-based machines Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  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-10 22:25 ` 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-10 22:25 ` [alsa-devel] [PATCH 6/6] ASoC: SOF: Intel: reference SoundWire machine lists Pierre-Louis Bossart
  5 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Bard Liao, Rander Wang, Pierre-Louis Bossart

From: Rander Wang <rander.wang@linux.intel.com>

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.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 .../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(+)

diff --git a/sound/soc/intel/common/soc-acpi-intel-cfl-match.c b/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
index d6fd2026d0b8..ff9d6938b9f6 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
@@ -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");
diff --git a/sound/soc/intel/common/soc-acpi-intel-cml-match.c b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
index fb9ba8819706..f55634c4c2e8 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
@@ -59,5 +59,94 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cml_machines);
 
+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[] = {
+	0x000310025D071500
+};
+
+static const struct snd_soc_acpi_link_adr cml_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 cml_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_cml_sdw_machines[] = {
+	{
+		.link_mask = 0xF, /* 4 active links required */
+		.links = cml_3_in_1_default,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg",
+	},
+	{
+		/*
+		 * link_mask should be 0xB, but all links are enabled by BIOS.
+		 * This entry will be selected if there is no rt1308 exposed
+		 * on link2 since it will fail to match the above entry.
+		 */
+		.link_mask = 0xF,
+		.links = cml_3_in_1_mono_amp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg",
+	},
+	{
+		.link_mask = 0x2, /* RT700 connected on Link1 */
+		.drv_name = "sdw_rt700",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt700.tplg",
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cml_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
diff --git a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
index 27588841c8b0..828980d5630d 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 5/6] ASoC: Intel: common: add match tables for TGL w/ SoundWire
  2020-01-10 22:25 [alsa-devel] [PATCH 0/6] ASoC: soc-acpi: add support for SoundWire-based machines Pierre-Louis Bossart
                   ` (3 preceding siblings ...)
  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-10 22:25 ` 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
  5 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart, Rander Wang

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

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 .../intel/common/soc-acpi-intel-tgl-match.c   | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
index b4687a5d1962..5984dd151f3e 100644
--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] [PATCH 6/6] ASoC: SOF: Intel: reference SoundWire machine lists
  2020-01-10 22:25 [alsa-devel] [PATCH 0/6] ASoC: soc-acpi: add support for SoundWire-based machines Pierre-Louis Bossart
                   ` (4 preceding siblings ...)
  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-10 22:25 ` Pierre-Louis Bossart
  2020-01-13 15:13   ` [alsa-devel] Applied "ASoC: SOF: Intel: reference SoundWire machine lists" to the asoc tree Mark Brown
  5 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-01-10 22:25 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

Use static tables to automatically select the relevant configurations.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/sof-pci-dev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 9993be36d105..d855bc2b76ad 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -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,
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: soc-acpi: add _ADR-based link descriptors" to the asoc tree
  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
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Mark Brown, Bard liao

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: Intel: common: soc-acpi: declare new tables for SoundWire" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Mark Brown

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 <pierre-louis.bossart@linux.intel.com>
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

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

diff --git a/include/sound/soc-acpi-intel-match.h b/include/sound/soc-acpi-intel-match.h
index 20c0bee3b959..ab6f75a86611 100644
--- a/include/sound/soc-acpi-intel-match.h
+++ b/include/sound/soc-acpi-intel-match.h
@@ -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
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Rander Wang
  Cc: tiwai, alsa-devel, Mark Brown, Bard Liao, Pierre-Louis Bossart

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 <rander.wang@linux.intel.com>
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.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110222530.30303-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../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(+)

diff --git a/sound/soc/intel/common/soc-acpi-intel-cfl-match.c b/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
index d6fd2026d0b8..ff9d6938b9f6 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cfl-match.c
@@ -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");
diff --git a/sound/soc/intel/common/soc-acpi-intel-cml-match.c b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
index fb9ba8819706..f55634c4c2e8 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
@@ -59,5 +59,94 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_machines[] = {
 };
 EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cml_machines);
 
+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[] = {
+	0x000310025D071500
+};
+
+static const struct snd_soc_acpi_link_adr cml_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 cml_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_cml_sdw_machines[] = {
+	{
+		.link_mask = 0xF, /* 4 active links required */
+		.links = cml_3_in_1_default,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt711-rt1308-rt715.tplg",
+	},
+	{
+		/*
+		 * link_mask should be 0xB, but all links are enabled by BIOS.
+		 * This entry will be selected if there is no rt1308 exposed
+		 * on link2 since it will fail to match the above entry.
+		 */
+		.link_mask = 0xF,
+		.links = cml_3_in_1_mono_amp,
+		.drv_name = "sdw_rt711_rt1308_rt715",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt711-rt1308-mono-rt715.tplg",
+	},
+	{
+		.link_mask = 0x2, /* RT700 connected on Link1 */
+		.drv_name = "sdw_rt700",
+		.sof_fw_filename = "sof-cml.ri",
+		.sof_tplg_filename = "sof-cml-rt700.tplg",
+	},
+	{}
+};
+EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_cml_sdw_machines);
+
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("Intel Common ACPI Match module");
diff --git a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
index 27588841c8b0..828980d5630d 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cnl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: SOF: Intel: reference SoundWire machine lists" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Mark Brown

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 <pierre-louis.bossart@linux.intel.com>
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.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110222530.30303-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sof/sof-pci-dev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index 9993be36d105..d855bc2b76ad 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -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,
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: Intel: common: add match tables for ICL w/ SoundWire" to the asoc tree
  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   ` Mark Brown
  2020-03-10 22:12   ` [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire Jaroslav Kysela
  1 sibling, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Bard Liao; +Cc: tiwai, alsa-devel, Mark Brown, Pierre-Louis Bossart

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 <yung-chuan.liao@linux.intel.com>
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.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110222530.30303-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../intel/common/soc-acpi-intel-icl-match.c   | 98 +++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
index 38977669b576..67e9da4635f2 100644
--- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [alsa-devel] Applied "ASoC: Intel: common: add match tables for TGL w/ SoundWire" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2020-01-13 15:13 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, Mark Brown, Rander Wang

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 <pierre-louis.bossart@linux.intel.com>
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).

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110222530.30303-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../intel/common/soc-acpi-intel-tgl-match.c   | 51 ++++++++++++++++++-
 1 file changed, 49 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
index b4687a5d1962..5984dd151f3e 100644
--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
@@ -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");
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  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   ` Jaroslav Kysela
  2020-03-11  1:35     ` Pierre-Louis Bossart
  1 sibling, 1 reply; 21+ messages in thread
From: Jaroslav Kysela @ 2020-03-10 22:12 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel; +Cc: tiwai, broonie, Bard Liao

Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
> From: Bard Liao <yung-chuan.liao@linux.intel.com>
> 
> 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: Bard Liao <yung-chuan.liao@linux.intel.com>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

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

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  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
  0 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-03-11  1:35 UTC (permalink / raw)
  To: Jaroslav Kysela, alsa-devel; +Cc: tiwai, broonie, Bard Liao



On 3/10/20 5:12 PM, Jaroslav Kysela wrote:
> Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
>> From: Bard Liao <yung-chuan.liao@linux.intel.com>
>>
>> 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: Bard Liao <yung-chuan.liao@linux.intel.com>
>> Signed-off-by: Pierre-Louis Bossart 
>> <pierre-louis.bossart@linux.intel.com>
> 
> 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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-11  1:35     ` Pierre-Louis Bossart
@ 2020-03-11  6:39       ` Jaroslav Kysela
  2020-03-11  9:07         ` Vinod Koul
  0 siblings, 1 reply; 21+ messages in thread
From: Jaroslav Kysela @ 2020-03-11  6:39 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel; +Cc: tiwai, Vinod, broonie, Bard Liao

Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):
> 
> 
> On 3/10/20 5:12 PM, Jaroslav Kysela wrote:
>> Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
>>> From: Bard Liao <yung-chuan.liao@linux.intel.com>
>>>
>>> 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: Bard Liao <yung-chuan.liao@linux.intel.com>
>>> Signed-off-by: Pierre-Louis Bossart
>>> <pierre-louis.bossart@linux.intel.com>
>>
>> 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

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


-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-11  6:39       ` Jaroslav Kysela
@ 2020-03-11  9:07         ` Vinod Koul
  2020-03-11 14:47           ` Pierre-Louis Bossart
  0 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2020-03-11  9:07 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: tiwai, alsa-devel, broonie, Bard Liao, Pierre-Louis Bossart

On 11-03-20, 07:39, Jaroslav Kysela wrote:
> Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):
> > 
> > 
> > On 3/10/20 5:12 PM, Jaroslav Kysela wrote:
> > > Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
> > > > From: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > > 
> > > > 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: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > > Signed-off-by: Pierre-Louis Bossart
> > > > <pierre-louis.bossart@linux.intel.com>
> > > 
> > > 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
> 
> 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.

-- 
~Vinod

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-11  9:07         ` Vinod Koul
@ 2020-03-11 14:47           ` Pierre-Louis Bossart
  2020-03-13 11:44             ` Vinod Koul
  0 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-03-11 14:47 UTC (permalink / raw)
  To: Vinod Koul, Jaroslav Kysela; +Cc: tiwai, alsa-devel, broonie, Bard Liao



On 3/11/20 4:07 AM, Vinod Koul wrote:
> On 11-03-20, 07:39, Jaroslav Kysela wrote:
>> Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):
>>>
>>>
>>> On 3/10/20 5:12 PM, Jaroslav Kysela wrote:
>>>> Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
>>>>> From: Bard Liao <yung-chuan.liao@linux.intel.com>
>>>>>
>>>>> 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: Bard Liao <yung-chuan.liao@linux.intel.com>
>>>>> Signed-off-by: Pierre-Louis Bossart
>>>>> <pierre-louis.bossart@linux.intel.com>
>>>>
>>>> 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
>>
>> 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"...


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-11 14:47           ` Pierre-Louis Bossart
@ 2020-03-13 11:44             ` Vinod Koul
  2020-03-13 16:28               ` Pierre-Louis Bossart
  0 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2020-03-13 11:44 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: tiwai, alsa-devel, broonie, Bard Liao, Pierre-Louis Bossart

On 11-03-20, 09:47, Pierre-Louis Bossart wrote:
> On 3/11/20 4:07 AM, Vinod Koul wrote:
> > On 11-03-20, 07:39, Jaroslav Kysela wrote:
> > > Dne 11. 03. 20 v 2:35 Pierre-Louis Bossart napsal(a):
> > > > 
> > > > 
> > > > On 3/10/20 5:12 PM, Jaroslav Kysela wrote:
> > > > > Dne 10. 01. 20 v 23:25 Pierre-Louis Bossart napsal(a):
> > > > > > From: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > > > > 
> > > > > > 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: Bard Liao <yung-chuan.liao@linux.intel.com>
> > > > > > Signed-off-by: Pierre-Louis Bossart
> > > > > > <pierre-louis.bossart@linux.intel.com>
> > > > > 
> > > > > 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
> > > 
> > > 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"...

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 :)

-- 
~Vinod

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-13 11:44             ` Vinod Koul
@ 2020-03-13 16:28               ` Pierre-Louis Bossart
  2020-03-14  9:37                 ` Vinod Koul
  0 siblings, 1 reply; 21+ messages in thread
From: Pierre-Louis Bossart @ 2020-03-13 16:28 UTC (permalink / raw)
  To: Vinod Koul, Jaroslav Kysela; +Cc: tiwai, alsa-devel, broonie, Bard Liao


>> 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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [alsa-devel] [PATCH 3/6] ASoC: Intel: common: add match tables for ICL w/ SoundWire
  2020-03-13 16:28               ` Pierre-Louis Bossart
@ 2020-03-14  9:37                 ` Vinod Koul
  0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2020-03-14  9:37 UTC (permalink / raw)
  To: Pierre-Louis Bossart; +Cc: tiwai, alsa-devel, broonie, Bard Liao

On 13-03-20, 11:28, Pierre-Louis Bossart wrote:
> 
> > > 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) ?

-- 
~Vinod

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-03-14  9:38 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [alsa-devel] Applied "ASoC: soc-acpi: add _ADR-based link descriptors" to the asoc tree Mark Brown
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.