ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
Subsystems (3)
PATCH 1/1 ASoC: Intel: bytcr_rt5640: Add quirks for DeeQ X5-Z8300
DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add quirks to select the correct input map, jack-detect options to enable jack sensing and internal/headset microphones.
--- sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/intel/boards/bytcr_rt5651.c +8 -0
@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { BYT_RT5651_SSP0_AIF1 | BYT_RT5651_MONO_SPEAKER), }, + { + .callback = byt_rt5651_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"), + DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"), + }, + .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1), + }, {} };
Signature · 1 line
2.20.1
Quoted 30 lines · Chris Chiu
DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add quirks to select the correct input map, jack-detect options to enable jack sensing and internal/headset microphones.
Signed-off-by Chris Chiu <[email protected]>--- sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++ 1 file changed, 8 insertions(+)sound/soc/intel/boards/bytcr_rt5651.c +8
-1@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { BYT_RT5651_SSP0_AIF1 | BYT_RT5651_MONO_SPEAKER), }, + { + .callback = byt_rt5651_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"), + DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"), + }, + .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1), + }, {} }; --
Quoted 2 lines
2.20.1
Gentle ping. Cheers.
Chris
Quoted 5 lines · Chris Chiu
DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add quirks to select the correct input map, jack-detect options to enable jack sensing and internal/headset microphones.
Signed-off-by Chris Chiu <[email protected]>
You probably need to re-send and CC: maintainers (Mark Brown, Takashi Iwai) and Hans de Goede who's been supporting all those quirks.
I don't think the changes below are fully correct, most quirks start with .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
which e.g. enables the MCLK and overcurrent handling.
I wonder if what you need is
.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP)
Quoted 24 lines
--- sound/soc/intel/boards/bytcr_rt5651.c | 8 ++++++++ 1 file changed, 8 insertions(+)sound/soc/intel/boards/bytcr_rt5651.c +8
-0@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = { BYT_RT5651_SSP0_AIF1 | BYT_RT5651_MONO_SPEAKER), }, + { + .callback = byt_rt5651_quirk_cb, + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"), + DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"), + }, + .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP | BYT_RT5651_JD1_1), + }, {} };
Hi,
Quoted 11 lines · Pierre-Louis Bossart
Quoted 5 lines · Chris Chiu
DeeQ X5-Z8300 is a laptop empowered by Intel Atom Cherry Trail. Add quirks to select the correct input map, jack-detect options to enable jack sensing and internal/headset microphones.
Signed-off-by Chris Chiu <[email protected]>You probably need to re-send and CC: maintainers (Mark Brown, Takashi Iwai) and Hans de Goede who's been supporting all those quirks.
Quoted 8 lines
I don't think the changes below are fully correct, most quirks start with .driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
which e.g. enables the MCLK and overcurrent handling.
I wonder if what you need is
.driver_data = (void *)(BYT_RT5651_DEFAULT_QUIRKS |
BYT_RT5651_IN1_IN2_MAP)
Ack, BYT_RT5651_DEFAULT_QUIRKS is:
#define BYT_RT5651_DEFAULT_QUIRKS (BYT_RT5651_MCLK_EN | \
BYT_RT5651_JD1_1 | \
BYT_RT5651_OVCD_TH_2000UA | \
BYT_RT5651_OVCD_SF_0P75)So compared to the quirk from the original patch that will add:
BYT_RT5651_MCLK_ENBYT_RT5651_OVCD_TH_2000UABYT_RT5651_OVCD_SF_0P75
Since you have working jack-detect you will definitely want the latter 2 which will make headset vs headphones detection work and will add button-press detection for headsets.
BYT_RT5651_MCLK_EN is also a quirk which you almost always want, the sole exception is boards where the mclk is not connected which are very rare. Boards where the mclk is not connected are easy to spot, since they will not work at all when setting BYT_RT5651_MCLK_EN, so if things work with BYT_RT5651_DEFAULT_QUIRKS then setting BYT_RT5651_MCLK_EN is the right thing to do.
Tl;DR: use (BYT_RT5651_DEFAULT_QUIRKS | BYT_RT5651_IN1_IN2_MAP) as Pierre-Louis suggests.
Regards,
Hans
Quoted 25 lines
Quoted 24 lines
---
sound/soc/intel/boards/bytcr_rt5651.c| 8 ++++++++1 file changed, 8 insertions(+)sound/soc/intel/boards/bytcr_rt5651.c +0
-0@@ -507,6 +507,14 @@ static const struct dmi_system_id byt_rt5651_quirk_table[] = {
BYT_RT5651_SSP0_AIF1|BYT_RT5651_MONO_SPEAKER),
},
+ {
+ .callback =byt_rt5651_quirk_cb,
+ .matches = {
+DMI_MATCH(DMI_SYS_VENDOR, "DeeQ"),
+DMI_MATCH(DMI_PRODUCT_NAME, "X5-Z8300"),
+ },
+ .driver_data = (void *)(BYT_RT5651_IN1_IN2_MAP |BYT_RT5651_JD1_1), + },
{}
};