SNDCTL(8)
π SNDCTL π
okay so bestie, you know how your sound card has a whole vibe going on and you're just sitting there like "what is even happening in there"? yeah. that's what this is for. from the System Manager's Manual, this is the sndctl utility β and it's literally about to be your new fave.
β¨ NAME β¨
sndctl β list and modify soundcard properties ποΈ
π¦ SYNOPSIS π¦
sndctl [--libxo] [-f device] [-hov] [control[=value] ...]
πΈ DESCRIPTION πΈ
The sndctl utility is used to set and display sound card properties, using a control-driven interface, in order to filter and/or set specific properties.
no cap, it's giving "I have control issues but make it cute" energy. the whole thing is control-driven, which means you talk to it in properties and it just gets it. iykyk π
The options are as follows:
π OPTIONS π
--libxoβ Generate output vialibxo(3)in a selection of different human and machine readable formats. Seexo_options(7)for details on command line arguments. β¨ (yes bestie, machine readable too, she's versatile)-fdevice β Choose a specific audio device (see βFILESβ). Userland devices (e.g those registered byvirtual_oss(8)) can also be selected. π«Ά pick your fave.-hβ Print a help message. the classic "help me help you" moment.-oβ Print values in a format suitable for use inside scripts. π₯ script girlies rise up.-vβ Run in verbose mode. This option will print all of the device's channel properties. like the full lore drop. π
π THE DEVICE CONTROLS π
okay so these are the device-level controls. read/write status is right there so you know what you can actually touch. π
nameβ String, Read β Device namedescβ String, Read β Device descriptionstatusβ String, Read β Device statusdevnodeβ String, Read β Device nodefrom_userβ Boolean, Read β Userland deviceunitβ Number, Read β Device unitcapsβ String, Read β Device OSS capabitiliesbitperfectβ Boolean, Read/Write β Bit-perfect mode enabledautoconvβ Boolean, Read/Write β Auto-conversions enabledrealtimeβ Boolean, Read/Write β Real-time mode enabled
π΅ play β Group, Read β Playback properties
play.formatβ String, Read/Write β Playback formatplay.rateβ Number, Read/Write β Playback sample rateplay.vchansβ Boolean, Read/Write β Playback VCHANs (virtual channels) enabledplay.min_rateβ Number, Read β Minimum playback sample rateplay.max_rateβ Number, Read β Maximum playback sample rateplay.min_chansβ Number, Read β Natively supported minimum playback sample channelsplay.max_chansβ Number, Read β Natively supported maximum playback sample channelsplay.formatsβ String, Read β Natively supported playback formats
ποΈ rec β Group, Read β Recording properties
rec.formatβ String, Read/Write β Recording formatrec.rateβ Number, Read/Write β Recording sample raterec.vchansβ Boolean, Read/Write β Recording VCHANs (virtual channels) enabledrec.min_rateβ Number, Read β Minimum recording sample raterec.max_rateβ Number, Read β Maximum recording sample raterec.min_chansβ Number, Read β Natively supported minimum recording sample channelsrec.max_chansβ Number, Read β Natively supported maximum recording sample channelsrec.formatsβ String, Read β Natively supported recording formats
β οΈ heads up bestie: theplay.format,play.rate,rec.formatandrec.ratecontrols will be read-only if VCHANs are disabled. so if you're like "why can't I set this" β that's why. π
π THE DEVICE CHANNEL CONTROLS π
these ones are per-channel, so they're like the main characters of the actual audio stream. β
nameβ String, Read β Channel nameparentchanβ String, Read β Parent (primary) channel nameunitβ Number, Read β Channel unitcapsβ String, Read β Channel OSS capabilitieslatencyβ Number, Read β Channel latencyformatβ String, Read β Channel formatrateβ Number, Read β Channel sample ratepidβ Number, Read β PID of process consuming channelprocβ String, Read β Name of process consuming channelinterruptsβ Number, Read β Number of interrupts since channel was openedxrunsβ Number, Read β Number of playback underruns/recoring overrunsfeedcountβ Number, Read β Number of bytes fed to channelvolumeβ Volume, Read β Channel left-right volume in normalized form (0.00to1.00). like a little slider from zero to full send. ποΈ
π hwbuf β Group, Read β Hardware buffer properties
hwbuf.formatβ String, Read β Hardware buffer formathwbuf.rateβ String, Read β Hardware buffer sample ratehwbuf.size_bytesβ Number, Read β Hardware buffer size in byteshwbuf.size_framesβ Number, Read β Hardware buffer size in frameshwbuf.blkszβ Number, Read β Hardware buffer block sizehwbuf.blkcntβ Number, Read β Hardware buffer block counthwbuf.freeβ Number, Read β Hardware buffer free space in byteshwbuf.readyβ Number, Read β Hardware buffer ready space in bytes
π swbuf β Group, Read β Software buffer properties
swbuf.formatβ String, Read β Software buffer formatswbuf.rateβ String, Read β Software buffer sample rateswbuf.size_bytesβ Number, Read β Software buffer size in bytesswbuf.size_framesβ Number, Read β Software buffer size in framesswbuf.blkszβ Number, Read β Software buffer block sizeswbuf.blkcntβ Number, Read β Software buffer block countswbuf.freeβ Number, Read β Software buffer free space in bytesswbuf.readyβ Number, Read β Software buffer ready space in bytesfeederchainβ String, Read β Channel feeder chain π (the whole pipeline aesthetic)
ποΈ FILES ποΈ
/dev/dspβ The default audio device. the one that's just there for you. π/dev/dspXβ The audio device file, where X is the unit of the device, for example/dev/dsp0. pick your fighter. π₯
π EXAMPLES π
Disable auto-conversions and enable realtime mode to get as low latencies as possible:
$ sndctl autoconv=0 realtime=1
lowkey the "no thoughts just vibes but make it fast" setup. π₯
Set the playback sample format to 2-channel signed 24-bit low endian, and sample rate to 48000 Hz:
$ sndctl play.format=s24le:2.0 play.rate=48000
she's specific. she's iconic. periodt. π
List the PIDs and process names of all channels for /dev/dsp1:
$ sndctl -f /dev/dsp1 pid proc
who is consuming the channel? we simply must know. π
Dump /dev/dsp0 information to a file and retrieve back later:
$ sndctl -f /dev/dsp0 -o > info
...
$ sndctl -f /dev/dsp0 `cat info`
save the lore for later and reload it. the way that works is genuinely so satisfying. π«Ά
π¦ SEE ALSO π¦
sndstat(4), sound(4), xo_options(7), mixer(8), sysctl(8)
π AUTHORS π
The sndctl utility was implemented by Christos Margiolis <christos@FreeBSD.org> under sponsorship from the FreeBSD Foundation. absolute icon behavior. π
π and that's the whole page bestie β this version lives under the Debian umbrella, dated December 2, 2025, stamped as part of the System Manager's Manual as SNDCTL(8). slay. β¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π the page's license: BSD-2-Clause
- Copyright (c) 2024-2025 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms