Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#60586 - [alsa-plugins] ffmpeg changes mean a52 plugin not built

Attached to Project: Arch Linux
Opened by WorMzy Tykashi (WorMzy) - Thursday, 25 October 2018, 19:00 GMT
Last edited by David Runge (dvzrv) - Tuesday, 08 June 2021, 19:32 GMT
Task Type Bug Report
Category Packages: Extra
Status Waiting on Response   Reopened
Assigned To Jan Alexander Steffens (heftig)
Anatol Pomozov (anatolik)
David Runge (dvzrv)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 9
Private No

Details

Description:
Due to https://lists.archlinux.org/pipermail/arch-dev-public/2018-August/029340.html libavresample is no longer packaged. This means that alsa-plugins fails to enable libav support, as pkg-config can't find libavresample.pc:
http://git.alsa-project.org/?p=alsa-plugins.git;a=blob;f=configure.ac;h=ecc4c7ad8c9f7a57cb2b6282d7c37c9df7257b01;hb=be05d99cf84ef0c7819793a8b49a93d9e9f5ce8b#l96

Looks like libavresample is only needed for the rate-lav plugin ($srcdir/rate-lav/rate_lavrate.c), and simply replacing libavresample with libswresample doesn't work, presumably it isn't a drop-in replacement. It can, however, be disabled with the --disable-lavrate configure flag, and if the libavresample reference is removed from configure.ac in prepare(), the rest of the ffmpeg plugins build fine.

So I suggest either
1) dropping ffmpeg make/opt deps until upstream migrates to libswresample, or splits up the pkgconfig checks, or
2) Modifying configure.ac to remove the libavresample check, and using --disable-lavrate to bypass building the plugin that needs it.

No idea which option is preferable, but at least one user has noticed the a52 plugin's absence: https://bbs.archlinux.org/viewtopic.php?id=241460


(Sorry for the rambling bug report, I'm fighting a virus, hopefully it still makes sense.)
This task depends upon

Comment by loqs (loqs) - Thursday, 25 October 2018, 19:35 GMT
https://bugs.gentoo.org/539680
https://sources.debian.org/src/alsa-plugins/1.1.6-1/debian/patches/libav10.patch/
Edit:
Patch does not apply sorry for the noise it was was from the addition of libavresample not switching from it.
Edit2:
Implement WorMzy point 2 change configure detection so the a52 plugin does not need libavresample but the rate plugin does.
Comment by Florian H (Sylence) - Sunday, 28 October 2018, 09:26 GMT
  • Field changed: Percent Complete (100% → 0%)
Digital Surround 5.1 output (IEC958/AC3) via a52 is still missing for me in 1.1.7-2.
Last working version is 1.1.6-2.
Comment by Jan Alexander Steffens (heftig) - Sunday, 28 October 2018, 09:34 GMT
This needs more work; reverted because of https://bugs.archlinux.org/task/60616
Comment by Que Quotion (quequotion) - Monday, 29 October 2018, 15:55 GMT
I didn't find this report before coming up with my own workaround, by adding libavresample to ffmpeg rather than removing lavrate from alsa-plugins.

I was under the impression that the rate plugin is also required for the a52 plugin to operate.

The plugin, version 1.1.7, does not load, at least not with the most commonly suggested configuration (attached).

Pulseaudio rejects this configuration, stating "(alsa-lib)pcm_rate.c: Unknown field card"; even if the line "card $CARD" is not present.

The only configuration I could find that would activate the a52 plugin, version 1.1.7, is this:

pcm.a52 {
type a52
}

Unfortunately, this is also unusable. Pulseaudio experiences thousands of underruns per second, then crashes.

It's possible the way to configure this plugin has changed.
Comment by Confounded (Confounded) - Monday, 05 November 2018, 02:00 GMT
Hopefully this will be fixed soon but for now using libasound_module_pcm_a52.so from alsa-plugins-1.1.6-2 still works with the newer builds.
Comment by David Runge (dvzrv) - Wednesday, 22 January 2020, 22:00 GMT
It seems at the end of last year a little bit of movement has happened in regards to this problem [1].

I've applied the patch for libswresample and pushed a package to [testing].
Please test (also in regards to  FS#60616  [2]) and report any problems you find!

[1] https://mailman.alsa-project.org/pipermail/alsa-devel/2019-December/159425.html
[2] https://bugs.archlinux.org/task/60616
Comment by Giovanni Harting (IdleGandalf) - Thursday, 23 January 2020, 10:20 GMT
Author of this patchset here.

Getting a52 to work again also means to apply the patch for alsa-lib, since for whatever reason, the config parsing of 'rate' got broken somewhere >=1.1.7. Applying only the alsa-plugin patch gave me no usable configuration, no configuration at all leads to underruns in alsa and a guaranteed crash somewhere down the line.

I already tried to find a proper fix for that config parsing, but my time was limited and I was not familiar with alsa's whole codebase, I ended up with the workaround described. It should work for most configs out there.
(Also that was the reason I haven't posted it here, I consider it more a workaround then a proper fix.)
Comment by Darek (blablo) - Friday, 24 January 2020, 22:10 GMT
Please fix alsa-plugins 1.2.1-3/lib32-alsa-plugins 1.2.1-2

dmesg:
output:My ALSA [1393]: segfault at 0 ip 00007f5317c036f5 sp 00007f530918c4a8 error 4 in libc-2.30.so[7f5317ac7000+14d000]
Comment by Que Quotion (quequotion) - Saturday, 28 March 2020, 16:14 GMT
For the interim, an AUR package with Giovanni's workaround:

https://aur.archlinux.org/packages/alsa-lib-a52pcm
Comment by David Runge (dvzrv) - Tuesday, 08 June 2021, 19:32 GMT
@IdleGandalf: I have not followed upstream developments on this topic. Have your patches been included?
Comment by Giovanni Harting (IdleGandalf) - Tuesday, 08 June 2021, 21:06 GMT
@dvzrv Sadly not yet, no. I was hoping to fix the config issue early this year, but since I have no access to a pcm port atm I can't really test it. The libswresample patch, which was tested, was ignored as well, unfortunately.
Comment by David Runge (dvzrv) - Tuesday, 08 June 2021, 21:12 GMT
@IdleGandalf: Ah, too bad! However, as upstream now also supports pull requests on github, maybe that way it will be easier to gain traction for the required change?
Comment by Giovanni Harting (IdleGandalf) - Wednesday, 16 June 2021, 07:32 GMT
We have some movement upstream, partly thanks to @quequotion: https://github.com/alsa-project/alsa-plugins/issues/7

Seems like a52 also getting the fixes it needs after it recently got broken, maybe we get back to upstream support out of the box someday soon.
Comment by Giovanni Harting (IdleGandalf) - Friday, 18 June 2021, 17:03 GMT Comment by Que Quotion (quequotion) - Saturday, 19 June 2021, 11:46 GMT
Indeed, this is fixed upstream.

Regarding that, I have a request for @dvzrv and @anatolik about the next packaging of alsa-plugins:

This package needs to have ffmpeg added to makedepends() to build the a52 plugin.

Now that upstream has adopted IdleGandalf's libswresample patch, and the a52 plugin's compatibility with up-to-date releases of ffmpeg has been resolved, there is no reason not to do this.
Comment by Que Quotion (quequotion) - Saturday, 19 June 2021, 12:37 GMT
*snip, accidental duplication*
Comment by Giovanni Harting (IdleGandalf) - Saturday, 19 June 2021, 15:43 GMT
@quequotion I think they know, it was only removed from makedep as no fully working patch was available. See commit https://github.com/archlinux/svntogit-packages/commit/b3ec1d774eeb02b5a14cf30d95d43e579f43a47b#diff-3e341d2d9c67be01819b25b25d5e53ea3cdf3a38d28846cda85a195eb9b7203a

Loading...