Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 749357 - media-sound/pulseaudio-14.2 version bump
Summary: media-sound/pulseaudio-14.2 version bump
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 7 votes (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://www.freedesktop.org/wiki/Soft...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 23:37 UTC by Rubin Simons
Modified: 2021-04-11 16:55 UTC (History)
19 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pulseaudio-14.0.ebuild from 13.0-r1 with minor patch adjustment (pulseaudio-14.0.ebuild,11.15 KB, text/plain)
2020-11-28 10:49 UTC, Igor V. Kovalenko
Details
adjusted flat volumes patch for pulseaudio-14.0 (pulseaudio-14.0-disable-flat-volumes.patch,470 bytes, patch)
2020-11-28 10:51 UTC, Igor V. Kovalenko
Details | Diff
patch to convert pulseaudio-14.0 to meson build (gentoo-pulseaudio-14.0-to-meson.patch,7.68 KB, patch)
2020-11-28 10:54 UTC, Igor V. Kovalenko
Details | Diff
accompanying patch for meson build to restore optional processing of OSS output for 'oss' use flag (pulseaudio-v14.0-meson-oss-output-option.patch,2.45 KB, patch)
2020-11-28 10:56 UTC, Igor V. Kovalenko
Details | Diff
build.log (build.log,15.40 KB, text/x-log)
2021-02-22 19:28 UTC, Jack
Details
pulseaudio-9999 ebuild (pulseaudio-9999.ebuild,10.40 KB, text/plain)
2021-03-16 14:23 UTC, Joakim Tjernlund
Details
pulseaudio-9999 , now with working oss USE flag (pulseaudio-9999.ebuild,10.40 KB, text/plain)
2021-03-16 14:33 UTC, Joakim Tjernlund
Details
updated 9999 ebuild (pulseaudio-9999-r2.ebuild,10.39 KB, text/plain)
2021-03-22 20:55 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rubin Simons 2020-10-15 23:37:15 UTC
It would be great if the pulseaudio package had a ~amd64 that would track a higher pulseaudio version than stable, specifically 13.99.2. The reason for this is that all the recent Renoir based AMD laptops have issues with pulseaudio 13 due to it not handling the dmic array which is detected as a separate card (hda-intel/realtek does regular audio, asoc/acp does dmic array). Pulseaudio 13.99.2 has fixes for that, allowing a Gentoo user to use Gentoo and the microphone on these kinds of laptops.
Comment 1 Rubin Simons 2020-11-09 21:50:25 UTC
Is there any movement on this? It really should be a trivial issue to enable for users. Gentoo usually prides itself on user choice and having the latest versions of software (optionally) available! This is one of the only packages that does not have a ~amd64 higher-version'ed variant.
Comment 2 Sam James archtester gentoo-dev Security 2020-11-09 21:54:01 UTC
(In reply to Rubin Simons from comment #1)
> Is there any movement on this? It really should be a trivial issue to enable
> for users. Gentoo usually prides itself on user choice and having the latest
> versions of software (optionally) available! This is one of the only
> packages that does not have a ~amd64 higher-version'ed variant.

Nobody had the time to do it yet, I guess. It's not always trivial to bump to a new version, no.
Comment 3 Mart Raudsepp gentoo-dev 2020-11-24 11:17:21 UTC
This will need some news item or USE flag handling for the GNOME routing reset, in addition to exposing some new options (gstreamer) and hopefully using meson. If autotools is used, then there's the bashism fixes from Poly-C as well.
Comment 4 Igor V. Kovalenko 2020-11-27 22:48:14 UTC
Hi

Regarding meson build, I just fixed one of missing pieces, meson oss-output option to enable/disable OSS support in pulseaudio. Change is merged to upstream master now https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/423

While testing meson build I'm not sure how to implement support for elogind use flag. Also locale part does not seem to respect my selection and installs every translation available.

Otherwise I seem to have working pulseaudio-14.0 built with meson.
I can upload my changes here or submit a patch (where?) if that would help to move forward with pulseaudio update to 14.0 and/or to switch to meson build.
Comment 5 Igor V. Kovalenko 2020-11-27 22:53:20 UTC
Regarding GNOME routing reset, I personally would consider this a minor issue and would vote for news item only.
Comment 6 Igor V. Kovalenko 2020-11-27 23:28:55 UTC
Regarding meson build there is an issue with CANONICAL_HOST changing from x86_64-pc-linux-gnu with autotools to x86_64 with meson.

This should be dealt with otherwise this effectively resets user configuration, since configuration database files are stored in ~/.config/pulse/xxx-yyy.${CANONICAL_HOST}.gdbm
Comment 7 Mart Raudsepp gentoo-dev 2020-11-28 09:20:22 UTC
The routing issue is probably considered less minor for those who use or have used GNOME. My current thinking has been along the way of a local USE flag with appropriate description (not a USE=gnome) and a news item with the news item possibly timed for stabling time only.
Meanwhile we don't want to reset everything for everyone unconditionally either. Which that CANONICAL_HOST change would effectively do as well, making the route reset stuff moot, I believe. So we shouldn't let that happen (good catch btw), or if we do, it'd be at least a conscious decision with perhaps a different worded news item, and then I believe no need to worry about the routing reset, as it would effectively do that anyhow (as I believe the routing is saved in those gdbm files).
Do you have any upstream references for the CANONICAL_HOST stuff with meson?

Feel free to attach your ebuild here.
Comment 8 Igor V. Kovalenko 2020-11-28 10:40:01 UTC
Just filed new issue upstream describing issue with migration to meson produced binaries https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1062
Comment 9 Igor V. Kovalenko 2020-11-28 10:49:22 UTC
Created attachment 675550 [details]
pulseaudio-14.0.ebuild from 13.0-r1 with minor patch adjustment

This is a starting point to have pulseaudio 14.0 ebuild as a copy of 13.0-r1 ebuild with minor modification to disable flat volumes patch where just a single hunk is left unapplied.

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Comment 10 Igor V. Kovalenko 2020-11-28 10:51:04 UTC
Created attachment 675553 [details, diff]
adjusted flat volumes patch for pulseaudio-14.0

Remaining hunk of flat volumes patch for pulseaudio-14.0

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Comment 11 Igor V. Kovalenko 2020-11-28 10:54:50 UTC
Created attachment 675559 [details, diff]
patch to convert pulseaudio-14.0 to meson build

This would convert pulseaudio-14.0 ebuild to meson.
Needs accompanying backport patch from upstream merge request (!423) to restore optional OSS output for 'oss' use flag.

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Comment 12 Igor V. Kovalenko 2020-11-28 10:56:08 UTC
Created attachment 675562 [details, diff]
accompanying patch for meson build to restore optional processing of OSS output for 'oss' use flag
Comment 13 Igor V. Kovalenko 2020-11-28 10:58:02 UTC
Comment on attachment 675562 [details, diff]
accompanying patch for meson build to restore optional processing of OSS output for 'oss' use flag

This is the change merged to upstream master https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/423
Comment 14 Igor V. Kovalenko 2020-11-28 13:13:06 UTC
Submitted patch to allow overriding CANONICAL_HOST string https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/424
Comment 15 Igor V. Kovalenko 2020-11-29 15:06:31 UTC
(In reply to Igor V. Kovalenko from comment #14)
> Submitted patch to allow overriding CANONICAL_HOST string
> https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/424

Submitted another patch to allow backwards-compatible database file names.
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/425
Comment 16 Lars Wendler (Polynomial-C) gentoo-dev 2021-01-16 23:17:40 UTC
Changes in 14.2 release:

 * Support upto 8 mixer channels on ALSA devices
 * Handle ALSA jacks with the same name but different index values
 * Switch to plugged-in headset when mic availability is unknown
 * Fix a potential segfault in the Bluetooth oFono HFP backend
 * Fix a problem with module-ladspa-sink when avoid-resampling=true
 * Update to the NEWS file for 14.0 (and 14.1)
 * Fix database names containing canonical host for meson builds

For packagers who have switched to meson, the last item should be particularly relevant.


These changes were already in 14.1 but they broke unplug event handling and fixed that with 14.2
Comment 17 Arusekk 2021-01-22 20:03:18 UTC
+1 for updating.

I use Acer Swift 3 (SF314-42) laptop with AMD Renoir, and my problem is that both HDMI and analog HDA cards have the same hardware card name, and HDMI has lower pci address, so pulseaudio does not see the analog card at all.

I use the two following upstream patches in /etc/portage/patches as a workaround:
c8f065250dde966825f171ff817f7301f423a42e ucm: add possibility to skip the UCM card completely
c1a7e3c59d5e2dcb6ca95c66d74c0ca7a45395d9 alsa-ucm: use ucm2 name for the direct card index open

They are parts of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/305
and
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/213
respectively.

Both patches already present in v13.99.2.
...or I will wait patiently for 14.x.
Comment 18 Joakim Tjernlund 2021-01-29 14:51:40 UTC
If meson is too much to deal with now, just use good old autotools?
Comment 19 Igor V. Kovalenko 2021-01-29 15:07:17 UTC
Meson build should not be an issue with pulseaudio-14.2 already, all changes I attached here are merged upstream. The only questionable part is elogind integration, I do not use it so have no idea how to handle that in ebuild.
Comment 20 James Le Cuirot gentoo-dev 2021-02-10 23:20:14 UTC
I notice your Meson ebuild has the ARM NEON line commented out. This is handled automatically by Meson's unstable-simd module. Unfortunately this appears to be automagic.

Regarding elogind, there doesn't seem to be a simple solution. They've unfortunately lumped the various systemd-related features into one so you cannot say you only want the logind module. Even if they hadn't, there's currently no way to override the pkg-config lookup like there was with Autotools. See https://github.com/mesonbuild/meson/issues/5192. The first part needs to be resolved with upstream and if we're going that far, we may as well get them to support elogind as well.
Comment 21 Igor V. Kovalenko 2021-02-11 06:01:37 UTC
(In reply to James Le Cuirot from comment #20)
> I notice your Meson ebuild has the ARM NEON line commented out. This is
> handled automatically by Meson's unstable-simd module. Unfortunately this
> appears to be automagic.
I do not have experience with pulseaudio on arm hardware so if this is a real issue probably need help looking into this.

> Regarding elogind, there doesn't seem to be a simple solution. They've
> unfortunately lumped the various systemd-related features into one so you
> cannot say you only want the logind module. Even if they hadn't, there's
> currently no way to override the pkg-config lookup like there was with
> Autotools. See https://github.com/mesonbuild/meson/issues/5192. The first
> part needs to be resolved with upstream and if we're going that far, we may
> as well get them to support elogind as well.


Should work if I add elogind feature to pulseaudio which would just enable module-systemd-login linked with libelogind if that is available. This will produce the same module binary as with autotools, I will be able to test if that builds but cannot do runtime test.
Comment 22 James Le Cuirot gentoo-dev 2021-02-11 09:15:29 UTC
(In reply to Igor V. Kovalenko from comment #21)
> I do not have experience with pulseaudio on arm hardware so if this is a
> real issue probably need help looking into this.

I think we can live with it. It should probably be addressed in Meson rather than PulseAudio anyway.

> Should work if I add elogind feature to pulseaudio which would just enable
> module-systemd-login linked with libelogind if that is available. This will
> produce the same module binary as with autotools, I will be able to test if
> that builds but cannot do runtime test.

That would be much appreciated, thanks. I'm happy to test too.
Comment 23 Igor V. Kovalenko 2021-02-11 19:40:01 UTC
(In reply to James Le Cuirot from comment #22)
> > Should work if I add elogind feature ...
> That would be much appreciated, thanks. I'm happy to test too.
Please have a look at this change https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/502

Took some time to test as I'm on systemd :) but it works for me.
If accepted, for Meson-based ebuild there will be this trivial change to have elogind supported:
--- a/media-sound/pulseaudio/pulseaudio-14.0.ebuild
+++ b/media-sound/pulseaudio/pulseaudio-14.0.ebuild
@@ -197,6 +197,7 @@ multilib_src_configure() {
                $(meson_feature dbus)
                $(meson_feature X x11)
                $(meson_feature systemd)
+               $(meson_feature elogind)
                $(meson_use ipv6)
Comment 24 Leho Kraav (:macmaN @lkraav) 2021-02-12 12:44:53 UTC
Is there a ready-to-test 14.2 ebuild, or should I just take the 14.0 candidate attachment from this bug and rename it?
Comment 25 Igor V. Kovalenko 2021-02-12 13:26:25 UTC
(In reply to Leho Kraav (:macmaN @lkraav) from comment #24)
> Is there a ready-to-test 14.2 ebuild, or should I just take the 14.0
> candidate attachment from this bug and rename it?
Yes please use the existing attachments.

If you would take the proposed ebuild and apply gentoo-pulseaudio-14.0-to-meson.patch then end result should work to build pulseaudio-14.0 and would only miss two things:
- keywords changes from portage happened after end of November 2020
- most recent $(meson_feature elogind) change we just discussed

I did not tested changing version to 14.2 but that should just work.
Comment 26 Igor V. Kovalenko 2021-02-12 13:28:26 UTC
Wanted to clarify that if it is desired to stick to autotools build, the only real change to ebuild is cleaned up pulseaudio-14.0-disable-flat-volumes.patch otherwise current portage ebuild can be copied as is and should work with version change to 14.2
Comment 27 Mart Raudsepp gentoo-dev 2021-02-12 13:40:37 UTC
I will try to get something in to main tree this weekend based on the contributions posted here, potentially package.masked until we figure out the news item stuff for https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/#compile-timeoptiontoforgetpre-14.0streamrouting
Comment 28 Mart Raudsepp gentoo-dev 2021-02-16 20:14:44 UTC
Sorry, ended up busy with various security bumps and stablings. If someone feels confident about the meson build being good, and the configuration/routing files being the same now as they were with autotools, I don't mind if someone adds some package.masked in tree for now. The mask reasoning can just say "Pending news item about potential routing reset need for some setups" or whatever, with a reference to this bug here.
Otherwise there's hopefully the upcoming weekend, as far as my active work is concerned on this...
Comment 29 Jack 2021-02-21 22:05:20 UTC
Renaming the ebuild to 14.2 and using the patches except the oss one, I get an error about needing at least one echo canceller.  However, I do have webrtc-aec enabled, and it does show up in the USE line at the top of build.log, but the actual meson setup line has it disabled.  Might I have a problem with eclasses needing updating?  (I see some other set USE flags where the item seems to still be disabled in the build.)  I'll be glad to post logs, but am hoping someone might point to a likely local misconfiguration.
Comment 30 Jack 2021-02-22 19:28:02 UTC
Created attachment 688098 [details]
build.log

I've attached the log from a failed build.  It is essentially the same for 14.0, 14.1, and 14.2.  I also see 'WARNING: Unknown options: "oss-output, tcpwrap"', but that is already after the "meson setup" line, which has many items =disabled that should really be enabled.
Comment 31 Igor V. Kovalenko 2021-02-22 19:52:24 UTC
(In reply to Jack from comment #30)
> Created attachment 688098 [details]
> build.log
> 
> I've attached the log from a failed build.  It is essentially the same for
> 14.0, 14.1, and 14.2.  I also see 'WARNING: Unknown options: "oss-output,
> tcpwrap"', but that is already after the "meson setup" line, which has many
> items =disabled that should really be enabled.

Hi Jack, you miss the patch for oss-output option which explains unknown option oss-output.

I'm not sure about rest of errors though. It builds successfully on my system - is it because I have full multilib here and webrtc-aec is installed for both 32bit and 64bit?
Comment 32 Igor V. Kovalenko 2021-02-22 19:59:21 UTC
(In reply to Mart Raudsepp from comment #27)
> I will try to get something in to main tree this weekend based on the
> contributions posted here, potentially package.masked until we figure out
> the news item stuff for
> https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/#compile-
> timeoptiontoforgetpre-14.0streamrouting
Hi Mart, I think it may make sense to stick to autotools for now, so only  adjusted flat volumes patch for pulseaudio-14.0 is needed.

Does not look like Meson build is easy change, I probably got multilib_native_usex wrong and my testing is limited to default multilib profile.
If Meson build would still be more preferable option, please let me know - I can prepare a patch backporting all meson changes from pulseaudio master for 14.2 sources and update the meson conversion patch.
Comment 33 Jack 2021-02-22 23:53:26 UTC
In reply to comment 31: I do have a multilib system, but webrtc is only installed 64 bit.  However, I think all those other errors are meson related

In reply to comment 32: reverting the meson patch, pulseaudio-14.2 installed fine.  I would like to see meson used eventually, but it's certainly not critical in the short term.  You may be right about something wrong with your use of multilib_native_usex, but I see pa_meson_multilib_native_use_enable and _feature, so I don't know if it's a different problem, or I just don't follow the unwinding of those functions to the actual meson setup line.
Comment 34 Alexey Shevchuck 2021-03-15 21:06:54 UTC
Looks like autotools support was dropped at upstream:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/f4bce0bb9808a9abd667e71d72f71bd5bd9e198e
Comment 35 Jasmin Buchert 2021-03-16 14:01:49 UTC
The flat volumes patch is not needed since version 14.0:

https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/#flatvolumesarenowdisabledbydefault.

Any special reason why this isn't updated yet?
Renaming the ebuild from ::gentoo and dropping the patch worked fine.
Comment 36 Joakim Tjernlund 2021-03-16 14:23:34 UTC
Created attachment 691818 [details]
pulseaudio-9999 ebuild

This combines everything(sans oss) in here to a 9999 PA ebuild

In master you are getting HFP support and soon mSBC too.
Comment 37 Joakim Tjernlund 2021-03-16 14:25:34 UTC
(In reply to Joakim Tjernlund from comment #36)
> Created attachment 691818 [details]
> pulseaudio-9999 ebuild
> 
> This combines everything(sans oss) in here to a 9999 PA ebuild
> 
> In master you are getting HFP support and soon mSBC too.

Note the addition of:
-D modlibexecdir="${EPREFIX}"/"usr/$(get_libdir)/pulseaudio-${PV}"
Comment 38 Joakim Tjernlund 2021-03-16 14:33:32 UTC
Created attachment 691821 [details]
pulseaudio-9999 , now with working oss USE flag
Comment 39 Alexey Shevchuck 2021-03-16 17:59:55 UTC
Regarding latest 9999 ebuild:
1. There is requirement to have noise cancelation implementation, so
>webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2[${MULTILIB_USEDEP}] )

Also there must be webrtc-aec or adrian-aec use flag. Or no use flag at all.

2. There is bluez5-gstreamer flag and gstreamer deps. Looks like they are missing
Comment 40 Joakim Tjernlund 2021-03-16 19:07:36 UTC
(In reply to Alexey Shevchuck from comment #39)
> Regarding latest 9999 ebuild:
> 1. There is requirement to have noise cancelation implementation, so
> >webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2[${MULTILIB_USEDEP}] )

New req. for PA master? Easy to add though 

> 
> Also there must be webrtc-aec or adrian-aec use flag. Or no use flag at all.

There is webrtc-aec USE flag

> 
> 2. There is bluez5-gstreamer flag and gstreamer deps. Looks like they are
> missing


gstreamer is not my cup of tea, someone else needs to work this out.
Comment 41 Jack 2021-03-22 20:54:36 UTC
(In reply to Igor V. Kovalenko from comment #32)
[....]
> Does not look like Meson build is easy change, I probably got
> multilib_native_usex wrong and my testing is limited to default multilib
> profile.
> If Meson build would still be more preferable option, please let me know - I
> can prepare a patch backporting all meson changes from pulseaudio master for
> 14.2 sources and update the meson conversion patch.

You are right about the multilib_native_... they aren't right, in that you do want all those pieces enabled in both libs, not only the native one.  You also need to add [${MULTILIB_USEDEP}] to sbc and possibly some other deps.  I'll post the version that worked for me, and also seems to give me a working HSP (more testing needed to fully confirm.)
Comment 42 Jack 2021-03-22 20:55:44 UTC
Created attachment 693108 [details]
updated 9999 ebuild

Modified version of the 9999 ebuild that works for me.
Comment 43 Jack 2021-03-22 20:57:48 UTC
Note I modified pa_meson_multilib_native_use_enable() and _feature() but I suspect there is a cleaner way to have the same effect.
Comment 44 Igor V. Kovalenko 2021-03-22 21:04:46 UTC
(In reply to Jack from comment #43)
> Note I modified pa_meson_multilib_native_use_enable() and _feature() but I
> suspect there is a cleaner way to have the same effect.
If I understand ebuild machinery correctly, then libsndfile, libcap, tcpd, dbus, sbc, libasyncns and systemd dependencies should only be required with profile native ABI - these are for daemon process use only.

Not sure if it is worth trying to clean these up at this point though?
Comment 45 Jack 2021-03-22 22:21:50 UTC
You may be right, in which case both your original and my modified versions of those two functions are necessary (possibly better implemented) and use the appropriate one for each use flag.  For me, all those initial failures were for necessary things (USE flag set) still getting disabled or false on the 32 bit build.  I haven't used it very much yet, but the version I built with the ebuild I attached is working fine so far.   Building those pieces into the 32 bit build may take extra compile cycles, but as long as the compile doesn't fail, I don't see what could be hurt by it.
Hopefully others will test this so any problems will surface sooner rather than later.
Comment 46 Kajzer 2021-04-08 22:17:23 UTC
Renaming attached 14.0 ebuild to 14.2 and commenting out the patch from it, works on 64bit, don't know about 32bit