index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | codefiles <11915375+codefiles@users.noreply.github.com> | 2023-05-12 08:01:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 14:01:24 +0200 |
commit | 06f35fd289a06c5d142d65466820ff132e838365 (patch) | |
tree | 40d9d1aa7368f3c3813d75738879117d6f19525b /archinstall/lib | |
parent | 128db1cdf6698aba09915bb7c044404f713755ef (diff) |
-rw-r--r-- | archinstall/lib/hardware.py | 34 |
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 8d0fb74f..220d3d37 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -86,6 +86,21 @@ class _SysInfo: def mem_info_by_key(self, key: str) -> int: return self.mem_info[key] + @cached_property + def loaded_modules(self) -> List[str]: + """ + Returns loaded kernel modules + """ + modules_path = Path('/proc/modules') + modules: List[str] = [] + + with modules_path.open() as file: + for line in file: + module = line.split(maxsplit=1)[0] + modules.append(module) + + return modules + _sys_info = _SysInfo() @@ -171,20 +186,9 @@ class SysInfo: return False @staticmethod - def _loaded_modules() -> List[str]: - """ - Returns loaded kernel modules - """ - modules_path = Path('/proc/modules') - modules: List[str] = [] - - with modules_path.open() as file: - for line in file: - module = line.split(maxsplit=1)[0] - modules.append(module) - - return modules + def requires_sof_fw() -> bool: + return 'snd_sof' in _sys_info.loaded_modules @staticmethod - def requires_sof() -> bool: - return 'snd_sof' in SysInfo._loaded_modules() + def requires_alsa_fw() -> bool: + return 'snd_emu10k1' in _sys_info.loaded_modules |