← Back
Editing: plugin_audio.cpython-312.pyc
� �]�i� � � � d dl mZ d dl� ddlZddlmZ ddlZddlZddl Z ddl Z ej j � Z e� Z G d� dej � Zy)� )�hotplug)�*� N)�commandsc � � e Zd ZdZd� Zd� Zd� Zd� Zed� � Z d� Z d� Z ed d �� d� � Z ed � dd �� Z edd �� d� � Z ed� dd�� Zy)�AudioPlugina� Sets audio cards power saving options. The plug-in sets the auto suspend timeout for audio codecs to the value specified by the [option]`timeout` option. Currently, the `snd_hda_intel` and `snd_ac97_codec` codecs are supported and the [option]`timeout` value is in seconds. To disable auto suspend for these codecs, set the [option]`timeout` value to `0`. To enforce the controller reset, set the option [option]`reset_controller` to `true`. Note that power management is supported per module. Hence, the kernel module names are used as device names. .Set the timeout value to 10s and enforce the controller reset ==== ---- [audio] timeout=10 reset_controller=true ---- ==== c � � d| _ t � | _ t � | _ | j j d� j d� D ]3 }| j |� }|dv s�| j j |� �5 y )NT�soundzcard*)� snd_hda_intel�snd_ac97_codec) �_devices_supported�set�_assigned_devices� _free_devices�_hardware_inventory�get_devices�match_sys_name�_device_module_name�add)�self�device�module_names �?/usr/lib/python3.12/site-packages/tuned/plugins/plugin_audio.py� _init_deviceszAudioPlugin._init_devices&