diff --git a/split-config-file.py b/split-config-file.py index 93fc0b2..c3b4daf 100644 --- a/split-config-file.py +++ b/split-config-file.py @@ -13,6 +13,8 @@ lines = open('wireplumber.conf', 'r', encoding='utf-8').readlines() is_in_device_monitor = False main_config_content = '' device_monitors_content = '' +main_profile_contents = '' + for line in lines: if re.match(' *## Device monitors$', line): main_config_content += line @@ -27,7 +29,8 @@ for line in lines: else: # Fixes wireplumber running the main profile when not having audio support (bsc#1223916) if line in [' hardware.audio = required\n', ' hardware.bluetooth = required\n']: - line = line.replace('required', 'optional') + main_profile_contents += line + line = line.replace('required', 'disabled') main_config_content += line config_sha256 = sha256_from_data(device_monitors_content.encode('utf-8')) @@ -41,6 +44,9 @@ if config_sha256 != verified_sha256: sys.exit(1) device_monitors_content = 'wireplumber.components = [\n' + device_monitors_content + ']' +main_profile_contents = 'wireplumber.profiles = {\n main = {\n' + main_profile_contents + ' }\n}\n' + open('wireplumber.conf', 'w', encoding='utf-8').write(main_config_content) open('wireplumber.conf.d/00-device-monitors.conf', 'w', encoding='utf-8').write(device_monitors_content) +open('wireplumber.conf.d/01-require-audio-in-main-profile.conf', 'w', encoding='utf-8').write(main_profile_contents) diff --git a/wireplumber.changes b/wireplumber.changes index 3712dda..ba0ab5e 100644 --- a/wireplumber.changes +++ b/wireplumber.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 6 16:23:47 UTC 2024 - Antonio Larrosa + +- Better fix for (bsc#1223916) that basically turns the main + profile into the (to be in 0.5.3) video-only profile unless + wireplumber-audio is installed which now turns the main profile + into exactly upstream's main profile. + ------------------------------------------------------------------- Mon May 6 07:41:23 UTC 2024 - Antonio Larrosa diff --git a/wireplumber.spec b/wireplumber.spec index e889bf7..faa3d9d 100644 --- a/wireplumber.spec +++ b/wireplumber.spec @@ -253,12 +253,14 @@ fi %{_datadir}/wireplumber/wireplumber.conf %dir %{_datadir}/wireplumber/wireplumber.conf.d %exclude %{_datadir}/wireplumber/wireplumber.conf.d/00-device-monitors.conf +%exclude %{_datadir}/wireplumber/wireplumber.conf.d/01-require-audio-in-main-profile.conf %{_datadir}/wireplumber/wireplumber.conf.d/alsa-vm.conf %files lang -f %{name}.lang %files audio %{_datadir}/wireplumber/wireplumber.conf.d/00-device-monitors.conf +%{_datadir}/wireplumber/wireplumber.conf.d/01-require-audio-in-main-profile.conf %files devel %{_includedir}/wireplumber-%{apiver}