iecset(1)

πŸ’– iecset β€” the manual, but make it make sense πŸ’–

okay bestie, so this is iecset from the General Commands Manual section (that's section 1, the "type this at your shell" zone), and I'm gonna walk you through it like we're on a call. grab a snack. πŸ“


✨ NAME ✨

iecset β€” set or dump IEC958 status bits πŸ’…


🌸 SYNOPSIS 🌸

iecset [options] [cmd arg...]

that's it. that's the whole vibe. options first, commands after, slay. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so iecset is this tiny little utility (not me calling it small, it literally is) that sets or dumps the IEC958 status bits β€” which is the thing everybody calls "S/PDIF" β€” on whichever sound card you point it at, and it does all of that through the ALSA control API. no cap. πŸŽ€

here's the tea on how it behaves:

  • start iecset with no arguments except for options? it just shows you the current IEC958 status in a human-readable form. like, it's reading your card's mind and translating. πŸ‘‘
  • give it commands in the arguments instead? it parses them, updates the IEC958 status bits, and then shows you the resultant status too. it never leaves you hanging. 🫢

and about those commands β€” each one is made of a command directive and an argument. and when the argument is a boolean, you're allowed to write any of these: yes, no, true, false, or a digit number. so many options, we love to see it. 😌


πŸ”₯ EXAMPLES πŸ”₯

iecset -Dhw:1

displays the current IEC958 status bits on the second card. and btw? this is equivalent with -c 1. same thing, different font. πŸ’…

iecset -x

displays the current IEC958 status bits in the style of the arguments for the PCM stream. the output string it spits out can be passed to the iec958 (or spdif) PCM type as the optional argument. it's giving "here's your plug-and-play string bestie". 🌈

iecset pro off audio off

sets the current status to the consumer-mode and turns on the non-audio bit. and yes, the modified status will be shown too. periodt. ⭐

wait, "pro off" turning on consumer mode and "audio off" turning on non-audio β€” yes bestie, off on a boolean means the other side of the flag gets lit. the flags are named for the true side. iykyk. πŸ™ˆ

πŸ’œ OPTIONS πŸ’œ

  • -D device β€” specifies the device name of the control to open. πŸŽ€
  • -c card β€” specifies the card index to open. equivalent with -Dhw:x. πŸ‘‘
  • -n index β€” specifies the IEC958 control element index, for when you have multiple IEC958 devices and you gotta choose one of them. pick your fighter. πŸ’…
  • -x β€” dumps the status in the form of AESx bytes. ✨
  • -i β€” reads the command sequences from stdin. each line has a single command. one per line, no crowding. 🌸

πŸŽ€ COMMANDS πŸŽ€

  • professional <bool> β€” the professional mode (true) or consumer mode (false). πŸ’–
  • audio <bool> β€” the audio mode (true) or non-audio mode (false). πŸ”₯
  • rate <int> β€” the sample rate, in Hz. πŸ¦‹
  • emphasis <int> β€” the emphasis: 0 = none, 1 = 50/15us, 2 = CCITT. 🌈
  • lock <bool> β€” rate lock: locked (true), unlocked (false). > heads up: this command is for the professional mode only. πŸ’…
  • sbits <int> β€” sample bits: 2 = 20bit, 4 = 24bit, 6 = undefined. > also professional mode only, bestie. πŸ‘‘
  • wordlength <int> β€” wordlength: 0 = No, 2 = 22-18 bit, 4 = 23-19 bit, 5 = 24-20 bit, 6 = 20-16 bit. > yep, professional mode only. ⭐
  • category <int> β€” category: the value runs from 0 to 0x7f. > this one is consumer mode only. πŸŽ€
  • copyright <bool> β€” copyright: copyrighted (true), non-copyrighted (false). > consumer mode only. πŸ’–
  • original <boo> β€” original flag: original (true), 1st generation (false). > consumer mode only. 🌸

🌟 AUTHOR 🌟

Takashi Iwai <tiwai@suse.de> β€” the icon, the legend, the moment. πŸ‘‘


okay that's the whole page, you're officially an IEC958 girlie now πŸ’…βœ¨

this was written up on 23 Oct 2003, it's part of the General Commands Manual, and yeah β€” the page you're looking at is iecset(1). that's a whole 20+ years of status bits being set and dumped and honestly? iconic. go forth and set your bits, bestie. πŸ«ΆπŸ’–πŸŽ€πŸ¦‹