-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] OSS sound support on NetBSD #1527
Comments
Please test the dev build |
Thank you for the extremely quick reply and commit. Using readlink() is indeed better than spawning a subprocess. One thing, the array size for mixerp, as well as the character count returned by readlink should be larger (to store /dev/mixerN), otherwise the call will fail.
|
Strange. As I tested in VM, |
Anyway 4e9fecc should work for both cases. Please test it again |
BTW, are you vins? |
I think readlink(2) should just store the contents of the symlink's path in the buffer (so it's the full path), while readlinkat() stores the path relative to a directory. If you do: it returns:
It works, thank you.
Yes, I will update the patch to include your changes while updating the package to 2.35.0. [2] https://mail-index.netbsd.org/pkgsrc-changes/2025/01/26/msg315346.html |
# pkgsrc changes * Incorporate upstream patch to enable OSS support on NetBSD. Likely to be included in the next formal release. See: fastfetch-cli/fastfetch#1527 # upstream changes (since 2.34.0) Bugfixes: * Suppress output of EGL again (#1513, GPU, Linux) Regression of 2.34.0 Features: * Show SOC name reported in cpuinfo if available (#1510, CPU, Linux) * Change package manager name of NetBSD from pkg to pkgsrc (#1515, Packages, NetBSD) * Detect SOC name on RISCV (#1519, CPU, Linux) * Report marketing name of new QS8Es (CPU, Android) * Acquire acquire more os info from lsb-release if missing from os-release (#1521) * CMake: add option -DCUSTOM_LSB_RELEASE_PATH to specify the path of lsb-release file -DCUSTOM_OS_RELEASE_PATH has been supported since v2.11.4 * Report more SOC names on Android (CPU, Android) * Support duration printing in custom format (Disk / Users) Logo: * Add Arch_old * Update key color of NetBSD_small * Fix OpenBSD and many other ascii logos (#1522)
Description
The native NetBSD sound subsystem - audio(4) - is based on the SunAudio API derived from OpenSolaris.
However, a compat library providing OSS emulation - ossaudio(3) - is available for commodity on any NetBSD system.
While a native implementation may be preferred in the future[1], the following patch allows building sound_bsd.c on NetBSD. For this to work, fastfetch needs to be linked with
-lossaudio
. The default sound unit is detected through the command line using audiocfg(1).[1] TODO; aiomixer(1) sources may represent a good starting point.
Motivation
To avoid an additional dependency on pulseaudio on NetBSD.
Additional context
Using the patch above, on a NetBSD 10.1_STABLE system running on a Thinkpad T460s, I get:
If the default sound unit is changed to the onboard intel device:
The text was updated successfully, but these errors were encountered: