mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 17:16:45 +07:00
ASoC: rt286: set combo jack by dmi
This patch enables combo jack configuration according to dmi. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6879db7648
commit
6c67cde2aa
@ -17,6 +17,7 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <sound/core.h>
|
||||
#include <sound/pcm.h>
|
||||
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user