Created attachment 242783 [details] v1 (apply via "git am") FreeBSD kernel doesn't support ALSA, so there're no "hw" devices, only plugins. alsa-lib provides default config to map /dev/dsp to pcm.default using "oss" plugin. Let's make pipewire use it. Based on bug 255348. I didn't test planar vs. interleaved samples but bug 184006 should handle float to integer conversion. $ mpv --no-video --ao=pipewire --msg-level=ao=v https://feeds.fireside.fm/bsdnow/rss [...] [ao] Trying audio driver 'pipewire' [ao/pipewire] requested format: 48000 Hz, stereo channels, floatp [ao/pipewire] Headers version: 0.3.62 [ao/pipewire] Library version: 0.3.62 [ao/pipewire] Core user: foo [ao/pipewire] Core host: 131amd64-default [ao/pipewire] Core version: 0.3.62 [ao/pipewire] Core name: pipewire-0 [ao/pipewire] device buffer: 960 samples. [ao/pipewire] using soft-buffer of 9600 samples. AO: [pipewire] 48000Hz stereo 2ch floatp A: 00:00:00 / 00:46:40 (0%) Cache: 184s/6MB
Comment on attachment 242783 [details] v1 (apply via "git am") > +MEDIASESSION_RUN_DEPENDS= alsa-plugins>0:audio/alsa-plugins This brings audio/pulseaudio via bug 245321. Maybe multimedia/pipewire should also enable PULSEAUDIO option by default. Note, audio/alsa-plugins is required to avoid the following after installing /usr/local/etc/pipewire/pipewire.conf.d/alsa-default.conf Adding "nofail" will make the error non-fatal at the cost of broken audio (again). $ pipewire [...] ALSA lib dlmisc.c:285:(snd_dlobj_cache_get0) Cannot open shared library /usr/local/lib/alsa-lib/libasound_module_pcm_oss.so ((null): Cannot open "/usr/local/lib/alsa-lib/libasound_module_pcm_oss.so") [E][0.237744] spa.alsa | [ alsa-pcm.c: 558 spa_alsa_open()] 'pcm.default': playback open failed: Device not configured [W][0.237750] mod.adapter | [ adapter.c: 232 find_format()] 0x2efa73d40040: can't get format: Device not configured [E][0.237755] mod.adapter | [module-adapter.c: 283 create_object()] usage: node.name=<string> [E][0.237759] pw.resource | [ resource.c: 265 pw_resource_errorf_id()] usage: node.name=<string> [E][0.237839] pw.conf | [ conf.c: 692 create_object()] can't create object from factory adapter: Invalid argument [E][0.238164] default | [ pipewire.c: 125 main()] failed to create context: Invalid argument
If this works for you, go for it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=a7aaffb08b1688f28121d1f12e8012fd40bf75e7 commit a7aaffb08b1688f28121d1f12e8012fd40bf75e7 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-06-15 03:28:16 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-06-15 22:10:49 +0000 multimedia/pipewire: unbreak audio with default config $ pw-play foo.wav stream node 35 error: no node available remote error: id=2 seq:5 res:-2 (No such file or directory): no node available PR: 272004 Approved by: arrowd (maintainer) multimedia/pipewire/Makefile | 13 +++++++++--- .../pipewire/files/10-alsa-default.conf.in (new) | 23 ++++++++++++++++++++++ multimedia/pipewire/pkg-plist | 1 + 3 files changed, 34 insertions(+), 3 deletions(-)
A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3bfa97870dbb2b3af241bb59aae978c6af7826b5 commit 3bfa97870dbb2b3af241bb59aae978c6af7826b5 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-06-15 03:28:16 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-06-15 22:12:24 +0000 multimedia/pipewire: unbreak audio with default config $ pw-play foo.wav stream node 35 error: no node available remote error: id=2 seq:5 res:-2 (No such file or directory): no node available PR: 272004 Approved by: arrowd (maintainer) (cherry picked from commit a7aaffb08b1688f28121d1f12e8012fd40bf75e7) multimedia/pipewire/Makefile | 12 +++++++++-- .../pipewire/files/10-alsa-default.conf.in (new) | 23 ++++++++++++++++++++++ multimedia/pipewire/pkg-plist | 1 + 3 files changed, 34 insertions(+), 2 deletions(-)