Path: blob/master/sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c
26493 views
// SPDX-License-Identifier: GPL-2.0-only1/*2* soc-acpi-intel-sdca-quirks.c - tables and support for SDCA quirks3*4* Copyright (c) 2024, Intel Corporation.5*6*/78#include <linux/soundwire/sdw_intel.h>9#include <sound/sdca.h>10#include <sound/soc-acpi.h>11#include "soc-acpi-intel-sdca-quirks.h"1213/*14* Pretend machine quirk. The argument type is not the traditional15* 'struct snd_soc_acpi_mach' pointer but instead the sdw_intel_ctx16* which contains the peripheral information required for the17* SoundWire/SDCA filter on the SMART_MIC setup and interface18* revision. When the return value is false, the entry in the19* 'snd_soc_acpi_mach' table needs to be skipped.20*/21bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg)22{23struct sdw_intel_ctx *ctx = arg;24int i;2526if (!ctx)27return false;2829for (i = 0; i < ctx->peripherals->num_peripherals; i++) {30if (sdca_device_quirk_match(ctx->peripherals->array[i],31SDCA_QUIRKS_RT712_VB))32return true;33}3435return false;36}37EXPORT_SYMBOL_NS(snd_soc_acpi_intel_sdca_is_device_rt712_vb, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");3839MODULE_DESCRIPTION("ASoC ACPI Intel SDCA quirks");40MODULE_LICENSE("GPL");41MODULE_IMPORT_NS("SND_SOC_SDCA");424344