unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <>
Subject: sunaudio detection and libossaudio
Date: Tue, 11 Aug 2020 17:11:49 +0200	[thread overview]
Message-ID: <> (raw)

[Isolating this from a related oss detection thread]

On Aug 11 15:34:07, wrote:
> This is OpenBSD/current.
> On Aug 10 13:17:07, wrote:
> > Near as I can tell, no system actually has a machine/soundcard.h file.
> OpenBSD has neither <machine/soundcard.h> nor <sys/soundcard.h>;
> it has <soundcard.h>, as documented in
> > The libossaudio library on NetBSD and OpenBSD is meant to emulate a
> > few ioctl() commands to facilitate porting of Linux applications.
> Yes.
> > As we have proper sndio support, this is of no use for SoX.
> On OpenBSD, yes (I will look at NetBSD and FreeBSD in separate emails).
> Current SoX git builds and runs fine on OpenBSD
> (except the recent -Wl,--as-needed) using sndio,
> if ./configure'd right. The OpenBSD port of SoX 14.4.2
> explicitly builds --without-oss	--without-sunaudio --with-sndio
> In fact, these options are necessary (that is to say,
> the autodetection is broken); when ./configure'd without options,
> it detects each of sndio, ossaudio and sunaudio, and fails with
> sox.c: In function 'adjust_volume':
> sox.c:1337: error: 'audio_info_t' undeclared (first use in this function)
> sox.c:1337: error: (Each undeclared identifier is reported only once
> sox.c:1337: error: for each function it appears in.)
> sox.c:1337: error: expected ';' before 'audio_info'
> sox.c:1338: error: 'AUDIO_GETINFO' undeclared (first use in this function)
> sox.c:1338: error: 'audio_info' undeclared (first use in this function)
> sox.c:1341: warning: implicit declaration of function 'AUDIO_INITINFO'
> sox.c:1345: error: 'AUDIO_SETINFO' undeclared (first use in this function)

Currently, the configure system uses the following
to decide whether the underlying system provides the 'sunaudio' driver:

      [AC_CHECK_HEADERS(sun/audioio.h,, using_sunaudio=no)])])

that is wrong on at least OpenBSD, which does have sys/audioio.h,
but it does not provide a sunaudio device driver. The audioio.h
interface is the audio HW abstraction that the individual
card drivers implement, see

The result is that ./configure mis-detects sunaudio and tries
to compile the driver, which fails as described above.

It seems that a more correct way of detecting the sunaudio driver
would be to check if AUDIO_GETINFO and AUDIO_SETINFO are defined
and the audio_info_t type is declared.


SoX-devel mailing list

                 reply	other threads:[~2020-08-11 15:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).