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) - Saturday, 19 February 2022, 20:03 GMT
Opened by WorMzy Tykashi (WorMzy) - Thursday, 25 October 2018, 19:00 GMT
Last edited by David Runge (dvzrv) - Saturday, 19 February 2022, 20:03 GMT
|
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
Closed by David Runge (dvzrv)
Saturday, 19 February 2022, 20:03 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with alsa-plugins 1:1.2.6-2
Saturday, 19 February 2022, 20:03 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed with alsa-plugins 1:1.2.6-2
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.
Last working version is 1.1.6-2.
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.
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
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.)
dmesg:
output:My ALSA [1393]: segfault at 0 ip 00007f5317c036f5 sp 00007f530918c4a8 error 4 in libc-2.30.so[7f5317ac7000+14d000]
https://aur.archlinux.org/packages/alsa-lib-a52pcm
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.
https://bbs.archlinux.org/viewtopic.php?pid=1978714#p1978714
https://github.com/alsa-project/alsa-plugins/issues/28#issuecomment-863918603
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.