Skip to content

Commit

Permalink
ASoC: Intel: sof_sdw: Add support for new devices
Browse files Browse the repository at this point in the history
Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

This patch series adds support for Asus Zenbook S14 and Fatcat board.
  • Loading branch information
Mark Brown committed Feb 6, 2025
2 parents 199b87f + d898910 commit 7858def
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions sound/soc/intel/boards/sof_sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/soundwire/sdw_intel.h>
#include <sound/core.h>
#include <sound/soc-acpi.h>
#include "sof_sdw_common.h"
#include "../../codecs/rt711.h"
Expand Down Expand Up @@ -748,9 +749,36 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
},
.driver_data = (void *)(SOC_SDW_PCH_DMIC),
},
{
.callback = sof_sdw_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
DMI_MATCH(DMI_PRODUCT_NAME, "Fatcat"),
},
.driver_data = (void *)(SOC_SDW_PCH_DMIC |
SOF_BT_OFFLOAD_SSP(2) |
SOF_SSP_BT_OFFLOAD_PRESENT),
},
{}
};

static const struct snd_pci_quirk sof_sdw_ssid_quirk_table[] = {
SND_PCI_QUIRK(0x1043, 0x1e13, "ASUS Zenbook S14", SOC_SDW_CODEC_MIC),
{}
};

static void sof_sdw_check_ssid_quirk(const struct snd_soc_acpi_mach *mach)
{
const struct snd_pci_quirk *quirk_entry;

quirk_entry = snd_pci_quirk_lookup_id(mach->mach_params.subsystem_vendor,
mach->mach_params.subsystem_device,
sof_sdw_ssid_quirk_table);

if (quirk_entry)
sof_sdw_quirk = quirk_entry->value;
}

static struct snd_soc_dai_link_component platform_component[] = {
{
/* name might be overridden during probe */
Expand Down Expand Up @@ -1278,6 +1306,13 @@ static int mc_probe(struct platform_device *pdev)

snd_soc_card_set_drvdata(card, ctx);

if (mach->mach_params.subsystem_id_set) {
snd_soc_card_set_pci_ssid(card,
mach->mach_params.subsystem_vendor,
mach->mach_params.subsystem_device);
sof_sdw_check_ssid_quirk(mach);
}

dmi_check_system(sof_sdw_quirk_table);

if (quirk_override != -1) {
Expand All @@ -1293,12 +1328,6 @@ static int mc_probe(struct platform_device *pdev)
for (i = 0; i < ctx->codec_info_list_count; i++)
codec_info_list[i].amp_num = 0;

if (mach->mach_params.subsystem_id_set) {
snd_soc_card_set_pci_ssid(card,
mach->mach_params.subsystem_vendor,
mach->mach_params.subsystem_device);
}

ret = sof_card_dai_links_create(card);
if (ret < 0)
return ret;
Expand Down

0 comments on commit 7858def

Please sign in to comment.