Bug 245321 - audio/alsa-lib: (and others) update to 1.2.2
Summary: audio/alsa-lib: (and others) update to 1.2.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Charlie Li
URL:
Keywords:
Depends on:
Blocks: 255348
  Show dependency treegraph
 
Reported: 2020-04-03 16:22 UTC by Val Packett
Modified: 2024-02-21 14:28 UTC (History)
6 users (show)

See Also:


Attachments
alsa.patch (41.02 KB, patch)
2020-04-03 16:22 UTC, Val Packett
no flags Details | Diff
alsa.patch v2 (41.63 KB, patch)
2020-09-29 17:42 UTC, Val Packett
no flags Details | Diff
updated patch (46.17 KB, patch)
2021-03-12 06:26 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Val Packett 2020-04-03 16:22:08 UTC
Created attachment 213022 [details]
alsa.patch

- Update to latest version
- Enable Pulseaudio plugin by default (pulse port doesn't enable ALSA by default, so no circular dependencies in default package builds here)
- I can take maintainership I guess.. (but if anyone else wants to, go for it)
Comment 1 Jan Beich freebsd_committer freebsd_triage 2020-04-03 19:11:31 UTC
Comment on attachment 213022 [details]
alsa.patch

$ poudriere testport -j 113i386 audio/alsa-plugins
[...]
===========================================================================
====> Running Q/A tests (stage-qa)
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/50-arcam-av-ctl.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/50-arcam-av-ctl.conf'
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/60-vdownmix.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/60-vdownmix.conf'
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/50-pulseaudio.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/50-pulseaudio.conf'
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/60-upmix.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/60-upmix.conf'
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/50-oss.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/50-oss.conf'
Warning: Bad symlink '/usr/local/etc/alsa/conf.d/98-usb-stream.conf' pointing to an absolute pathname '/usr/local/share/alsa/alsa.conf.d/98-usb-stream.conf'
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: etc/alsa/conf.d/50-arcam-av-ctl.conf
Error: Orphaned: etc/alsa/conf.d/50-oss.conf
Error: Orphaned: etc/alsa/conf.d/50-pulseaudio.conf
Error: Orphaned: etc/alsa/conf.d/60-upmix.conf
Error: Orphaned: etc/alsa/conf.d/60-vdownmix.conf
Error: Orphaned: etc/alsa/conf.d/98-usb-stream.conf
Error: Orphaned: etc/alsa/conf.d/99-pulseaudio-default.conf.example
Error: Orphaned: share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
Error: Orphaned: share/alsa/alsa.conf.d/50-oss.conf
Error: Orphaned: share/alsa/alsa.conf.d/60-upmix.conf
Error: Orphaned: share/alsa/alsa.conf.d/60-vdownmix.conf
Error: Orphaned: share/alsa/alsa.conf.d/98-usb-stream.conf
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1


$ poudriere testport -j 113i386 audio/alsa-utils
[00:00:00] Warning: (audio/alsa-utils): Error: audio/alsa-utils depends on nonexistent origin 'BAT_CONFIGURE_ENABLE=bat'; Please contact maintainer of the port to fix this.
[...]
monitor.c:26:10: fatal error: 'sys/inotify.h' file not found
#include <sys/inotify.h>
         ^~~~~~~~~~~~~~~
Comment 2 Val Packett 2020-04-03 20:10:35 UTC
> Checking for items in STAGEDIR missing from pkg-plist

Is there a good way to ignore this? ${RM} the files?

> nonexistent origin 'BAT_CONFIGURE_ENABLE=bat'

lol, fail with the backslash, sorry

> fatal error: 'sys/inotify.h' file not found

How?? inotify is in LIB_DEPENDS and USES=localbase is present.. o_0
Comment 3 Jan Beich freebsd_committer freebsd_triage 2020-04-03 22:28:59 UTC
(In reply to Greg V from comment #2)
> Is there a good way to ignore this? ${RM} the files?

Patching the source or marking undesired files with @comment in pkg-plist.

> How?? inotify is in LIB_DEPENDS and USES=localbase is present.. o_0

Sorry, I had bug 235240 applied which requires using pkg-config for libinotify.
Comment 4 Val Packett 2020-09-29 17:42:15 UTC
Created attachment 218412 [details]
alsa.patch v2

Rebased, fixed aforementioned issues (hopefully did the plist correctly)
Comment 5 Steve Wills freebsd_committer freebsd_triage 2021-03-12 06:26:05 UTC
Created attachment 223196 [details]
updated patch

I updated this a bit, fixed a few minor things and cleaned it up. If it looks OK and you're still willing to take maintainer-ship, I'll commit it.
Comment 6 Gleb Popov freebsd_committer freebsd_triage 2021-04-26 14:48:37 UTC
What is blocking this? Can we get this in?
Comment 7 Oleh Hushchenkov 2021-05-11 10:49:29 UTC
With this patch I finally got working microphone in chromium with alsa backend. Tested in several online microphone testers, google meet and google duo. Audio calls in telegram-desktop is also working fine. Can it be committed.
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-05-11 16:54:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=44c14328c08e0ba92855367dba48ad9e06dc4b25

commit 44c14328c08e0ba92855367dba48ad9e06dc4b25
Author:     Greg V <greg@unrelenting.technology>
AuthorDate: 2021-05-11 16:49:32 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-05-11 16:53:01 +0000

    audio/alsa-lib, audio/alsa-plugins, audio/alsa-utils: Update to 1.2.2

    PR:             245321
    Reviewed by:    swills
    Tested by:      Oleh Hushchenkov <o.hushchenkov@gmail.com>

 audio/alsa-lib/Makefile                            |  27 +-
 audio/alsa-lib/distinfo                            |   5 +-
 audio/alsa-lib/files/linux/types.h                 |  10 +
 .../files/patch-include_alsa-symbols.h (gone)      |  59 ---
 .../patch-modules_mixer_simple_python.c (gone)     | 565 ---------------------
 audio/alsa-lib/files/patch-src_async.c             |   6 +-
 .../alsa-lib/files/patch-src_conf_alsa.conf (new)  |  13 +
 audio/alsa-lib/pkg-plist                           |  85 +---
 audio/alsa-plugins/Makefile                        |  39 +-
 audio/alsa-plugins/distinfo                        |   5 +-
 audio/alsa-plugins/pkg-plist                       |  13 +-
 audio/alsa-utils/Makefile                          |  76 +--
 audio/alsa-utils/distinfo                          |   5 +-
 .../files/patch-alsa-info_alsa-info.sh.1 (new)     |  11 +
 .../files/patch-alsaconf_alsaconf.8 (new)          |  11 +
 .../files/patch-alsaconf_alsaconf.fr.8 (new)       |  11 +
 .../files/patch-alsactl_Makefile.in (new)          |  11 +
 .../files/patch-alsactl_alsactl__init.xml (new)    |  24 +
 .../files/patch-alsamixer_volume__mapping.c (gone) |  11 -
 audio/alsa-utils/files/patch-amidi_amidi.1 (new)   |  15 +
 audio/alsa-utils/files/patch-aplay_aplay.c         |  18 +-
 ...atch-speaker-test_samples_sample__map.csv (new) |   7 +
 .../files/patch-speaker-test_speaker-test.1 (new)  |  11 +
 .../files/patch-utils_alsa-utils.spec.in (new)     |  11 +
 audio/alsa-utils/pkg-plist                         |  10 +-
 25 files changed, 261 insertions(+), 798 deletions(-)
Comment 9 Gleb Popov freebsd_committer freebsd_triage 2021-05-11 16:57:28 UTC
Committed, thanks everyone involved.

Greg, I left the MAINTAINER field set to "ports@FreeBSD.org", because you didn't indicate that you're willing to maintain this port. If you want to pick it up, ping me and I'll commit the change.
Comment 10 Charlie Li freebsd_committer freebsd_triage 2021-05-11 20:53:06 UTC
audio/alsa-plugins fails to package with FFMPEG enabled, as none of the files exist anymore and the relevant configure option --enable-avcodec no longer exists.

Additionally, in that same port, there is a code path that references byteswap.h, which is a glibc-specific header.
Comment 11 Charlie Li freebsd_committer freebsd_triage 2021-05-11 21:32:19 UTC
(In reply to Charlie Li from comment #10)
Ignore the byteswap.h noise, audio/alsa-plugins is a sneaky slave port of audio/alsa-lib and is reflected when using an overlay.

However, the SAMPLERATE option now installs two .conf files, in addition to FFMPEG removal:

--- audio/alsa-plugins/Makefile
+++ audio/alsa-plugins/Makefile
@@ -21,7 +21,7 @@ INSTALL_TARGET=       install-strip
 CPPFLAGS+=     -I${.CURDIR}/../alsa-lib/files

 OPTIONS_DEFAULT=       BUFSZ_P2 IO_PTR PULSEAUDIO
-OPTIONS_DEFINE=                BUFSZ_P2 FFMPEG JACK PULSEAUDIO SAMPLERATE SPEEX
+OPTIONS_DEFINE=                BUFSZ_P2 JACK PULSEAUDIO SAMPLERATE SPEEX
 OPTIONS_SUB=           yes

 OPTIONS_GROUP=         OSS
@@ -41,9 +41,6 @@ JACK_LIB_DEPENDS=     libjack.so:audio/jack
 JACK_CONFIGURE_ENABLE= jack
 JACK_IMPLIES=          SAMPLERATE

-FFMPEG_LIB_DEPENDS=            libavcodec.so:multimedia/ffmpeg
-FFMPEG_CONFIGURE_ENABLE=       avcodec
-
 PULSEAUDIO_LIB_DEPENDS=                libpulse.so:audio/pulseaudio
 PULSEAUDIO_CONFIGURE_ENABLE=   pulseaudio

diff --git audio/alsa-plugins/pkg-plist audio/alsa-plugins/pkg-plist
index 4847ffc641be..6025845819fb 100644
--- audio/alsa-plugins/pkg-plist
+++ audio/alsa-plugins/pkg-plist
@@ -1,3 +1,4 @@
+%%SAMPLERATE%%etc/alsa/conf.d/10-samplerate.conf
 @comment etc/alsa/conf.d/50-arcam-av-ctl.conf
 @comment etc/alsa/conf.d/50-oss.conf
 @comment etc/alsa/conf.d/50-pulseaudio.conf
@@ -13,8 +14,6 @@ lib/alsa-lib/libasound_module_ctl_oss.la
 lib/alsa-lib/libasound_module_ctl_oss.so
 %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.la
 %%PULSEAUDIO%%lib/alsa-lib/libasound_module_ctl_pulse.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_pcm_a52.la
-%%FFMPEG%%lib/alsa-lib/libasound_module_pcm_a52.so
 %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.la
 %%JACK%%lib/alsa-lib/libasound_module_pcm_jack.so
 lib/alsa-lib/libasound_module_pcm_oss.la
@@ -29,12 +28,6 @@ lib/alsa-lib/libasound_module_pcm_usb_stream.la
 lib/alsa-lib/libasound_module_pcm_usb_stream.so
 lib/alsa-lib/libasound_module_pcm_vdownmix.la
 lib/alsa-lib/libasound_module_pcm_vdownmix.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate.la
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate_fast.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate_faster.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate_high.so
-%%FFMPEG%%lib/alsa-lib/libasound_module_rate_lavcrate_higher.so
 %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_samplerate.la
 %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_samplerate.so
 %%SAMPLERATE%%lib/alsa-lib/libasound_module_rate_samplerate_best.so
@@ -45,6 +38,7 @@ lib/alsa-lib/libasound_module_pcm_vdownmix.so
 %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.so
 %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_best.so
 %%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so
+%%SAMPLERATE%%share/alsa/alsa.conf.d/10-samplerate.conf
 @comment share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
 @comment share/alsa/alsa.conf.d/50-oss.conf
 %%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
Comment 12 Charlie Li freebsd_committer freebsd_triage 2021-05-11 23:40:13 UTC
Re-opening for this and another issue that leres@ reported: may need to add a USES=gettext-tools to audio/alsa-utils to account for a missing autopoint when NLS is disabled. Phab reviews to come.
Comment 13 Charlie Li freebsd_committer freebsd_triage 2021-05-12 04:02:05 UTC
(In reply to Charlie Li from comment #12)
review D30222 and review D30223
Comment 14 Barbara Guida freebsd_committer freebsd_triage 2021-05-12 13:50:04 UTC
(In reply to Charlie Li from comment #13)
Building this port from ports, ffmpeg get autodetected if installed.

Running ./configure --help in WRKSRC I can see:
  --disable-libav         Do not build plugins depending on libav/ffmpeg
                          (a52,lavrate...)

and running make configure:
  ...
  Libav/ffmpeg config:
    LIBAV_CFLAGS:   -I/usr/local/include 
    LIBAV_LIBS:     -L/usr/local/lib -lavcodec -lavutil -lavresample  /  / 
  Libav A52 plugin:   yes
  Libav rate plugin:  yes
  ...

So IMHO FFMPEG options should be kept and Makefile changed to something like:
-FFMPEG_CONFIGURE_ENABLE=       avcodec
+FFMPEG_CONFIGURE_ENABLE=       libav

Also pkg-plist should be adjusted accordingly: files under lib/alsa-lib have been renamed from libasound_module_rate_lavcrate* to libasound_module_rate_lavcate* (a "r" has been dropped).

I'm busy at work, I'll post a diff that works for me as soon as I can.
Comment 15 Charlie Li freebsd_committer freebsd_triage 2021-05-12 14:07:22 UTC
(In reply to Barbara Guida from comment #14)
I noticed that too. arrowd@ suggested that the configure option is now --disable-libav.
Comment 16 Charlie Li freebsd_committer freebsd_triage 2021-05-12 14:24:59 UTC
phab has been re-rolled, FFMPEG should work now.
Comment 17 commit-hook freebsd_committer freebsd_triage 2021-05-12 14:31:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ef51954501992327c9a56137db0526aa538e7fa4

commit ef51954501992327c9a56137db0526aa538e7fa4
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2021-05-12 03:47:04 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2021-05-12 14:29:04 +0000

    audio/alsa-utils: fix build with NLS disabled

    The configure step requires `autopoint`, which devel/gettext-tools
    provides. While here, split the deprecated USES=gettext into their
    appropriate constituents.

    Reported by: leres
    PR: 245321
    Approved by: arrowd (mentor)
    Differential Revision: https://reviews.freebsd.org/D30222

 audio/alsa-utils/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 18 commit-hook freebsd_committer freebsd_triage 2021-05-12 14:41:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=933747467c06ec9735b35fe31879bb6f914d33ae

commit 933747467c06ec9735b35fe31879bb6f914d33ae
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2021-05-12 03:39:59 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2021-05-12 14:40:12 +0000

    audio/alsa-plugins: fix non-default OPTIONS

    - Update configure option and plist for FFMPEG
    - Add two missing files with SAMPLERATE

    PR: 245321
    Approved by: arrowd (mentor)
    Differential Revision: https://reviews.freebsd.org/D30223

 audio/alsa-plugins/Makefile  |  6 +++---
 audio/alsa-plugins/pkg-plist | 18 ++++++++++++------
 2 files changed, 15 insertions(+), 9 deletions(-)
Comment 19 Charlie Li freebsd_committer freebsd_triage 2021-05-12 14:45:20 UTC
Should be good to go again.
Comment 20 commit-hook freebsd_committer freebsd_triage 2024-02-02 13:46:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=077152a79ad8181830e324b2ede39301a94d4093

commit 077152a79ad8181830e324b2ede39301a94d4093
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-02-02 13:16:38 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-02-02 13:44:55 +0000

    audio/alsa-plugins: install vendor OSS config after 44c14328c08e

    Allows overriding /dev/dsp without adjusting config e.g.,

    $ aplay -D oss:/dev/dsp4 foo.wav

    PR:             245321
    See also:       https://github.com/alsa-project/alsa-plugins/commit/6e40eb5fd346

 audio/alsa-lib/Makefile                 | 1 +
 audio/alsa-lib/files/asound.conf.sample | 9 ---------
 audio/alsa-plugins/Makefile             | 2 +-
 audio/alsa-plugins/pkg-plist            | 4 ++--
 4 files changed, 4 insertions(+), 12 deletions(-)
Comment 21 commit-hook freebsd_committer freebsd_triage 2024-02-02 13:46:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=51317515580f9a47b3c7bb205bfe748cbf986f3c

commit 51317515580f9a47b3c7bb205bfe748cbf986f3c
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-02-02 13:01:28 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-02-02 13:44:33 +0000

    audio/alsa-plugins: unbreak PULSEAUDIO=on config after 44c14328c08e

    For some reason, /usr/local/share/alsa/alsa.conf.d is no longer searched.

    $ sed -i '' '/pulse/s/# //' /usr/local/etc/asound.conf
    $ daemon -f pulseaudio
    $ aplay foo.wav
    ALSA lib pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM pcm.pulse
    aplay: main:839: audio open error: No such file or directory

    PR:             245321

 audio/alsa-plugins/Makefile  | 1 +
 audio/alsa-plugins/pkg-plist | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Comment 22 commit-hook freebsd_committer freebsd_triage 2024-02-03 05:10:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ad9c73b5625f7a2457931c435f8d2e34f199a0c

commit 1ad9c73b5625f7a2457931c435f8d2e34f199a0c
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-02-03 04:56:13 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-02-03 05:09:13 +0000

    audio/linux-c7-alsa-plugins-oss: install vendor config after 077152a79ad8

    linux-c7-alsa-lib uses default config from alsa-lib since 1aaf3941aa56.

    $ /compat/linux/usr/bin/aplay foo.wav
    ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM oss
    aplay: main:828: audio open error: No such file or directory

    PR:             245321

 audio/linux-c7-alsa-plugins-oss/Makefile                  |  5 +++--
 .../files/patch-oss_50-oss.conf (new)                     | 15 +++++++++++++++
 audio/linux-c7-alsa-plugins-oss/pkg-plist.aarch64         |  2 ++
 audio/linux-c7-alsa-plugins-oss/pkg-plist.amd64           |  2 ++
 audio/linux-c7-alsa-plugins-oss/pkg-plist.i386            |  2 ++
 5 files changed, 24 insertions(+), 2 deletions(-)
Comment 23 commit-hook freebsd_committer freebsd_triage 2024-02-21 14:28:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=390e208ac1f99e6717207bb829c6179caf279f4d

commit 390e208ac1f99e6717207bb829c6179caf279f4d
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-02-20 20:40:17 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-02-21 14:27:20 +0000

    audio/alsa-plugins: disable PULSEAUDIO by default after 44c14328c08e

    - Reduce heavy dependencies for consumers e.g., wine, pipewire, qt?-webengine
    - "pulse" plugin was partially broken until 51317515580f
    - All plugins with extra dependencies (like "pulse") to be subpackaged later

    PR:             245321

 audio/alsa-plugins/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)