diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 53d6e145dbf8..420dc5811c7c 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -140,8 +140,6 @@ let ./patches/no-build-timestamps.patch ./patches/widevine-79.patch ./patches/dont-use-ANGLE-by-default.patch - # fix race condition in the interaction with pulseaudio - ./patches/webrtc-pulse.patch # Unfortunately, chromium regularly breaks on major updates and # then needs various patches backported in order to be compiled with GCC. # Good sources for such patches and other hints: @@ -151,6 +149,9 @@ let # # ++ optionals (channel == "dev") [ ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) ] # ++ optional (versionRange "68" "72") ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) + ] ++ optionals (versionRange "80" "82.0.4076.0") [ + # fix race condition in the interaction with pulseaudio + (githubPatch "704dc99bd05a94eb61202e6127df94ddfd571e85" "0nzwzfwliwl0959j35l0gn94sbsnkghs3dh1b9ka278gi7q4648z") ] ++ optionals (useVaapi) [ # source: https://aur.archlinux.org/cgit/aur.git/tree/vaapi-fix.patch?h=chromium-vaapi ./patches/vaapi-fix.patch diff --git a/pkgs/applications/networking/browsers/chromium/patches/webrtc-pulse.patch b/pkgs/applications/networking/browsers/chromium/patches/webrtc-pulse.patch deleted file mode 100644 index cf24e2704191..000000000000 --- a/pkgs/applications/networking/browsers/chromium/patches/webrtc-pulse.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 704dc99bd05a94eb61202e6127df94ddfd571e85 Mon Sep 17 00:00:00 2001 -From: Dale Curtis -Date: Mon, 02 Mar 2020 22:12:22 +0000 -Subject: [PATCH] Hold PulseAudio mainloop lock while querying input device info. - -a22cc23955cb3d58b7525c5103314226b3ce0137 moved this section out of -UpdateNativeAudioHardwareInfo(), but forgot to bring the lock along. - -R=guidou - -Bug: 1043040 -Change-Id: I5b17a2cf0ad55d61c0811db1dae7045af4a91370 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083814 -Commit-Queue: Dale Curtis -Commit-Queue: Guido Urdaneta -Reviewed-by: Guido Urdaneta -Auto-Submit: Dale Curtis -Cr-Commit-Position: refs/heads/master@{#746115} ---- - -diff --git a/media/audio/pulse/audio_manager_pulse.cc b/media/audio/pulse/audio_manager_pulse.cc -index 90e9317..829846f 100644 ---- a/media/audio/pulse/audio_manager_pulse.cc -+++ b/media/audio/pulse/audio_manager_pulse.cc -@@ -104,22 +104,27 @@ - - AudioParameters AudioManagerPulse::GetInputStreamParameters( - const std::string& device_id) { -- int user_buffer_size = GetUserBufferSize(); -- int buffer_size = -- user_buffer_size ? user_buffer_size : kDefaultInputBufferSize; -- - UpdateNativeAudioHardwareInfo(); -- auto* operation = pa_context_get_source_info_by_name( -- input_context_, default_source_name_.c_str(), DefaultSourceInfoCallback, -- this); -- WaitForOperationCompletion(input_mainloop_, operation, input_context_); -+ -+ { -+ AutoPulseLock auto_lock(input_mainloop_); -+ auto* operation = pa_context_get_source_info_by_name( -+ input_context_, default_source_name_.c_str(), DefaultSourceInfoCallback, -+ this); -+ WaitForOperationCompletion(input_mainloop_, operation, input_context_); -+ } - - // We don't want to accidentally open a monitor device, so return invalid -- // parameters for those. -+ // parameters for those. Note: The value of |default_source_is_monitor_| -+ // depends on the the call to pa_context_get_source_info_by_name() above. - if (device_id == AudioDeviceDescription::kDefaultDeviceId && - default_source_is_monitor_) { - return AudioParameters(); - } -+ -+ const int user_buffer_size = GetUserBufferSize(); -+ const int buffer_size = -+ user_buffer_size ? user_buffer_size : kDefaultInputBufferSize; - return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, - native_input_sample_rate_ ? native_input_sample_rate_