Commit Graph

12 Commits

Author SHA1 Message Date
Julian Bouzas
a512ddaaf3 scripts: use the WpSettings safe APIs
Avoids Lua errors if a setting cannot be parsed or does not exist.
2023-04-17 07:47:09 -04:00
Julian Bouzas
2f1aece8b6 settings: remove _get_{boolean|int|float|string}() APIs
They is really no needed with the new _get() API and the WpSpaJson API. In C,
users can use 'wp_spa_json_parse_{boolean|int|float|string}()' APIs to parse the
WpSpaJson. In Lua, users can just do 'Settings.get(setting, m):parse()'.
2023-04-17 07:47:09 -04:00
Julian Bouzas
a76e780b4b docs: update new configuration file names 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
82a8bc5673 event-hooks: remove the unwanted second arg in simple hooks 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
bc2d403396 policy-device-routes.lua: Port to event-stack 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
f8072889aa policy-device-routes.lua: Add summary and enhance the debug messages 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
5ebef4be6e policy-device-defaults.lua: Adjust style 2023-04-17 07:47:09 -04:00
Ashok Sidipotu
e180ff2f94 device-settings: Switch device settings to wpsettings
- move all the device based settings and scripts to JSON config and
  remove config/lua references.
2023-04-17 07:44:19 -04:00
Pauli Virtanen
aee4fe2579 policy-device-routes: consider routes only for active profile
If a route specifies a set of profiles, it should not be used if the
profile is not in that list.

In findBest/SavedRoute, exclude routes that don't match the active
profile.

Currently in the SPA devices, the device id is different for different
profiles so this condition does not occur, but in general this might not
be so.
2022-07-07 18:28:24 +00:00
Pauli Virtanen
73b0dccb8d policy-default-routes: use different default volume for input direction
Input direction volume doesn't need a safety margin.
2022-07-07 18:10:11 +00:00
Pauli Virtanen
affdf36a29 policy-device-routes: change default volume to 0.4 on cubic scale
It's safer to have the default volume value at significant attenuation,
to mitigate situations where the output is at high gain.

Use linear scale 0.4^3 (-24 dB), which puts Pulseaudio volume sliders at
40%, as a better starting value than 0.4 (-8 dB / 74%).  E.g. for many
Bluetooth headphones, the volume at 74% is still uncomfortably high, and
a lower value is better.
2022-07-07 18:10:11 +00:00
Julian Bouzas
edf0dc69d1 config: rename default-routes.lua to policy-device-routes.lua
This makes the configuration more consistent. The storing of the default routes
logic needs to be implemented eventually in a C module-default-routes, similar
to module-default-profile.
2022-02-16 13:37:40 -05:00