SNDSTAT(7)

πŸ“¦
version 4.2-build2020 Β· 3 versions
, in ubuntu noble

✨ sndstat β€” the manual, section 7 ✨

okay bestie so this is sndstat(7), like section 7 of the manual, and yes it's giving "old school Unix docs" energy but I promise it's useful πŸ’…


🌸 NAME 🌸

sndstat β€” the Open Sound System status device πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

/dev/sndstat is a text formatted device special file that hands you info about the available (OSS) sound devices. cute, right? except β€” this device file is obsolete and the ossinfo(1) utility should be used instead. so like, she's retired, no cap.

also heads up bestie, the device numbering used in this file is different than the official numbering used by ossinfo(1) and some other utilities. /dev/sndstat uses device numbers that match the "legacy" /dev/dspN, /dev/midiN and /dev/mixerN device files. so don't get it twisted πŸ™ˆ

application programs should not use /dev/sndstat to obtain information about the sound devices. the format of this file may change in the future and /dev/sndstat may even be removed from OSS in distant future 😭. OSS 4.0 and later has an ioctl interface for getting detailed and reliable information about the devices β€” that's the moment, that's the one πŸ‘‘


πŸ’– AUDIO USAGE HISTORY πŸ’–

/dev/sndstat reports some history information about previously run audio applications. this section is a debugging aid for application developers and it will be moved to the ossinfo program in the future. so it's lowkey temporary, enjoy it while it lasts 🫢

for example:

History:
/dev/oss/hdaudio0/pcm0.10: pid 6326 cmd 'error_test' OUT Play events:01009:2 Rec events:01002:0
/dev/oss/hdaudio0/pcm0.10: pid 6329 cmd 'mpg123' OUT
/dev/oss/hdaudio0/pcm0.10: pid 6329 cmd 'mpg123' OUT
/dev/oss/hdaudio0/pcm0.10: pid 6329 cmd 'mpg123' OUT

each line will show the the device name, PID and name of the application (if known) and access mode (IN and/or OUT). there may also be additional info about buffer underruns/overruns and other recording and playback related events πŸ‘€

each Play and rec events consist of 5-6 digit event code and a parameter separated by a colon. a list of defined event codes and their explanations can be found from http://manuals.opensound.com/developer/oss_error_codes.html. purpose of these events is to inform application developers by potential problems in their code. so basically it's the group chat calling you out when your code is messy, but lovingly πŸ’œ


πŸŽ€ COMPATIBILITY πŸŽ€

/dev/sndstat has been available in all OSS versions. however in OSS 4.0 and later this device file should only be used by applications written for earlier OSS versions. vintage only, iykyk ✨


πŸ’… OPTIONS πŸ’…

none. literally none. zero. the girl has no flags 🌈


🧚 PROGRAMMING INFORMATION 🧚

some applications use /dev/sndstat to find the audio devices available in the system. this method is no longer recommended 😀. applications should use the SNDCTL_AUDIOINFO(2) ioctl call to find the devices. periodt.


⭐ SEE ALSO ⭐

  • dsp(7) β€” Audio device files
  • mixer(7) β€” Mixer (control panel) device files
  • midi(7) β€” MIDI device files

πŸ“ FILES πŸ“

/dev/sndstat


πŸ‘‘ AUTHOR πŸ‘‘

4Front Technologies πŸ’–


ok bestie that's the whole page, mwah πŸ’‹ β€” this was OSS Devices, dated 11 February 2015, section 7. go forth and use ossinfo(1) instead, fr fr πŸ¦‹βœ¨
πŸ“¦ where this page comes from