Bug 203703 - audio/alsa-lib: libasound.so.2 shouldn't attempt to open Linux sequencer device /dev/snd/seq
Summary: audio/alsa-lib: libasound.so.2 shouldn't attempt to open Linux sequencer devi...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-10-11 17:48 UTC by Yuri Victorovich
Modified: 2018-01-14 03:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (jbeich)


Attachments
Unfinished qudio/qtractor port as a testcase (3.36 KB, text/plain)
2015-10-19 17:47 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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...

http://sourceforge.net/p/opensound/git/ci/master/tree/lib/libsalsa/seq.c
http://sourceforge.net/p/opensound/git/ci/master/tree/tutorials/sndkit/softsynth/softsynth.c
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

              libc.so.7`__sys_openat+0xa
              libc.so.7`open+0xb8
              libasound.so.2.0.0`snd_seq_hw_open+0x7b
              libasound.so.2.0.0`_snd_seq_hw_open+0xc4
              libasound.so.2.0.0`0x800e2124b
              qtractor`0x4cb04c
              qtractor`0x51e97d
              qtractor`0x5a5cf4
              qtractor`0x59b01f
              qtractor`0x5975f5
              qtractor`0x595255
              qtractor`QWindowsStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const+0x3483
              qtractor`QWindowsStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const+0x1e3
              ld-elf.so.1`_rtld+0x240
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.