| CMPCI(4) | Device Drivers Manual | CMPCI(4) | 
cmpci —
cmpci* at pci? dev ? function ?
audio* at audiobus?
mpu* at cmpci?
opl* at cmpci? flags 1
cmpci device driver supports C-Media CMI8x38 based
  sound cards.
The device has SPDIF input/output interfaces, 16bit CODEC with analog mixer, OPL3 FM Synthesizer, and MPU401 compatible MIDI I/O port interface.
cmpci driver can be accessed via
  mixerctl(1) command. The
  complex structure is analyzed as follows.
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)
Note the 2nd SPDIF input exists only on CMI8738/PCI-6ch versions.
mixerctl -w playback.mode=dac
      spdif.output=spdin spdif.monitor=offmixerctl -w playback.mode=spdif
      spdif.output=playback spdif.output.playback=wave
      spdif.monitor=spdinmixerctl -w spdif.output=spdin
      spdif.monitor=spdinmixerctl -w playback.mode=spdif
      spdif.output=playback spdif.output.playback=wave
      spdif.monitor=spdoutmixerctl -w playback.mode=dac
      spdif.monitor=spdincmpci device driver appeared in
  NetBSD 1.5.
spdif.output.playback=legacy does not seem
    to work properly.
| June 22, 2005 | NetBSD 10.0 |