All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
	kai.vehmanen@linux.intel.com, daniel.baluta@nxp.com,
	lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com,
	Bard Liao <yung-chuan.liao@linux.intel.com>
Subject: [PATCH 6/6] ASoC: Intel: add support for new SoundWire hardware layout on TGL
Date: Wed, 23 Sep 2020 11:05:14 +0300	[thread overview]
Message-ID: <20200923080514.3242858-7-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20200923080514.3242858-1-kai.vehmanen@linux.intel.com>

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

The creativity of hardware folks is endless, with a complete
permutation of rt711 (was link0 now link1), rt1308 (was link1 now
link2) and rt715 (was link3 now link0).

Someday we will get all this information from platform firmware, for
now let's add the mapping table.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw.c              |  9 ++++
 .../intel/common/soc-acpi-intel-tgl-match.c   | 53 +++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 8e191a8d5dc5..b56df04775c2 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -48,6 +48,15 @@ static int sof_sdw_quirk_cb(const struct dmi_system_id *id)
 }
 
 static const struct dmi_system_id sof_sdw_quirk_table[] = {
+	{
+		.callback = sof_sdw_quirk_cb,
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A3E")
+		},
+		.driver_data = (void *)(SOF_RT711_JD_SRC_JD2 |
+					SOF_RT715_DAI_ID_FIX),
+	},
 	{
 		.callback = sof_sdw_quirk_cb,
 		.matches = {
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 76f4eaf684b0..9f243e60b95c 100644
--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
@@ -44,6 +44,15 @@ static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
 	}
 };
 
+static const struct snd_soc_acpi_adr_device rt711_1_adr[] = {
+	{
+		.adr = 0x000120025D071100,
+		.num_endpoints = 1,
+		.endpoints = &single_endpoint,
+		.name_prefix = "rt711"
+	}
+};
+
 static const struct snd_soc_acpi_adr_device rt1308_1_dual_adr[] = {
 	{
 		.adr = 0x000120025D130800,
@@ -68,6 +77,15 @@ static const struct snd_soc_acpi_adr_device rt1308_1_single_adr[] = {
 	}
 };
 
+static const struct snd_soc_acpi_adr_device rt1308_2_single_adr[] = {
+	{
+		.adr = 0x000220025D130800,
+		.num_endpoints = 1,
+		.endpoints = &single_endpoint,
+		.name_prefix = "rt1308-1"
+	}
+};
+
 static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
 	{
 		.adr = 0x000120025D130800,
@@ -86,6 +104,15 @@ static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
 	}
 };
 
+static const struct snd_soc_acpi_adr_device rt715_0_adr[] = {
+	{
+		.adr = 0x000021025D071500,
+		.num_endpoints = 1,
+		.endpoints = &single_endpoint,
+		.name_prefix = "rt715"
+	}
+};
+
 static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
 	{
 		.adr = 0x000320025D071500,
@@ -235,6 +262,25 @@ static const struct snd_soc_acpi_link_adr tgl_3_in_1_mono_amp[] = {
 	{}
 };
 
+static const struct snd_soc_acpi_link_adr tgl_sdw_rt711_link1_rt1308_link2_rt715_link0[] = {
+	{
+		.mask = BIT(1),
+		.num_adr = ARRAY_SIZE(rt711_1_adr),
+		.adr_d = rt711_1_adr,
+	},
+	{
+		.mask = BIT(2),
+		.num_adr = ARRAY_SIZE(rt1308_2_single_adr),
+		.adr_d = rt1308_2_single_adr,
+	},
+	{
+		.mask = BIT(0),
+		.num_adr = ARRAY_SIZE(rt715_0_adr),
+		.adr_d = rt715_0_adr,
+	},
+	{}
+};
+
 static const struct snd_soc_acpi_link_adr tgl_3_in_1_sdca[] = {
 	{
 		.mask = BIT(0),
@@ -295,6 +341,13 @@ 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 = 0x7,
+		.links = tgl_sdw_rt711_link1_rt1308_link2_rt715_link0,
+		.drv_name = "sof_sdw",
+		.sof_fw_filename = "sof-tgl.ri",
+		.sof_tplg_filename = "sof-tgl-rt715-rt711-rt1308-mono.tplg",
+	},
 	{
 		.link_mask = 0xF, /* 4 active links required */
 		.links = tgl_3_in_1_default,
-- 
2.27.0


  parent reply	other threads:[~2020-09-23  8:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  8:05 [PATCH 0/6] ASoC: Intel: sdw machine driver updates for 5.10 Kai Vehmanen
2020-09-23  8:05 ` [PATCH 1/6] ASOC: Intel: sof_sdw: restore playback functionality with max98373 amps Kai Vehmanen
2020-09-23 16:36   ` Mark Brown
2020-09-23 17:23     ` Kai Vehmanen
2020-09-23  8:05 ` [PATCH 2/6] ASoC: Intel: sof_sdw: remove ternary operator Kai Vehmanen
2020-09-23  8:05 ` [PATCH 3/6] ASoC: Intel: add codec name prefix to ACPI machine description Kai Vehmanen
2020-09-23  8:05 ` [PATCH 4/6] ASoC: Intel: sof_sdw: remove hard-coded codec_conf table Kai Vehmanen
2020-09-23  8:05 ` [PATCH 5/6] ASoC: Intel: sof_sdw_rt700: add codec prefix Kai Vehmanen
2020-09-23  8:34   ` Jaroslav Kysela
2020-09-23  9:25     ` Kai Vehmanen
2020-09-23  9:31       ` Jaroslav Kysela
2020-09-23  9:57     ` Bard liao
2020-09-23  8:05 ` Kai Vehmanen [this message]
2020-09-23 19:00 ` [PATCH 0/6] ASoC: Intel: sdw machine driver updates for 5.10 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200923080514.3242858-7-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=guennadi.liakhovetski@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.