History log of /src/sys/dev/sound/sndstat.c (Results 1 – 25 of 75)
Revision Date Author Comments
# 2aa16666 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

sound: Take device type into account in sndstat

sndstat will be extended to work with MIDI devices as well, so separate
functionality based on the device type.

Sponsored by: The FreeBSD Foundation

sound: Take device type into account in sndstat

sndstat will be extended to work with MIDI devices as well, so separate
functionality based on the device type.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54141

show more ...


# bafa8c95 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

sound: Move sndstat out of pcm/

Needed by follow-up patches that will add sndstat support for midi/

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision:

sound: Move sndstat out of pcm/

Needed by follow-up patches that will add sndstat support for midi/

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54140

show more ...


# 84976625 02-Jan-2026 Christos Margiolis <christos@FreeBSD.org>

sound: Retire pcm_feeder->desc_static

Not sure what the value of this was.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.o

sound: Retire pcm_feeder->desc_static

Not sure what the value of this was.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54103

show more ...


# 92dcd202 11-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Retire pcm_feederdesc->type

This is always accessed from pcm_feeder->desc->type. Instead of
duplicating this field, we can remove it from pcm_feederdesc, and access
it through pcm_feeder->cla

sound: Retire pcm_feederdesc->type

This is always accessed from pcm_feeder->desc->type. Instead of
duplicating this field, we can remove it from pcm_feederdesc, and access
it through pcm_feeder->class->type.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53557

show more ...


# 78c5026a 11-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Get rid of useless sndbuf getters and setters

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53528


# 59d7865d 10-Nov-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Clarify userland/vchan relationship in sndstat feeder chain

When vchans are enabled, the primary channels do not interact with
userland, but with the vchans.

With vchans enabled:

$ sndctl f

sound: Clarify userland/vchan relationship in sndstat feeder chain

When vchans are enabled, the primary channels do not interact with
userland, but with the vchans.

With vchans enabled:

$ sndctl feederchain
dsp0.play.0.feederchain=[vchans -> [...] -> hardware]
dsp0.record.0.feederchain=[hardware -> [...] -> vchans]

With vchans disabled:

$ sndctl feederchain
dsp0.play.0.feederchain=[userland -> [...] -> hardware]
dsp0.record.0.feederchain=[hardware -> [...] -> userland]

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53504

show more ...


# 3ba480f4 06-Jul-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Retire SND_DEV_*

Specifying unit numbers is not needed anymore, and half of those weren't
used anymore in the first place.

Sponsored by: The FreeBSD Foundation
Reviewed by: adrian, markj, em

sound: Retire SND_DEV_*

Specifying unit numbers is not needed anymore, and half of those weren't
used anymore in the first place.

Sponsored by: The FreeBSD Foundation
Reviewed by: adrian, markj, emaste
Differential Revision: https://reviews.freebsd.org/D50690

show more ...


# 79b96806 06-Jul-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Retire the MIDI sequencer

The in-kernel MIDI sequencer is not used anymore, since this is done by
userland applications nowadays. It also contains bugs, and we are not
exactly sure how it wor

sound: Retire the MIDI sequencer

The in-kernel MIDI sequencer is not used anymore, since this is done by
userland applications nowadays. It also contains bugs, and we are not
exactly sure how it works, or if it worked properly in the first place.

Sponsored by: The FreeBSD Foundation
Reviewed by: vishwin, markj
Differential Revision: https://reviews.freebsd.org/D50605

show more ...


# 19ec522d 25-Apr-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Export hardware and software buffer sample rate in sndstat nvlist

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49983


# 0c0bb4c1 25-Apr-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Make sndstat PVCHAN and RVCHAN nvlist parameters bool

Prior to 02d4eeabfd73 ("sound: Allocate vchans on-demand"), the
play.vchans and rec.vchans sysctls corresponded to the value of
d->pvchan

sound: Make sndstat PVCHAN and RVCHAN nvlist parameters bool

Prior to 02d4eeabfd73 ("sound: Allocate vchans on-demand"), the
play.vchans and rec.vchans sysctls corresponded to the value of
d->pvchancount and d->rvchancount respectively, which is also what we
are exporting through SNDST_DSPS_SOUND4_PVCHAN and
SNDST_DSPS_SOUND4_RVCHAN respectively. Since that commit, the sysctls
mentioned have been modified to show whether play/rec vchans are enabled
or not. Modify the sndstat nvlist parameters accordingly.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49980

show more ...


# c824383b 10-Mar-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Update COPYRIGHT notices

Only to files I've currently made significant contributions to.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 433e270f 10-Mar-2025 Christos Margiolis <christos@FreeBSD.org>

sound: Refactor the format conversion framework

Merge the PCM_READ|WRITE_* macros defined in pcm/pcm.h, as well as the
intpcm_read|write_* macros defined in pcm/feeder_format.c, into six
inline func

sound: Refactor the format conversion framework

Merge the PCM_READ|WRITE_* macros defined in pcm/pcm.h, as well as the
intpcm_read|write_* macros defined in pcm/feeder_format.c, into six
inline functions: pcm_sample_read|write[_norm|calc](). The absence of
macro magic makes the code significantly easier to read, use and modify.

Since these functions take the input/output format as a parameter, get
rid of the read() and write() function pointers defined in struct
feed_format_info, as well as the feeder_format_read|write_op()
functions, and use the new read/write functions directly.

Sponsored by: The FreeBSD Fondation
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47932

show more ...


# 0ff0a823 18-Oct-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Improve /dev/sndstat channel info readability

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, zlei
Differential Revision: https://reviews.freebsd.org/D468

sound: Improve /dev/sndstat channel info readability

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, zlei
Differential Revision: https://reviews.freebsd.org/D46857

show more ...


# aaf84d0e 18-Oct-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://revie

sound: Do not check for NULL if sbuf is allocated with SBUF_AUTOEXTEND

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D46846

show more ...


# 3cc01caa 18-Oct-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Do not cast return value of malloc(9)

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, zlei, markj, emaste
Differential Rev

sound: Do not cast return value of malloc(9)

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, zlei, markj, emaste
Differential Revision: https://reviews.freebsd.org/D46844

show more ...


# 0864dfe6 24-Aug-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Improve sndstat nvlist feederchain format

- Use snd_afmt2str() to display format conversions in feeder_format,
instead of the plain hex value.
- Simplify feeder_rate contents.
- Print "ch"

sound: Improve sndstat nvlist feederchain format

- Use snd_afmt2str() to display format conversions in feeder_format,
instead of the plain hex value.
- Simplify feeder_rate contents.
- Print "ch" (e.g 2.1ch) after matrix values in feeder_matrix.
- Use snd_afmt2str() instead of a plain hex for the the rest of the
feeder classes.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D46309

show more ...


# b58d9db4 02-Aug-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Fix VCHANs' starting and ending points in feeder chain

sndstat(4) falsely reports "hardware" as the starting point of
recording, and ending point of playback VCHANs. Recording VCHANs get
thei

sound: Fix VCHANs' starting and ending points in feeder chain

sndstat(4) falsely reports "hardware" as the starting point of
recording, and ending point of playback VCHANs. Recording VCHANs get
their input from the primary recording channel, and playback VCHANs send
their input to the primary playback channel.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D46177

show more ...


# bd5bcc84 27-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Add OSS channel capabilities to sndstat nvlist

Assignment taken from dsp_oss_engineinfo().

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Re

sound: Add OSS channel capabilities to sndstat nvlist

Assignment taken from dsp_oss_engineinfo().

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D46166

show more ...


# a6283717 27-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Add *vchanrate and *vchanformat to sndstat nvlist

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D46164


# 810530aa 27-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Add device status string to sndstat nvlist

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D46163


# e850bd36 06-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Add missing CHN_[UN]LOCKs in sndstat

In sndstat_build_sound4_nvlist(), if we have INVARIANTS or
SND_DIAGNOSTIC enabled, we will hit a lock assertion panic when we call
CHN_GETVOLUME(). Also l

sound: Add missing CHN_[UN]LOCKs in sndstat

In sndstat_build_sound4_nvlist(), if we have INVARIANTS or
SND_DIAGNOSTIC enabled, we will hit a lock assertion panic when we call
CHN_GETVOLUME(). Also lock the channel in the sndstat_prepare_pcm() loop
for good measure.

Fixes: bbca3a75bb41 ("sound: Include sound(4) channel information in sndstat nvlist")
Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45898

show more ...


# 9d8b93bc 06-Jul-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Refactor sndstat_get_caps()

The current implementation of sndstat_get_caps() does not work properly
when VCHANs are enabled, as it skips all information about physical
channels, and also assi

sound: Refactor sndstat_get_caps()

The current implementation of sndstat_get_caps() does not work properly
when VCHANs are enabled, as it skips all information about physical
channels, and also assigns the min/max rates and channels to same
values, which is usually not the case. A device either supports any
sample rate within the [feeder_rate_min, feeder_rate_max] range, or
[hw_rate_min, hw_rate_max] range when the device is opened in exclusive
or bitperfect mode. The number of channels can also vary and is not
always the same for both min and max.

Refactor the whole function to resemble the way we handle fetching of
these values in dsp_oss_audioinfo() and dsp_oss_engineinfo().

Sponsored by: The FreeBSD Foundation
MFC after: 2 days
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45872

show more ...


# bbca3a75 09-Jun-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Include sound(4) channel information in sndstat nvlist

Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information
about each channel in a given device, similar to how cat'ing
/dev/sn

sound: Include sound(4) channel information in sndstat nvlist

Extend SNDST_DSPS_PROVIDER_INFO for sound(4) to include information
about each channel in a given device, similar to how cat'ing
/dev/sndstat with hw.snd.verbose=2 works.

While here, document all provider_info fields.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D45501

show more ...


# fb9013f2 23-May-2024 Brooks Davis <brooks@FreeBSD.org>

pcm: centralize 32-bit ioctl compat

Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and
make the functions that actually do the work take a buffer and size or
size pointer. The 32

pcm: centralize 32-bit ioctl compat

Move all handlng of struct sndstioc_nv_arg(32) to sndstat_ioctl() and
make the functions that actually do the work take a buffer and size or
size pointer. The 32-bit compat work is minimal so just inline it.

Remove checks that we've got a 32-bit process for 32-bit ioctls. We
don't check that default ioctls are from 64-bit processes on 64-bit
systems.

Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D45307

show more ...


# 425a7bc4 23-May-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Fix minchn, maxchn and fmts in sndstat_get_caps()

The current implementation (incorrectly) passes the channel encoding
value to AFMT_CHANNEL(), which will always return 0, since the channel
n

sound: Fix minchn, maxchn and fmts in sndstat_get_caps()

The current implementation (incorrectly) passes the channel encoding
value to AFMT_CHANNEL(), which will always return 0, since the channel
number bits are masked out by AFMT_ENCODING().

Also add missing fmts initialization and aggregate encoding formats into
it directly.

Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D45312

show more ...


123