diff --git a/modules/module-default-profile.c b/modules/module-default-profile.c index 30b8c715..2571a4a1 100644 --- a/modules/module-default-profile.c +++ b/modules/module-default-profile.c @@ -23,6 +23,16 @@ enum static guint signals[LAST_SIGNAL] = { 0 }; +/* + * Module caches the profile selected for a device and restores it when the + * device appears afresh. The cached properties are remembered across reboots. + * It provides an API for modules and scripts to query the default profile. + */ + +/* + * settings file: device-settings.conf + */ + G_DECLARE_DERIVABLE_TYPE (WpDefaultProfile, wp_default_profile, WP, DEFAULT_PROFILE, WpPlugin) diff --git a/src/config/wireplumber.conf.d/device-settings.conf b/src/config/wireplumber.conf.d/device-settings.conf index b9678a18..6e789ef7 100644 --- a/src/config/wireplumber.conf.d/device-settings.conf +++ b/src/config/wireplumber.conf.d/device-settings.conf @@ -1,4 +1,4 @@ -# Settigs to Track/store/restore user choices about devices +# Settings to Track/store/restore user choices about devices wireplumber.components = [ # Selects appropriate default nodes and enables saving and restoring them @@ -39,8 +39,9 @@ wireplumber.settings = { # device default volume level # device.default-volume = 0.5 - # Sets persistent device profiles that should never change when wireplumber is - # running, even if a new profile with higher priority becomes available + # Sets persistent device profiles that should never be changed, when + # wireplumber is running, even if a new profile with higher priority becomes + # available device = [ { matches = [ diff --git a/src/scripts/policy-device-profile.lua b/src/scripts/policy-device-profile.lua index e03086e8..b7119080 100644 --- a/src/scripts/policy-device-profile.lua +++ b/src/scripts/policy-device-profile.lua @@ -5,6 +5,11 @@ -- -- SPDX-License-Identifier: MIT +-- Script selects and enables a profile for a device. It implements the +-- persistant profiles funtionality. + +-- Settings file: device-settings.conf + local self = {} self.active_profiles = {} self.default_profile_plugin = Plugin.find ("default-profile")