Bug 208968 - audio/portaudio: support hw.snd.default_unit sysctl
Summary: audio/portaudio: support hw.snd.default_unit sysctl
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-22 05:27 UTC by Stephen Hurd
Modified: 2021-01-19 21:03 UTC (History)
4 users (show)

See Also:
amdmi3: maintainer-feedback+


Attachments
This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp. (2.20 KB, patch)
2016-04-22 05:27 UTC, Stephen Hurd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Hurd freebsd_committer freebsd_triage 2016-04-22 05:27:53 UTC
Created attachment 169553 [details]
This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp.

If the hw.snd.default_unit is set to anything except zero, /dev/dsp0 is not available to programs using portaudio, since it assumes that /dev/dsp and /dev/dsp0 are the same device.

This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp.
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2016-05-10 15:46:59 UTC
Maintainer timeout
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-08-04 07:24:27 UTC
A commit references this bug:

Author: kevlo
Date: Thu Aug  4 07:24:01 UTC 2016
New revision: 419598
URL: https://svnweb.freebsd.org/changeset/ports/419598

Log:
  Support hw.snd.default_unit sysctl.

  If the hw.snd.default_unit is set to anything except zero, /dev/dsp0 is
  not available to programs using portaudio, since it assumes that /dev/dsp
  and /dev/dsp0 are the same device.

  PR:	208968
  Submitted by:	shurd
  Approved by:	koalative@gmail.com (maintainer timeout)

Changes:
  head/audio/portaudio/Makefile
  head/audio/portaudio/files/
  head/audio/portaudio/files/patch-src_hostapi_oss_pa__unix__oss.c
Comment 3 Kevin Lo freebsd_committer freebsd_triage 2016-08-04 08:09:37 UTC
Committed, thanks.
Comment 4 M F 2016-10-09 22:51:56 UTC
This "fix" actually breaks portaudio that was previously working on my system.

I'm running 10.3-STABLE r306333 amd64, built 9/2/2016.

On my system, sysctl hw.snd.default_unit=2

With ports/audio/portaudio AFTER this fix, I don't get any audio, and cannot figure out how to get any audio (while other non-portaudio apps properly produce sound).

When I do 'cd ports/audio/portaudio ; svn update -r 419597 ; make reinstall' I am then able to get proper audio when running a portaudio application that uses the default configured system sound interface (in my case, hw.snd.default_unit=2). For the purposes of testing, I used one of the portaudio test application, patest_sine8.

I'm not sure if I should file a new bug, or try to reopen this PR.

-Marc
Comment 5 Ed Maste freebsd_committer freebsd_triage 2021-01-19 20:56:19 UTC
(In reply to M F from comment #4)
> I'm not sure if I should file a new bug, or try to reopen this PR.

Did you get any further with your issue?