mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:57:34 +00:00
Kernel/Audio: Don't try to enumerate PCI adapters if PCI is disabled
This commit is contained in:
parent
71de4f7114
commit
15315be55c
1 changed files with 16 additions and 14 deletions
|
@ -38,6 +38,7 @@ UNMAP_AFTER_INIT AudioManagement::AudioManagement()
|
|||
|
||||
UNMAP_AFTER_INIT void AudioManagement::enumerate_hardware_controllers()
|
||||
{
|
||||
if (!PCI::Access::is_disabled()) {
|
||||
PCI::enumerate([&](PCI::DeviceIdentifier const& device_identifier) {
|
||||
// Note: Only consider PCI audio controllers
|
||||
if (device_identifier.class_code().value() != to_underlying(PCI::ClassID::Multimedia)
|
||||
|
@ -54,6 +55,7 @@ UNMAP_AFTER_INIT void AudioManagement::enumerate_hardware_controllers()
|
|||
m_controllers_list.append(ac97_device.release_value());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT void AudioManagement::enumerate_hardware_audio_channels()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue