FreeBSD Bugzilla – Attachment 232271 Details for
Bug 262365
www/chromium: microphone does not work anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-unbreak-alsa-audio-recording-by-bringing-back-a-remo.patch
0001-unbreak-alsa-audio-recording-by-bringing-back-a-remo.patch (text/plain), 3.18 KB, created by
Robert Nagy
on 2022-03-05 18:51:29 UTC
(
hide
)
Description:
0001-unbreak-alsa-audio-recording-by-bringing-back-a-remo.patch
Filename:
MIME Type:
Creator:
Robert Nagy
Created:
2022-03-05 18:51:29 UTC
Size:
3.18 KB
patch
obsolete
>From fc6fd4908b81e8c3c18457df4dfebba9d9ade1d3 Mon Sep 17 00:00:00 2001 >From: Robert Nagy <robert@openbsd.org> >Date: Sat, 5 Mar 2022 19:45:45 +0100 >Subject: [PATCH] unbreak alsa audio recording by bringing back a removed patch > >--- > www/chromium/Makefile | 1 + > ...h-media_audio_alsa_audio__manager__alsa.cc | 54 +++++++++++++++++++ > 2 files changed, 55 insertions(+) > create mode 100644 www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc > >diff --git a/www/chromium/Makefile b/www/chromium/Makefile >index b7ee68b405cf..e9c5492b11d5 100644 >--- a/www/chromium/Makefile >+++ b/www/chromium/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= chromium > PORTVERSION= 99.0.4844.51 >+PORTREVISION= 1 > CATEGORIES= www > MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ > https://nerd.hu/distfiles/:fonts >diff --git a/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc >new file mode 100644 >index 000000000000..deb7ec59d8a0 >--- /dev/null >+++ b/www/chromium/files/patch-media_audio_alsa_audio__manager__alsa.cc >@@ -0,0 +1,54 @@ >+--- media/audio/alsa/audio_manager_alsa.cc.orig 2022-03-05 18:42:44 UTC >++++ media/audio/alsa/audio_manager_alsa.cc >+@@ -89,7 +89,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType >+ int card = -1; >+ >+ // Loop through the sound cards to get ALSA device hints. >++#if !BUILDFLAG(IS_BSD) >+ while (!wrapper_->CardNext(&card) && card >= 0) { >++#endif >+ void** hints = NULL; >+ int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); >+ if (!error) { >+@@ -101,7 +103,9 @@ void AudioManagerAlsa::GetAlsaAudioDevices(StreamType >+ DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: " >+ << wrapper_->StrError(error); >+ } >++#if !BUILDFLAG(IS_BSD) >+ } >++#endif >+ } >+ >+ void AudioManagerAlsa::GetAlsaDevicesInfo(AudioManagerAlsa::StreamType type, >+@@ -184,7 +188,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvailable( >+ // goes through software conversion if needed (e.g. incompatible >+ // sample rate). >+ // TODO(joi): Should we prefer "hw" instead? >++#if BUILDFLAG(IS_BSD) >++ static const char kDeviceTypeDesired[] = "plug"; >++#else >+ static const char kDeviceTypeDesired[] = "plughw"; >++#endif >+ return strncmp(kDeviceTypeDesired, device_name, >+ base::size(kDeviceTypeDesired) - 1) == 0; >+ } >+@@ -206,7 +214,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( >+ // Loop through the sound cards. >+ // Don't use snd_device_name_hint(-1,..) since there is an access violation >+ // inside this ALSA API with libasound.so.2.0.0. >++#if !BUILDFLAG(IS_BSD) >+ while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) { >++#endif >+ int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints); >+ if (!error) { >+ for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) { >+@@ -230,7 +240,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDevice( >+ DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: " >+ << wrapper_->StrError(error); >+ } >++#if !BUILDFLAG(IS_BSD) >+ } >++#endif >+ >+ return has_device; >+ } >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262365
: 232271