#
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 ...
|
Revision tags: release/13.4.0 |
|
#
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 ...
|
Revision tags: release/14.1.0 |
|
#
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 ...
|
#
64f4e2db |
| 20-May-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Correctly check nvlist_unpack() error
The current check is never false and if nvlist_unpack() fails, we might panic later down the road.
PR: 266144 Sponsored by: The FreeBSD Foundation MFC
sound: Correctly check nvlist_unpack() error
The current check is never false and if nvlist_unpack() fails, we might panic later down the road.
PR: 266144 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D45237
show more ...
|
#
074d337a |
| 20-May-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*
SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actu
sound: Check user-supplied size passed to SNDSTIOC_ADD_USER_DEVS*
SNDSTIOC_ADD_USER_DEVS* expects a user-supplied sndstioc_nv_arg->nbytes, however we currently do not check whether this size is actually valid, which results in a panic when SNDSTIOC_ADD_USER_DEVS* is called with an invalid size. sndstat_add_user_devs() calls sndstat_unpack_user_nvlbuf(), which then calls malloc() with that size.
PR: 266142 Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45236
show more ...
|
#
7398d1ec |
| 06-May-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Remove hw.snd.version and SND_DRV_VERSION
hw.snd.version and SND_DRV_VERSION define the sound driver version and are meant to be used in bug reports, but because these values are constant, th
sound: Remove hw.snd.version and SND_DRV_VERSION
hw.snd.version and SND_DRV_VERSION define the sound driver version and are meant to be used in bug reports, but because these values are constant, there is not much useful information we can extract from them.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch, emaste Differential Revision: https://reviews.freebsd.org/D44996
show more ...
|
#
4f854658 |
| 12-Apr-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Update some LICENSE headers
The following commits introduced substantial changes to pcm/dsp.c, pcm/sndstat.c and pcm/sound.c.
9da3b645dbaaad724d524727d003fed7be05ff7c ("sound: Move sndstat_p
sound: Update some LICENSE headers
The following commits introduced substantial changes to pcm/dsp.c, pcm/sndstat.c and pcm/sound.c.
9da3b645dbaaad724d524727d003fed7be05ff7c ("sound: Move sndstat_prepare_pcm() to pcm/sndstat.c and remove sndstat_entry->handler") e8c0d15a64fadb4a330f2da7244becaac161bb70 ("sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)")
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44757
show more ...
|
#
9da3b645 |
| 02-Apr-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Move sndstat_prepare_pcm() to pcm/sndstat.c and remove sndstat_entry->handler
Since all sndstat_entry->handler fields point to sndstat_prepare_pcm(), we can just call the function directly, w
sound: Move sndstat_prepare_pcm() to pcm/sndstat.c and remove sndstat_entry->handler
Since all sndstat_entry->handler fields point to sndstat_prepare_pcm(), we can just call the function directly, without assigning it to a function pointer and calling it indirectly.
While here, move sndstat_prepare_pcm() to pcm/sndstat.c, as it is more suitable there.
No functional change intended.
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D44571
show more ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
5aacf339 |
| 18-Aug-2023 |
John Baldwin <jhb@FreeBSD.org> |
sys: Remove SND_DECLARE_FILE
Reviewed by: kbowling, imp, emaste Differential Revision: https://reviews.freebsd.org/D41499
|
#
cbe53bd9 |
| 18-Aug-2023 |
John Baldwin <jhb@FreeBSD.org> |
pcm: Turn SND_DECLARE_FILE into a no-op.
SND_DECLARE_FILE originally added lines to the output of /dev/sndstat listing the $FreeBSD$ strings for individual files, but only if the value of hw.snd.ver
pcm: Turn SND_DECLARE_FILE into a no-op.
SND_DECLARE_FILE originally added lines to the output of /dev/sndstat listing the $FreeBSD$ strings for individual files, but only if the value of hw.snd.verbose was raised to 3. With the switch to Git these strings became meaningless as they were now all identical and no longer contained the path (which was implicitly included previously via the keyword expansion).
This commit removes all of the infrastructure to support file version strings from /dev/sndstat, but preserves the KPI/KBI by turning the SND_DECLARE_FILE macro into a nop and changing the backing sysinit functions into null functions and is suitable for merging to stable/13.
A future commit will remove SND_DECLARE_FILE entirely.
Reviewed by: kbowling, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41498
show more ...
|
#
82a265ad |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: sound driver version
Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
3b4c5433 |
| 27-Dec-2021 |
Alexander Motin <mav@FreeBSD.org> |
sound: Remove CTLFLAG_NEEDGIANT from some sysctls.
While there, remove some dead code.
MFC after: 2 weeks
|
Revision tags: release/12.3.0 |
|
#
4ce1ba65 |
| 21-Apr-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
sndstat: nvlist schema and API definition changes
- SNDSTAT_LABEL_* are renamed to SNDST_DSPS_*, and SNDSTAT_LABEL_DSPS becomes SNDST_DSPS. - Centralize channel number/rate/formats into a single n
sndstat: nvlist schema and API definition changes
- SNDSTAT_LABEL_* are renamed to SNDST_DSPS_*, and SNDSTAT_LABEL_DSPS becomes SNDST_DSPS. - Centralize channel number/rate/formats into a single nvlist The above nvlist is named "info_play" and "info_rec" - Expose only encoding format in pfmts/rfmts. Userland has no direct access to AFMT_ENCODING/CHANNEL/EXTCHANNEL macros, thus it serves no meaning to expose too much information through this pair of labels. However pminrate/rminrate, pmaxrate/rmaxrate, pfmts/rfmts are deprecated and will be removed in future.
This commit keeps ioctls ABI compatibility with __FreeBSD_version 1400006 for now. In future the compat ABI with 1400006 will be removed once audio/virtual_oss is rebuilt.
Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D29770
show more ...
|
Revision tags: release/13.0.0 |
|
#
c96151d3 |
| 17-Mar-2021 |
Ka Ho Ng <khng@FreeBSD.org> |
Implement sndstat nvlist-based enumeration ioctls.
These ioctl commands aim to provide easier ways for user space applications to enumerate existing audio devices and the node they can potentially u
Implement sndstat nvlist-based enumeration ioctls.
These ioctl commands aim to provide easier ways for user space applications to enumerate existing audio devices and the node they can potentially use.
The exchange of device lists between user space and kernel is done on nv(9). Some ioctl commands are added to /dev/sndstat node: - SNDSTAT_REFRESH_DEVS - SNDSTAT_GET_DEVS - SNDSTAT_ADD_USER_DEVS - SNDSTAT_FLUSH_USER_DEVS
Bump __FreeBSD_version to reflect the addition of the ioctls.
Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Approved by: philip (mentor) Differential Revision: https://reviews.freebsd.org/D26884
show more ...
|