summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm32
1 files changed, 31 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 9aff9306c..48dadadbb 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1168,6 +1168,36 @@ sub dmi_probe() {
@$dmi_probe;
}
+=item acpi_probe()
+
+Return list of devices that are only discoverable via ACPI
+
+=cut
+
+my %acpi_device_info = (
+ "80860F28" => { vendor => 0x8086, id => 0x0f28, description => 'Intel Corporation|Bay Trail SST Audio DSP',
+ nice_media_type => 'Audio device', driver => 'snd_sof_acpi_intel_byt' },
+ "808622A8" => { vendor => 0x8086, id => 0x22a8, description => 'Intel Corporation|Cherry Trail SST Audio DSP',
+ nice_media_type => 'Audio device', driver => 'snd_sof_acpi_intel_byt' },
+ "INT3438" => { vendor => 0x8086, id => 0x3438, description => 'Intel Corporation|Broadwell SST Audio DSP',
+ nice_media_type => 'Audio device', driver => 'snd_sof_acpi_intel_bdw' }
+);
+
+sub acpi_probe() {
+ my $dev_dir = '/sys/bus/acpi/devices';
+ my @l;
+ foreach (glob("$dev_dir/*")) {
+ my $dev_name = basename($_);
+ my ($prefix, $suffix) = split(':', $dev_name);
+ my $e = $acpi_device_info{$prefix};
+ if ($e) {
+ add2hash($e, { bus => 'ACPI', sysfs_device => "$dev_dir/$dev_name" });
+ push @l, $e;
+ }
+ }
+ @l;
+}
+
=item probeall()
Returns a list of all PCI/USB/Firewire/PCMCIA/DMI/HID devices.
@@ -1179,7 +1209,7 @@ It's usually called through a higher level filtering function.
sub probeall() {
return if $::noauto;
- pci_probe(), usb_probe(), firewire_probe(), pcmcia_probe(), dmi_probe(), getInputDevices_and_usb();
+ pci_probe(), usb_probe(), firewire_probe(), pcmcia_probe(), dmi_probe(), acpi_probe(), getInputDevices_and_usb();
}
sub probeall_update_cache() {
return if $::noauto;