2021-10-29 17:18:12

by Brent Lu

[permalink] [raw]
Subject: [PATCH v5 0/6] Multiple headphone codec driver support

Support multiple headphone drivers in same machine driver. In this
case, both rt5682 and rt5682s are supported and enumerated by different
ACPI HID "10EC5682" and "RTL5682".

V2 Changes:
- remove useless 'NULL', 'false' in if-condition
- can use 'comp_ids' field alone to enumerate driver
- add comma to the end of entry in structure initialization
- keep the table of byt/cht/cml/icl untouched

V3 Changes:
- upstreamd from SOF github, PR#3200
- use new compatiable IDs to shrink the enumerate table of BYT and CHT
- add 'const' to snd_soc_acpi_codecs structures

V4 Changes:
- add signoff to patch 4~6

V5 Changes:
- none, just rebase for patch 3 conflict

Brent Lu (3):
ASoC: soc-acpi: add comp_ids field for machine driver matching
ASoC: Intel: sof_rt5682: detect codec variant in probe function
ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s

Pierre-Louis Bossart (3):
ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs
ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs
ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs

include/sound/soc-acpi.h | 3 +
sound/soc/intel/boards/sof_rt5682.c | 34 ++-------
.../intel/common/soc-acpi-intel-adl-match.c | 11 ++-
.../intel/common/soc-acpi-intel-bxt-match.c | 2 +-
.../intel/common/soc-acpi-intel-byt-match.c | 68 +++++++-----------
.../intel/common/soc-acpi-intel-cht-match.c | 69 +++++++------------
.../intel/common/soc-acpi-intel-cml-match.c | 8 +--
.../intel/common/soc-acpi-intel-glk-match.c | 2 +-
.../intel/common/soc-acpi-intel-jsl-match.c | 43 ++++--------
.../intel/common/soc-acpi-intel-kbl-match.c | 12 ++--
.../intel/common/soc-acpi-intel-skl-match.c | 2 +-
.../intel/common/soc-acpi-intel-tgl-match.c | 11 ++-
sound/soc/soc-acpi.c | 24 ++++++-
13 files changed, 119 insertions(+), 170 deletions(-)

--
2.25.1


2021-10-29 17:18:48

by Brent Lu

[permalink] [raw]
Subject: [PATCH v5 4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs

From: Pierre-Louis Bossart <[email protected]>

We have multiple entries for the same codecs, use the new compatible
IDs to have a single entry.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Brent Lu <[email protected]>
---
.../intel/common/soc-acpi-intel-byt-match.c | 68 +++++++------------
1 file changed, 24 insertions(+), 44 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
index 510a5f38b7f1..142000991813 100644
--- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c
@@ -120,9 +120,29 @@ static struct snd_soc_acpi_mach *byt_quirk(void *arg)
}
}

+static const struct snd_soc_acpi_codecs rt5640_comp_ids = {
+ .num_codecs = 3,
+ .codecs = { "10EC5640", "10EC5642", "INTCCFFD"},
+};
+
+static const struct snd_soc_acpi_codecs wm5102_comp_ids = {
+ .num_codecs = 2,
+ .codecs = { "WM510204", "WM510205"},
+};
+
+static const struct snd_soc_acpi_codecs da7213_comp_ids = {
+ .num_codecs = 2,
+ .codecs = { "DGLS7212", "DGLS7213"},
+};
+
+static const struct snd_soc_acpi_codecs rt5645_comp_ids = {
+ .num_codecs = 2,
+ .codecs = { "10EC5645", "10EC5648"},
+};
+
struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
{
- .id = "10EC5640",
+ .comp_ids = &rt5640_comp_ids,
.drv_name = "bytcr_rt5640",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_rt5640",
@@ -130,22 +150,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5640.tplg",
},
- {
- .id = "10EC5642",
- .drv_name = "bytcr_rt5640",
- .fw_filename = "intel/fw_sst_0f28.bin",
- .board = "bytcr_rt5640",
- .sof_fw_filename = "sof-byt.ri",
- .sof_tplg_filename = "sof-byt-rt5640.tplg",
- },
- {
- .id = "INTCCFFD",
- .drv_name = "bytcr_rt5640",
- .fw_filename = "intel/fw_sst_0f28.bin",
- .board = "bytcr_rt5640",
- .sof_fw_filename = "sof-byt.ri",
- .sof_tplg_filename = "sof-byt-rt5640.tplg",
- },
{
.id = "10EC5651",
.drv_name = "bytcr_rt5651",
@@ -155,7 +159,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.sof_tplg_filename = "sof-byt-rt5651.tplg",
},
{
- .id = "WM510204",
+ .comp_ids = &wm5102_comp_ids,
.drv_name = "bytcr_wm5102",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_wm5102",
@@ -163,23 +167,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.sof_tplg_filename = "sof-byt-wm5102.tplg",
},
{
- .id = "WM510205",
- .drv_name = "bytcr_wm5102",
- .fw_filename = "intel/fw_sst_0f28.bin",
- .board = "bytcr_wm5102",
- .sof_fw_filename = "sof-byt.ri",
- .sof_tplg_filename = "sof-byt-wm5102.tplg",
- },
- {
- .id = "DLGS7212",
- .drv_name = "bytcht_da7213",
- .fw_filename = "intel/fw_sst_0f28.bin",
- .board = "bytcht_da7213",
- .sof_fw_filename = "sof-byt.ri",
- .sof_tplg_filename = "sof-byt-da7213.tplg",
- },
- {
- .id = "DLGS7213",
+ .comp_ids = &da7213_comp_ids,
.drv_name = "bytcht_da7213",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcht_da7213",
@@ -202,15 +190,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
},
/* some Baytrail platforms rely on RT5645, use CHT machine driver */
{
- .id = "10EC5645",
- .drv_name = "cht-bsw-rt5645",
- .fw_filename = "intel/fw_sst_0f28.bin",
- .board = "cht-bsw",
- .sof_fw_filename = "sof-byt.ri",
- .sof_tplg_filename = "sof-byt-rt5645.tplg",
- },
- {
- .id = "10EC5648",
+ .comp_ids = &rt5645_comp_ids,
.drv_name = "cht-bsw-rt5645",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "cht-bsw",
--
2.25.1

2021-10-29 17:19:06

by Brent Lu

[permalink] [raw]
Subject: [PATCH v5 6/6] ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs

From: Pierre-Louis Bossart <[email protected]>

'const' qualifiers are missing on some platforms, add as needed.

Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Brent Lu <[email protected]>
---
sound/soc/intel/common/soc-acpi-intel-bxt-match.c | 2 +-
sound/soc/intel/common/soc-acpi-intel-cml-match.c | 8 ++++----
sound/soc/intel/common/soc-acpi-intel-glk-match.c | 2 +-
sound/soc/intel/common/soc-acpi-intel-jsl-match.c | 8 ++++----
sound/soc/intel/common/soc-acpi-intel-kbl-match.c | 12 ++++++------
sound/soc/intel/common/soc-acpi-intel-skl-match.c | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c
index 78cfdc48ad45..342d34052204 100644
--- a/sound/soc/intel/common/soc-acpi-intel-bxt-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-bxt-match.c
@@ -41,7 +41,7 @@ static struct snd_soc_acpi_mach *apl_quirk(void *arg)
return mach;
}

-static struct snd_soc_acpi_codecs bxt_codecs = {
+static const struct snd_soc_acpi_codecs bxt_codecs = {
.num_codecs = 1,
.codecs = {"MX98357A"}
};
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 b591c6fd13fd..b4eb0c97edf1 100644
--- a/sound/soc/intel/common/soc-acpi-intel-cml-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-cml-match.c
@@ -9,22 +9,22 @@
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>

-static struct snd_soc_acpi_codecs rt1011_spk_codecs = {
+static const struct snd_soc_acpi_codecs rt1011_spk_codecs = {
.num_codecs = 1,
.codecs = {"10EC1011"}
};

-static struct snd_soc_acpi_codecs rt1015_spk_codecs = {
+static const struct snd_soc_acpi_codecs rt1015_spk_codecs = {
.num_codecs = 1,
.codecs = {"10EC1015"}
};

-static struct snd_soc_acpi_codecs max98357a_spk_codecs = {
+static const struct snd_soc_acpi_codecs max98357a_spk_codecs = {
.num_codecs = 1,
.codecs = {"MX98357A"}
};

-static struct snd_soc_acpi_codecs max98390_spk_codecs = {
+static const struct snd_soc_acpi_codecs max98390_spk_codecs = {
.num_codecs = 1,
.codecs = {"MX98390"}
};
diff --git a/sound/soc/intel/common/soc-acpi-intel-glk-match.c b/sound/soc/intel/common/soc-acpi-intel-glk-match.c
index 3900e3dbae30..8492b7e2a945 100644
--- a/sound/soc/intel/common/soc-acpi-intel-glk-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-glk-match.c
@@ -9,7 +9,7 @@
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>

-static struct snd_soc_acpi_codecs glk_codecs = {
+static const struct snd_soc_acpi_codecs glk_codecs = {
.num_codecs = 1,
.codecs = {"MX98357A"}
};
diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
index ee703701bff2..278ec196da7b 100644
--- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
@@ -9,22 +9,22 @@
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>

-static struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {
+static const struct snd_soc_acpi_codecs jsl_7219_98373_codecs = {
.num_codecs = 1,
.codecs = {"MX98373"}
};

-static struct snd_soc_acpi_codecs rt1015_spk = {
+static const struct snd_soc_acpi_codecs rt1015_spk = {
.num_codecs = 1,
.codecs = {"10EC1015"}
};

-static struct snd_soc_acpi_codecs rt1015p_spk = {
+static const struct snd_soc_acpi_codecs rt1015p_spk = {
.num_codecs = 1,
.codecs = {"RTL1015"}
};

-static struct snd_soc_acpi_codecs mx98360a_spk = {
+static const struct snd_soc_acpi_codecs mx98360a_spk = {
.num_codecs = 1,
.codecs = {"MX98360A"}
};
diff --git a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c
index 741bf2f9e081..4e817f559d38 100644
--- a/sound/soc/intel/common/soc-acpi-intel-kbl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-kbl-match.c
@@ -12,32 +12,32 @@

static struct skl_machine_pdata skl_dmic_data;

-static struct snd_soc_acpi_codecs kbl_codecs = {
+static const struct snd_soc_acpi_codecs kbl_codecs = {
.num_codecs = 1,
.codecs = {"10508825"}
};

-static struct snd_soc_acpi_codecs kbl_poppy_codecs = {
+static const struct snd_soc_acpi_codecs kbl_poppy_codecs = {
.num_codecs = 1,
.codecs = {"10EC5663"}
};

-static struct snd_soc_acpi_codecs kbl_5663_5514_codecs = {
+static const struct snd_soc_acpi_codecs kbl_5663_5514_codecs = {
.num_codecs = 2,
.codecs = {"10EC5663", "10EC5514"}
};

-static struct snd_soc_acpi_codecs kbl_7219_98357_codecs = {
+static const struct snd_soc_acpi_codecs kbl_7219_98357_codecs = {
.num_codecs = 1,
.codecs = {"MX98357A"}
};

-static struct snd_soc_acpi_codecs kbl_7219_98927_codecs = {
+static const struct snd_soc_acpi_codecs kbl_7219_98927_codecs = {
.num_codecs = 1,
.codecs = {"MX98927"}
};

-static struct snd_soc_acpi_codecs kbl_7219_98373_codecs = {
+static const struct snd_soc_acpi_codecs kbl_7219_98373_codecs = {
.num_codecs = 1,
.codecs = {"MX98373"}
};
diff --git a/sound/soc/intel/common/soc-acpi-intel-skl-match.c b/sound/soc/intel/common/soc-acpi-intel-skl-match.c
index 961df8d6b5e4..75302e956742 100644
--- a/sound/soc/intel/common/soc-acpi-intel-skl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-skl-match.c
@@ -12,7 +12,7 @@

static struct skl_machine_pdata skl_dmic_data;

-static struct snd_soc_acpi_codecs skl_codecs = {
+static const struct snd_soc_acpi_codecs skl_codecs = {
.num_codecs = 1,
.codecs = {"10508825"}
};
--
2.25.1

2021-10-29 17:19:41

by Brent Lu

[permalink] [raw]
Subject: [PATCH v5 3/6] ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s

Use comp_ids field to enumerate rt5682/rt5682s headphone codec for
JSL/TGL/ADL devices and remove redundant entries in tables.

Signed-off-by: Brent Lu <[email protected]>
---
sound/soc/intel/boards/sof_rt5682.c | 30 ----------------
.../intel/common/soc-acpi-intel-adl-match.c | 11 ++++--
.../intel/common/soc-acpi-intel-jsl-match.c | 35 +++++--------------
.../intel/common/soc-acpi-intel-tgl-match.c | 11 ++++--
4 files changed, 24 insertions(+), 63 deletions(-)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index c41c584379d9..c41f386b4138 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -1050,36 +1050,6 @@ static const struct platform_device_id board_ids[] = {
SOF_RT5682_SSP_AMP(2) |
SOF_RT5682_NUM_HDMIDEV(4)),
},
- {
- .name = "jsl_rt5682s_rt1015",
- .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
- SOF_RT5682_MCLK_24MHZ |
- SOF_RT5682_SSP_CODEC(0) |
- SOF_RT5682S_HEADPHONE_CODEC_PRESENT |
- SOF_SPEAKER_AMP_PRESENT |
- SOF_RT1015_SPEAKER_AMP_PRESENT |
- SOF_RT5682_SSP_AMP(1)),
- },
- {
- .name = "jsl_rt5682s_rt1015p",
- .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
- SOF_RT5682_MCLK_24MHZ |
- SOF_RT5682_SSP_CODEC(0) |
- SOF_RT5682S_HEADPHONE_CODEC_PRESENT |
- SOF_SPEAKER_AMP_PRESENT |
- SOF_RT1015P_SPEAKER_AMP_PRESENT |
- SOF_RT5682_SSP_AMP(1)),
- },
- {
- .name = "jsl_rt5682s_mx98360",
- .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
- SOF_RT5682_MCLK_24MHZ |
- SOF_RT5682_SSP_CODEC(0) |
- SOF_RT5682S_HEADPHONE_CODEC_PRESENT |
- SOF_SPEAKER_AMP_PRESENT |
- SOF_MAX98360A_SPEAKER_AMP_PRESENT |
- SOF_RT5682_SSP_AMP(1)),
- },
{
.name = "adl_mx98360_rt5682",
.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c
index f5b21a95d222..06f503452aa5 100644
--- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c
@@ -285,9 +285,14 @@ static const struct snd_soc_acpi_codecs adl_max98360a_amp = {
.codecs = {"MX98360A"}
};

+static const struct snd_soc_acpi_codecs adl_rt5682_rt5682s_hp = {
+ .num_codecs = 2,
+ .codecs = {"10EC5682", "RTL5682"},
+};
+
struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
{
- .id = "10EC5682",
+ .comp_ids = &adl_rt5682_rt5682s_hp,
.drv_name = "adl_mx98373_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98373_amp,
@@ -295,7 +300,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.sof_tplg_filename = "sof-adl-max98373-rt5682.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &adl_rt5682_rt5682s_hp,
.drv_name = "adl_mx98357_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98357a_amp,
@@ -303,7 +308,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = {
.sof_tplg_filename = "sof-adl-max98357a-rt5682.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &adl_rt5682_rt5682s_hp,
.drv_name = "adl_mx98360_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &adl_max98360a_amp,
diff --git a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
index e7d22e397299..ee703701bff2 100644
--- a/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-jsl-match.c
@@ -29,6 +29,11 @@ static struct snd_soc_acpi_codecs mx98360a_spk = {
.codecs = {"MX98360A"}
};

+static const struct snd_soc_acpi_codecs rt5682_rt5682s_hp = {
+ .num_codecs = 2,
+ .codecs = {"10EC5682", "RTL5682"},
+};
+
/*
* When adding new entry to the snd_soc_acpi_intel_jsl_machines array,
* use .quirk_data member to distinguish different machine driver,
@@ -50,7 +55,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
.sof_tplg_filename = "sof-jsl-da7219-mx98360a.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1015",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
@@ -58,7 +63,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_rt1015p",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
@@ -66,7 +71,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
.sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &rt5682_rt5682s_hp,
.drv_name = "jsl_rt5682_mx98360",
.sof_fw_filename = "sof-jsl.ri",
.machine_quirk = snd_soc_acpi_codec_list,
@@ -81,30 +86,6 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[] = {
.quirk_data = &mx98360a_spk,
.sof_tplg_filename = "sof-jsl-cs42l42-mx98360a.tplg",
},
- {
- .id = "RTL5682",
- .drv_name = "jsl_rt5682s_rt1015",
- .sof_fw_filename = "sof-jsl.ri",
- .machine_quirk = snd_soc_acpi_codec_list,
- .quirk_data = &rt1015_spk,
- .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
- },
- {
- .id = "RTL5682",
- .drv_name = "jsl_rt5682s_rt1015p",
- .sof_fw_filename = "sof-jsl.ri",
- .machine_quirk = snd_soc_acpi_codec_list,
- .quirk_data = &rt1015p_spk,
- .sof_tplg_filename = "sof-jsl-rt5682-rt1015.tplg",
- },
- {
- .id = "RTL5682",
- .drv_name = "jsl_rt5682s_mx98360",
- .sof_fw_filename = "sof-jsl.ri",
- .machine_quirk = snd_soc_acpi_codec_list,
- .quirk_data = &mx98360a_spk,
- .sof_tplg_filename = "sof-jsl-rt5682-mx98360a.tplg",
- },
{
.id = "ESSX8336",
.drv_name = "sof-essx8336",
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 9d89f01d6b84..da31bb3cca17 100644
--- a/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-tgl-match.c
@@ -358,9 +358,14 @@ static const struct snd_soc_acpi_codecs tgl_rt1011_amp = {
.codecs = {"10EC1011"}
};

+static const struct snd_soc_acpi_codecs tgl_rt5682_rt5682s_hp = {
+ .num_codecs = 2,
+ .codecs = {"10EC5682", "RTL5682"},
+};
+
struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
{
- .id = "10EC5682",
+ .comp_ids = &tgl_rt5682_rt5682s_hp,
.drv_name = "tgl_mx98357_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_codecs,
@@ -368,7 +373,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
.sof_tplg_filename = "sof-tgl-max98357a-rt5682.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &tgl_rt5682_rt5682s_hp,
.drv_name = "tgl_mx98373_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_max98373_amp,
@@ -376,7 +381,7 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[] = {
.sof_tplg_filename = "sof-tgl-max98373-rt5682.tplg",
},
{
- .id = "10EC5682",
+ .comp_ids = &tgl_rt5682_rt5682s_hp,
.drv_name = "tgl_rt1011_rt5682",
.machine_quirk = snd_soc_acpi_codec_list,
.quirk_data = &tgl_rt1011_amp,
--
2.25.1

2021-10-29 20:57:34

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v5 0/6] Multiple headphone codec driver support

On Sat, 30 Oct 2021 01:14:03 +0800, Brent Lu wrote:
> Support multiple headphone drivers in same machine driver. In this
> case, both rt5682 and rt5682s are supported and enumerated by different
> ACPI HID "10EC5682" and "RTL5682".
>
> V2 Changes:
> - remove useless 'NULL', 'false' in if-condition
> - can use 'comp_ids' field alone to enumerate driver
> - add comma to the end of entry in structure initialization
> - keep the table of byt/cht/cml/icl untouched
>
> [...]

Applied to

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

Thanks!

[1/6] ASoC: soc-acpi: add comp_ids field for machine driver matching
commit: cafa39b650ec3ba8e9efa0825f1c08e029b5a1ed
[2/6] ASoC: Intel: sof_rt5682: detect codec variant in probe function
commit: 8fe6ec03183ac04fa6529fdf0d4da1328946a9d0
[3/6] ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s
commit: d4f3fdc2b7e16e8203c5d55bb91d6572647d4b0f
[4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs
commit: dac7cbd55dca4fd9e646e37401079ebfae3935e0
[5/6] ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs
commit: 959ae8215a9e8955f45b41e274a1294d7c9aba1b
[6/6] ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs
commit: 9a5d96add514079660b3f1270a55f8c2dbdbc1b6

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

2021-11-30 17:19:05

by youling 257

[permalink] [raw]
Subject: Re: [PATCH v5 4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs

This patch cause Bay trail-CR z3735f tablet rt5640 no sound, bytcr_rt5640 bytcr_rt5640: Error cannot find '' dev.

2021-11-30 18:27:52

by Brent Lu

[permalink] [raw]
Subject: RE: [PATCH v5 4/6] ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs

>
> This patch cause Bay trail-CR z3735f tablet rt5640 no sound, bytcr_rt5640
> bytcr_rt5640: Error cannot find '' dev.

The fix 28c916ade1bd("ASoC: soc-acpi: Set mach->id field on comp_ids matches") was submitted to for-linus branch.