forked from pool/wireplumber
Accepting request 1172233 from home:alarrosa:branches:multimedia:libs
- 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. OBS-URL: https://build.opensuse.org/request/show/1172233 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=79
This commit is contained in:
parent
c5b5db5d58
commit
297b9fe9a2
@ -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)
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 6 16:23:47 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- 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 <alarrosa@suse.com>
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user