From: Bard Liao Date: Thu, 6 Nov 2014 01:59:59 +0000 (+0800) Subject: ASoC: rt286: set combo jack by dmi X-Git-Tag: v3.19-rc1~11^2~38^2~13^4~2 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=6c67cde2aa88bb06cd039aa0f61b26df887075d7;hp=6879db7648b6b995122afa98df31778c7af0855d;p=cascardo%2Flinux.git ASoC: rt286: set combo jack by dmi This patch enables combo jack configuration according to dmi. Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index 97daa80e9104..d4acb64f477e 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1205,6 +1206,16 @@ static const struct acpi_device_id rt286_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, rt286_acpi_match); +static struct dmi_system_id force_combo_jack_table[] __initdata = { + { + .ident = "Intel Wilson Beach", + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "Wilson Beach SDS") + } + }, + { } +}; + static int rt286_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -1240,6 +1251,9 @@ static int rt286_i2c_probe(struct i2c_client *i2c, if (pdata) rt286->pdata = *pdata; + if (dmi_check_system(force_combo_jack_table)) + rt286->pdata.cbj_en = true; + regmap_write(rt286->regmap, RT286_SET_AUDIO_POWER, AC_PWRST_D3); for (i = 0; i < RT286_POWER_REG_LEN; i++)