Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 May 2024 19:32:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        usb@FreeBSD.org
Subject:   [Bug 252761] multichannel USB audio device reports only 2 channels via SNDCTL_AUDIOINFO
Message-ID:  <bug-252761-19105-9YnG6mLXe9@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252761-19105@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252761-19105@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252761

--- Comment #11 from commit-hook@FreeBSD.org ---
A commit in branch stable/14 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3De8a80b4e50e8d992fe46a95509b37fc45=
7288f93

commit e8a80b4e50e8d992fe46a95509b37fc457288f93
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-05-23 00:57:04 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-05-25 19:30:26 +0000

    sound: Separate implementations for SNDCTL_AUDIOINFO[_EX] and
SNDCTL_ENGINEINFO

    FreeBSD's implementation of SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO
    does not exactly work as intended. The problem is essentially that both
    IOCTLs return the same information, while in fact the information
    returned currently by dsp_oss_audioinfo() is what _only_
    SNDCTL_ENGINEINFO is meant to return.

    This behavior is also noted in the OSS manual [1] (see bold paragraph in
    "Audio engines and device files" section), but since e8c0d15a64fa
    ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)") we can
    actually fix this, because we now expose only a single device for each
    soundcard, and create the engines (channels) internally.
    SNDCTL_ENGINEINFO will now report info about all channels in a given
    device, and SNDCTL_AUDIOINFO[_EX] will only report information about
    /dev/dspX.

    To make this work, we also have to modify the SNDCTL_SYSINFO IOCTL to
    report the number of audio devices and audio engines correctly.

    While here, modernize the minimum and maximum channel counting in both
    SNDCTL_AUDIOINFO[_EX] and SNDCTL_ENGINEINFO. Currently these IOCTLs will
    report only up to 2 channels, which is no longer the case.

    [1] http://manuals.opensound.com/developer/SNDCTL_AUDIOINFO.html

    PR:             246231, 252761
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 day
    Reviewed by:    dev_submerge.ch
    Differential Revision:  https://reviews.freebsd.org/D45164

    (cherry picked from commit e07f9178502b7cbc0769fc10e99ad0d013f437fd)

 sys/dev/sound/pcm/dsp.c   | 179 +++++++++++++++++++++++++++++++++++++++++-=
----
 sys/dev/sound/pcm/dsp.h   |   3 +-
 sys/dev/sound/pcm/mixer.c |   8 ++-
 sys/dev/sound/pcm/sound.c |   8 +--
 4 files changed, 173 insertions(+), 25 deletions(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-252761-19105-9YnG6mLXe9>