Merge pull request #355 from ghostbsd/dependabot/pip/contrib/libcbor/doc/source/jinja2-3.1.6
build(deps): bump jinja2 from 3.1.5 to 3.1.6 in /contrib/libcbor/doc/source
Merge pull request #353 from ghostbsd/dependabot/pip/contrib/libcbor/doc/source/certifi-2024.7.4
build(deps): bump certifi from 2023.11.17 to 2024.7.4 in /contrib/libcbor/doc/source
sound: Make dev.pcm.X.mode dynamic
Currently dev.pcm.X.mode is calculated only once in pcm_sysinit(), which
is called by pcm_register() during attach, but this can result in
inconsistencies.
For some context, what pcm_mode_init() does is, it checks if "playcount"
is positive, in which case we assume the device supports playback. The
same is done for "reccount" for recording, and if "mixer_dev" is not
NULL, we know the device has a mixer.
The "playcount" and "reccount" variables correspond to the number of
_primary_ playback/recording channels, so we can assume that the primary
channels have been created before reaching pcm_mode_init(). However, for
the mixer that's not always the case. If the mixer is created _after_
pcm_register(), as is the case for snd_dummy(4) for example,
pcm_mode_init() will see that "mixer_dev" is NULL, and report that the
device does not have a mixer, whereas in reality we just created it
afterwards.
[8 lines not shown]
sound: Retire SD_F_AUTOVCHAN
This flag is redundant and essentially a no-op, as it is set when the
device supports at least playback or recording, which is almost always
the case. But even if the device is mixer-only (i.e., 0 channels), there
is no reason to keep this flag; it is only used to bail out of the vchan
sysctl handlers, but we already bail out anyway if we try to use the
sysctl in a vchan direction that is not supported.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49021
sound: Take dsp_cdevsw out of header file
Not used outside of pcm/dsp.c.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D49217
sound: Simplify pcm/feeder_mixer.c
- Get rid of macro magic.
- Make feed_mixer_info handling similar to most feeders.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48394
sound: Remove feed_matrix_apply_generic()
It does what feed_matrix_apply() already does, so it is redundant.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48036
sound: Remove macro magic from pcm/feeder_matrix.c
Turn the FEEDMATRIX_DECLARE macro into a single inline function
(feed_matrix_apply()). There is no reason to have this as a macro, it
only complicated the code. An advantage of this patch is that, because
we no longer call the functions created by the macro through function
pointers (apply field of feed_matrix_info), we can call
feed_matrix_apply() directly in feed_matrix_feed().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48035
sound: Remove macro magic from pcm/feeder_eq.c
Turn the FEEDEQ_DECLARE macro into a single inline function
(feed_eq_biquad()). There is no reason to have this as a macro, and it
only complicates the code. An advantage of this patch is that, because
we no longer call the functions created by the macro through function
pointers (biquad_op), we can call feed_eq_biquad() directly in
feed_eq_feed().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48032
sound: Turn clamp macros into a function
This makes some subsequent feeder refactors easier to implement.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D48421
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
ip_output(): if mb_unmapped_to_ext() failed, return directly
do not free the original mbuf, it is already freed by the
mb_unmapped_to_ext().
Reviewed by: glebius
Sponsored by: NVidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49305
mb_unmapped_to_ext(): fix m_free()/m_freem() use
The top of the chain is supposed to be freed in mb_unmapped_to_ext(),
use m_freem(). The _mb_unmapped_to_ext() helper only needs to work on
the passed mbuf, use m_free().
Reviewed by: glebius
Sponsored by: NVidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D49305
Makefile.inc1: packageworld: remove non-NO_ROOT cases
The packageworld target requires NO_ROOT to be set (and there is a check
that this is the case). Remove the now-unused non-NO_ROOT cases.
Reviewed by: brooks, bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48590
linprocfs: Correct sysfs /proc/<pid>/mountinfo entry
Technically mount source could be an arbitrary string (since it's
effectively ignored), but it's common to repeat fs type there.
new-bus: Use M_WAITOK in more places
M_NOWAIT is now only used for devclass_get_devices,
devclass_get_drivers, and device_get_children. Other functions are
generally called from sleepable contexts such as module event
handlers, attach/detach routines, and the ioctl handler for
/dev/devctl2.
Suggested by: mjg (devclass_add_device)
Differential Revision: https://reviews.freebsd.org/D49274