mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
media-session: add config files
Remove -e and -d options Manage modules in media-session.conf Add alsa-monitor.conf that can match node/device properties with a regex and update properties on it. All previous configuration and more cane be done with this.
This commit is contained in:
parent
389a125488
commit
24c68b0067
6 changed files with 383 additions and 154 deletions
57
src/daemon/media-session.d/alsa-monitor.conf
Normal file
57
src/daemon/media-session.d/alsa-monitor.conf
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"properties": {
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"#": [ "rules for matching a device or node. It is an array of",
|
||||
"properties that all need to match the regexp. If any of the",
|
||||
"matches work, the actions are executed for the object."
|
||||
],
|
||||
|
||||
"matches": [
|
||||
{
|
||||
"device.name": "~alsa_card.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"#": [ "actions can update properties on the matched object."
|
||||
],
|
||||
|
||||
"update-props": {
|
||||
"api.alsa.use-acp": true,
|
||||
"#api.alsa.use-ucm": true,
|
||||
"#api.alsa.soft-mixer": false,
|
||||
"#api.alsa.ignore-dB": false,
|
||||
"#device.profile-set": "profileset-name",
|
||||
"#device.profile": "default profile name",
|
||||
"#api.acp.auto-port": true,
|
||||
"#api.acp.auto-profile": true
|
||||
"#device.nick": "My Device",
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"node.name": "~alsa_input.*"
|
||||
},
|
||||
{
|
||||
"node.name": "~alsa_output.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"#node.nick": "My Node",
|
||||
"#node.nick": null,
|
||||
"#priority.driver": 100,
|
||||
"#resample.quality": 4,
|
||||
"#channelmix.normalize": false,
|
||||
"#channelmix.mix-lfe": false,
|
||||
"#audio.format": "S16LE",
|
||||
"#audio.rate": 44100,
|
||||
"#audio.position": "FL,FR"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
55
src/daemon/media-session.d/media-session.conf
Normal file
55
src/daemon/media-session.d/media-session.conf
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"properties": {
|
||||
},
|
||||
"spa-libs": {
|
||||
"#": [ "Mapping from factory name to library."
|
||||
],
|
||||
|
||||
"api.bluez5.*": "bluez5/libspa-bluez5",
|
||||
"api.alsa.*": "alsa/libspa-alsa",
|
||||
"api.v4l2.*": "v4l2/libspa-v4l2",
|
||||
"api.libcamera.*": "libcamera/libspa-libcamera"
|
||||
},
|
||||
"modules": {
|
||||
"#": [ "These are the modules that are enabled when a file with",
|
||||
"the key name is found in the media-session.d config directory.",
|
||||
"the default bundle is always enabled."
|
||||
],
|
||||
|
||||
"default": [
|
||||
"flatpak", "# manages flatpak access",
|
||||
"portal", "# manage portal permissions",
|
||||
"v4l2", "# video for linux udev detection",
|
||||
"#libcamera", "# libcamera udev detection",
|
||||
"suspend-node", "# suspend inactive nodes",
|
||||
"policy-node", "# configure and link nodes",
|
||||
"#metadata", "# export metadata API",
|
||||
"#default-nodes", "# restore default nodes",
|
||||
"#default-profile", "# restore default profiles",
|
||||
"#default-routes", "# restore default route",
|
||||
"#alsa-seq", "# alsa seq midi support",
|
||||
"#alsa-monitor", "# alsa udev detection",
|
||||
"#bluez5", "# bluetooth support",
|
||||
"#restore-stream", "#restore stream settings"
|
||||
],
|
||||
"with-audio": [
|
||||
"metadata",
|
||||
"default-nodes",
|
||||
"default-profile",
|
||||
"default-routes",
|
||||
"alsa-seq",
|
||||
"alsa-monitor"
|
||||
],
|
||||
"with-alsa": [
|
||||
"with-audio"
|
||||
],
|
||||
"with-jack": [
|
||||
"with-audio"
|
||||
],
|
||||
"with-pulseaudio": [
|
||||
"with-audio",
|
||||
"bluez5",
|
||||
"restore-stream"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -22,7 +22,11 @@ conf_config.set('pipewire_pulse_path', join_paths(pipewire_bindir, 'pipewire-pul
|
|||
conf_install_dir = join_paths(get_option('sysconfdir'), 'pipewire')
|
||||
|
||||
install_data(
|
||||
sources : ['media-session.d/with-jack', 'media-session.d/with-pulseaudio'],
|
||||
sources : [
|
||||
'media-session.d/with-jack',
|
||||
'media-session.d/with-pulseaudio',
|
||||
'media-session.d/media-session.conf',
|
||||
'media-session.d/alsa-monitor.conf' ],
|
||||
install_dir : join_paths(conf_install_dir, 'media-session.d'))
|
||||
|
||||
conf_config_uninstalled = conf_config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue