summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/common/sst-match-acpi.c
diff options
context:
space:
mode:
authorNaveen M2017-05-15 10:12:15 +0200
committerMark Brown2017-05-24 19:27:47 +0200
commit54746dabf770eb268d302f2f770d6dacea24f08a (patch)
tree422328eebb17e255b1e79fc61235b9997492f924 /sound/soc/intel/common/sst-match-acpi.c
parentASoC: Move quirk to identify correct machine driver (diff)
downloadkernel-qcow2-linux-54746dabf770eb268d302f2f770d6dacea24f08a.tar.gz
kernel-qcow2-linux-54746dabf770eb268d302f2f770d6dacea24f08a.tar.xz
kernel-qcow2-linux-54746dabf770eb268d302f2f770d6dacea24f08a.zip
ASoC: Improve machine driver selection based on quirk data
Use quirk function to select the correct machine driver by checking all codecs instead of only one based on quirk data. Signed-off-by: Naveen M <naveen.m@intel.com> Signed-off-by: Harsha Priya <harshapriya.n@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/common/sst-match-acpi.c')
-rw-r--r--sound/soc/intel/common/sst-match-acpi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/intel/common/sst-match-acpi.c b/sound/soc/intel/common/sst-match-acpi.c
index 88e4977578b5..56d26f36a3cb 100644
--- a/sound/soc/intel/common/sst-match-acpi.c
+++ b/sound/soc/intel/common/sst-match-acpi.c
@@ -151,5 +151,23 @@ bool sst_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
}
EXPORT_SYMBOL_GPL(sst_acpi_find_package_from_hid);
+struct sst_acpi_mach *sst_acpi_codec_list(void *arg)
+{
+ struct sst_acpi_mach *mach = arg;
+ struct sst_codecs *codec_list = (struct sst_codecs *) mach->quirk_data;
+ int i;
+
+ if (mach->quirk_data == NULL)
+ return mach;
+
+ for (i = 0; i < codec_list->num_codecs; i++) {
+ if (sst_acpi_check_hid(codec_list->codecs[i]) != true)
+ return NULL;
+ }
+
+ return mach;
+}
+EXPORT_SYMBOL_GPL(sst_acpi_codec_list);
+
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Intel Common ACPI Match module");