CMPCI(4)

πŸ“¦
version 11.0 Β· 2 versions
, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, welcome to the CMPCI(4) page from the Kernel Interfaces Manual β€” aka cmpci, the C-Media CMI8x38 audio device driver, and she is literally the main character πŸ’…βœ¨


✨ SYNOPSIS ✨

here's how she shows up, no cap:

cmpci* at pci? dev ? function ?
audio* at audiobus?
mpu*   at cmpci?
opl*   at cmpci? flags 1

🌸 DESCRIPTION 🌸

okay so the cmpci device driver supports C-Media CMI8x38 based sound cards πŸŽ€

the device has SPDIF input/output interfaces, a 16bit CODEC with analog mixer, an OPL3 FM Synthesizer, and an MPU401 compatible MIDI I/O port interface. it's giving iconic, honestly πŸ¦‹


πŸŽ›οΈ MIXER DEVICE πŸŽ›οΈ

you can access the mixer device of the cmpci driver via the mixerctl(1) command. the complex structure is analyzed as follows β€” buckle up bestie, she's a lot but she's worth it πŸ’œ

       SPDIF in  ----------------------
       #1(coax)->|spdin1              |  R    -----------------------
       #2(opt)-->|spdin2  spdif.input |--*->--|spdin   spdif.output |--> SPDIF
              -->|spdout              |  | -->|playback             |    output
              |  ----------------------  | |  -----------------------
              --------------------<------+-*
            ---------<-------------------+-+----------------------------------
            |  ------------------------  | |   -----------------------       |
            -->|legacy  spdif.output. |--+-*-->|spdout               |       |
            -->|wave    playback      |  ----->|spdin  spdif.monitor |----   |
            |  ------------------------     NC-|off                  |   |   |
            ---------<-- spdif                 -----------------------   |   |
                -------+------- dac ------------    -----------------    v   |
       wave  -->|playback.mode|---->|inputs.dac|-*->|inputs.dac.mute|->----- |
       playback ---------------     ------------ R  -----------------  | + | |
                         -----------------     ---------------------   |mix| |
       FM synthesizer -->|inputs.fmsynth |--*->|inputs.fmsynth.mute|-->----- |
                         -----------------  R  ---------------------     *->--
       CD        ----------------------   ---------------------------    v
       LINE-IN ->|inputs.{cd,line,aux}|-*>|inputs.{cd,line,aux}.mute|->-----
       AUX       ---------------------- R ---------------------------  |   |
                 ------------------                                    |   |
       PC-SPK -->| inputs.speaker |----------------------------------->| + |
                 ------------------                                    |   |
                 -------------------  ------------  -----------------  |mix|
       MIC --*-->|inputs.mic.preamp|->|inputs.mic|->|inputs.mic.mute|->|   |
             |   -------------------  ------------  -----------------  -----
             |   ------------   -----------------                       |
             --->|record.mic|-->|               |                       v
                 ------------   | record.source |-->to         -----------
                           *R-->| (select, mix) |   recording  |outputs.*|-->
                                -----------------              ----------- SPK
                                                                        (front)
lowkey important: the 2nd SPDIF input exists only on CMI8738/PCI-6ch versions. don't @ me if your card doesn't have it 🫢

πŸ“Έ MIXER EXAMPLES πŸ“Έ

here are examples about wave playback and SPDIF input/output ports β€” copy these exactly, they're load-bearing bestie πŸ’–

🌈 Playback to speaker, SPDIF input to SPDIF output

mixerctl -w playback.mode=dac spdif.output=spdin
spdif.monitor=off

🌈 Playback to SPDIF output, SPDIF input to speaker

mixerctl -w playback.mode=spdif spdif.output=playback
spdif.output.playback=wave spdif.monitor=spdin

🌈 SPDIF input to both SPDIF output and speaker

mixerctl -w spdif.output=spdin spdif.monitor=spdin

🌈 Playback to both SPDIF output and speaker

mixerctl -w playback.mode=spdif spdif.output=playback
spdif.output.playback=wave spdif.monitor=spdout

🌈 Mix playback and SPDIF input to speaker

mixerctl -w playback.mode=dac spdif.monitor=spdin

πŸ”— SEE ALSO πŸ”—

go read these too, they're all part of the lore ✨


πŸ•°οΈ HISTORY πŸ•°οΈ

the cmpci device driver appeared in NetBSD 1.5 β€” vintage but still cute πŸŽ€


πŸ’€ BUGS πŸ’€

  • 4ch/6ch playback is not yet available β€” sad, I know 😭
  • Joystick port is not supported β€” πŸ™ˆ
  • spdif.output.playback=legacy does not seem to work properly β€” πŸ’€

this page is from Debian, dated June 22, 2005 β€” mwah, stay slaying bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from