| e5c0d702 | 11-Nov-2025 |
Christos Margiolis <christos@FreeBSD.org> |
virtual_oss(8): Improve hw.snd.basename_clone handling
If we request a /dev/dsp virtual_oss(8) device, we have to replace the sound(4) one by first disabling hw.snd.basename_clone. This sysctl tells
virtual_oss(8): Improve hw.snd.basename_clone handling
If we request a /dev/dsp virtual_oss(8) device, we have to replace the sound(4) one by first disabling hw.snd.basename_clone. This sysctl tells sound(4) to not create the /dev/dsp alias for the default device. There are currently two issues with the way this is handled by virtual_oss(8), however:
1. It uses system(3) instead of sysctlbyname(3). 2. It does not restore hw.snd.basename_clone to its original value, so if prior to virtual_oss(8) running, hw.snd.basename_clone was enabled (which is the case by default), and it is closed at some point, hw.snd.basename_clone stays disabled, which is annoying, because users have to manually restore it, otherwise applications that open the default device (i.e., most) will not work.
Fix both issues.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D53621
show more ...
|
| 8af6aee9 | 30-Sep-2025 |
Christos Margiolis <christos@FreeBSD.org> |
virtual_oss(8): Remove floating point formats from preference list
virtual_oss(8) chooses formats based on preference lists (see VPREFERRED_*) for each sample depth (-b option). However, if we, for
virtual_oss(8): Remove floating point formats from preference list
virtual_oss(8) chooses formats based on preference lists (see VPREFERRED_*) for each sample depth (-b option). However, if we, for example, use 32 bits LE for the sample depth, what will end up happening is that the format chosen will be 0x10001000, which corresponds to AFMT_S32_LE *and* AFMT_F32_LE OR'd together. This happens because the preference lists include both AFMT_S32_* and AFMT_F32_* in the 32-bit cases.
Because we essentially end up using an invalid format, sound(4) will eventually reach pcm_sample_write()'s (sys/dev/sound/pcm/pcm.h) __assert_unreachable() case.
This patch is a temporary fix to address the panic, until a proper solution for using floating point formats is found.
PR: 289904 Sponsored by: The FreeBSD Foundation MFC after: 2 days
show more ...
|