Bug 203703

Summary: audio/alsa-lib: libasound.so.2 shouldn't attempt to open Linux sequencer device /dev/snd/seq
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Open ---    
Severity: Affects Only Me CC: hselasky, w.schwarzenfeld
Priority: --- Keywords: needs-patch, needs-qa
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
Unfinished qudio/qtractor port as a testcase none

Description Yuri Victorovich freebsd_committer 2015-10-11 17:48:04 UTC
Currently (version 1.0.29) it attempts to open it, and produces this somewhat misleading message:
> ALSA lib seq_hw.c:457:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory

Instead, it should return an error right away, and the message should say that ALSA sequencer isn't available on FreeBSD.
Comment 1 Jan Beich freebsd_committer 2015-10-19 16:53:09 UTC
Can you provide an example command line or a piece of code? seq interface isn't implemented by any plugin among alsa-plugins. And snd_seq_open() already returns an error (-2) if a device cannot be opened, see test/playmidi1.c.

oss plugin can probably leverage libsalsa code but needs to support software synthesizer when there's no hardware (no virmidi to redirect). Patches welcome...

Comment 2 Yuri Victorovich freebsd_committer 2015-10-19 17:46:46 UTC
I got this error message during an attempt to port one Linux audio package. It bounded to libasound.so.2 and the message got produced. (The package itself might be ALSA-only, and is probably not able to work on FreeBSD, although it is a very nice tool.)

If you would really like to reproduce it, I am attaching the shar for the port that I was trying to make: qtractor. It builds, and runs when Jack audio server is running (/usr/local/bin/jackd -R -doss -r44100 -p1024 -n3 -w16 -C/dev/dsp0 -P/dev/dsp0).
It prints the above message.

Also here is the DTrace log of the failure operation:
  0  61925                    openat:return openat failure: fd=-100 file=/dev/snd/seq flags=1048582 errno=2

              qtractor`QWindowsStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const+0x3483
              qtractor`QWindowsStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const+0x1e3
Comment 3 Yuri Victorovich freebsd_committer 2015-10-19 17:47:22 UTC
Created attachment 162213 [details]
Unfinished qudio/qtractor port as a testcase
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-14 03:21:16 UTC
Is this still relevant?
Comment 5 Yuri Victorovich freebsd_committer 2018-01-14 03:26:24 UTC
I will retest it and will see if this is still relevant.
Comment 6 Hans Petter Selasky freebsd_committer 2021-08-02 08:11:31 UTC
There is now audio/alsa-seq-server in base.

And it should work with ALSA's /dev/snd/seq .