Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/soundwire/intel.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ struct sdw_intel_prop {
u16 doais;
u16 dodse;
u16 dods;
bool no_dactqe;
};

enum intel_pdi_type {
Expand Down
3 changes: 2 additions & 1 deletion drivers/soundwire/intel_ace2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ static void intel_shim_vs_init(struct sdw_intel *sdw)
u16p_replace_bits(&act, doais, SDW_SHIM2_INTEL_VS_ACTMCTL_DOAIS);
u16p_replace_bits(&act, dodse, SDW_SHIM2_INTEL_VS_ACTMCTL_DODSE);
u16p_replace_bits(&act, dods, SDW_SHIM2_INTEL_VS_ACTMCTL_DODS);
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
Comment thread
jonnyjonjon marked this conversation as resolved.
Resolved
if (!intel_prop->no_dactqe)
act |= SDW_SHIM2_INTEL_VS_ACTMCTL_DACTQE;
intel_writew(shim_vs, SDW_SHIM2_INTEL_VS_ACTMCTL, act);
usleep_range(10, 15);
}
Expand Down
26 changes: 26 additions & 0 deletions drivers/soundwire/intel_auxdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/acpi.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/io.h>
Expand Down Expand Up @@ -158,9 +159,27 @@ static void generic_new_peripheral_assigned(struct sdw_bus *bus,
sdw->link_res->hw_ops->program_sdi(sdw, dev_num);
}

/*
* Boards whose SoundWire peripherals do not work with the AC timing
* qualifier (DACTQE) enabled and the timing values provided by the BIOS.
* driver_data is the mask of affected links.
*/
static const struct dmi_system_id intel_no_dactqe_quirk_table[] = {
{
/* HP OmniBook Ultra 14, TAS2783 amplifiers on links 1 and 2 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "8EB4"),
},
.driver_data = (void *)(BIT(1) | BIT(2)),
},
{}
};

static int sdw_master_read_intel_prop(struct sdw_bus *bus)
{
struct sdw_master_prop *prop = &bus->prop;
const struct dmi_system_id *dmi_id;
struct sdw_intel_prop *intel_prop;
struct fwnode_handle *link;
char name[32];
Expand Down Expand Up @@ -241,6 +260,13 @@ static int sdw_master_read_intel_prop(struct sdw_bus *bus)
fwnode_property_read_u16(link,
"intel-sdw-dods",
&intel_prop->dods);

dmi_id = dmi_first_match(intel_no_dactqe_quirk_table);
if (dmi_id && ((unsigned long)dmi_id->driver_data & BIT(bus->link_id))) {
dev_info(bus->dev, "quirk: leaving AC timing qualifier disabled\n");
intel_prop->no_dactqe = true;
}

bus->vendor_specific_prop = intel_prop;

dev_dbg(bus->dev, "doaise %#x doais %#x dodse %#x dods %#x\n",
Expand Down