From: Ian W MORRISON <ianwmorrison@gmail.com>
To: tiwai@suse.de, broonie@kernel.org, alsa-devel@alsa-project.org
Subject: [PATCH] ASoC: rt5645: Add jack detection workaround for MINIX Z83-4 based devices
Date: Wed, 30 Aug 2017 16:07:36 +1000 [thread overview]
Message-ID: <c98257b6-a5bc-a1b6-5194-cc29b6aec571@gmail.com> (raw)
The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices requires jd_mode=3
to make the jack detection work. Using a BIOS DMI product of "Z83-4"
will match both devices of 'NEO Z83-4' and 'Z83-4 Pro'.
Signed-off-by: Ian W Morrison <ianwmorrison@gmail.com>
---
sound/soc/codecs/rt5645.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 9ec5816..7d889b6 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3637,6 +3637,21 @@ static int rt5645_resume(struct snd_soc_codec *codec)
{}
};
+static struct rt5645_platform_data minix_z83_4_platform_data = {
+ .jd_mode = 3,
+};
+
+static struct dmi_system_id dmi_platform_minix_z83_4[] = {
+ {
+ .ident = "MINIX Z83-4",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MINIX"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
+ },
+ },
+ { }
+};
+
static bool rt5645_check_dp(struct device *dev)
{
if (device_property_present(dev, "realtek,in2-differential") ||
@@ -3689,6 +3704,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
rt5645->pdata = general_platform_data;
else if (dmi_check_system(dmi_platform_gpd_win))
rt5645->pdata = gpd_win_platform_data;
+ else if (dmi_check_system(dmi_platform_minix_z83_4))
+ rt5645->pdata = minix_z83_4_platform_data;
if (quirk != -1) {
rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);
--
1.9.1
next reply other threads:[~2017-08-30 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 6:07 Ian W MORRISON [this message]
2017-08-30 15:07 ` [PATCH] ASoC: rt5645: Add jack detection workaround for MINIX Z83-4 based devices 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=c98257b6-a5bc-a1b6-5194-cc29b6aec571@gmail.com \
--to=ianwmorrison@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=tiwai@suse.de \
/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.