1.\" $NetBSD: cmpci.4,v 1.6 2002/02/13 08:17:32 ross Exp $ 2.\" 3.\" Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Takuya SHIOZAKI <AoiMoe@imou.to> . 8.\" 9.\" This code is derived from software contributed to The NetBSD Foundation 10.\" by ITOH Yasufumi. 11.\" 12.\" Redistribution and use in source and binary forms, with or without 13.\" modification, are permitted provided that the following conditions 14.\" are met: 15.\" 1. Redistributions of source code must retain the above copyright 16.\" notice, this list of conditions and the following disclaimer. 17.\" 2. Redistributions in binary form must reproduce the above copyright 18.\" notice, this list of conditions and the following disclaimer in the 19.\" documentation and/or other materials provided with the distribution. 20.\" 3. All advertising materials mentioning features or use of this software 21.\" must display the following acknowledgement: 22.\" This product includes software developed by the NetBSD 23.\" Foundation, Inc. and its contributors. 24.\" 4. Neither the name of The NetBSD Foundation nor the names of its 25.\" contributors may be used to endorse or promote products derived 26.\" from this software without specific prior written permission. 27.\" 28.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 29.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 30.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 31.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 32.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 33.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 34.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 36.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 37.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 38.\" POSSIBILITY OF SUCH DAMAGE. 39.\" 40.Dd April 29, 2000 41.Dt CMPCI 4 42.Os 43.Sh NAME 44.Nm cmpci 45.Nd C-Media CMI8x38 audio device driver 46.Sh SYNOPSIS 47.Cd "cmpci* at pci? dev ? function ?" 48.Cd "audio* at cmpci?" 49.Cd "mpu* at cmpci?" 50.Cd "opl* at cmpci? flags 1" 51.Sh DESCRIPTION 52The 53.Nm 54device driver supports C-Media CMI8x38 based sound cards. 55.Pp 56The device has 57SPDIF input/output interfaces, 5816bit CODEC with analog mixer, 59OPL3 FM Synthesizer, 60and MPU401 compatible MIDI I/O port interface. 61.Sh MIXER DEVICE 62The mixer device of 63.Nm 64driver can be accessed via 65.Xr mixerctl 1 66command. 67The complex structure is analyzed as follows. 68.Bd -literal 69SPDIF in ---------------------- 70#1(coax)-\*[Gt]|spdin1 | R ----------------------- 71#2(opt)--\*[Gt]|spdin2 spdif.input |--*-\*[Gt]--|spdin spdif.output |--\*[Gt] SPDIF 72 --\*[Gt]|spdout | | --\*[Gt]|playback | output 73 | ---------------------- | | ----------------------- 74 --------------------\*[Lt]------+-* 75 ---------\*[Lt]-------------------+-+---------------------------------- 76 | ------------------------ | | ----------------------- | 77 --\*[Gt]|legacy spdif.output. |--+-*--\*[Gt]|spdout | | 78 --\*[Gt]|wave playback | -----\*[Gt]|spdin spdif.monitor |---- | 79 | ------------------------ NC-|off | | | 80 ---------\*[Lt]-- spdif ----------------------- | | 81 -------+------- dac ------------ ----------------- v | 82wave --\*[Gt]|playback.mode|----\*[Gt]|inputs.dac|-*-\*[Gt]|inputs.dac.mute|-\*[Gt]----- | 83playback --------------- ------------ R ----------------- | + | | 84 ----------------- --------------------- |mix| | 85FM synthesizer --\*[Gt]|inputs.fmsynth |--*-\*[Gt]|inputs.fmsynth.mute|--\*[Gt]----- | 86 ----------------- R --------------------- *-\*[Gt]-- 87CD ---------------------- --------------------------- v 88LINE-IN -\*[Gt]|inputs.{cd,line,aux}|-*\*[Gt]|inputs.{cd,line,aux}.mute|-\*[Gt]----- 89AUX ---------------------- R --------------------------- | | 90 ------------------ | | 91PC-SPK --\*[Gt]| inputs.speaker |-----------------------------------\*[Gt]| + | 92 ------------------ | | 93 ------------------- ------------ ----------------- |mix| 94MIC --*--\*[Gt]|inputs.mic.preamp|-\*[Gt]|inputs.mic|-\*[Gt]|inputs.mic.mute|-\*[Gt]| | 95 | ------------------- ------------ ----------------- ----- 96 | ------------ ----------------- | 97 ---\*[Gt]|record.mic|--\*[Gt]| | v 98 ------------ | record.source |--\*[Gt]to ----------- 99 *R--\*[Gt]| (select, mix) | recording |outputs.*|--\*[Gt] 100 ----------------- ----------- SPK 101 (front) 102.Ed 103.Pp 104Note the 2nd SPDIF input exists only on CMI8738/PCI-6ch versions. 105.Sh MIXER EXAMPLES 106Here are examples about wave playback and SPDIF input/output ports. 107.Bl -tag -width 1n 108.It Playback to speaker, SPDIF input to SPDIF output 109.Dl mixerctl -w playback.mode=dac spdif.output=spdin spdif.monitor=off 110.It Playback to SPDIF output, SPDIF input to speaker 111.Dl mixerctl -w playback.mode=spdif spdif.output=playback spdif.output.playback=wave spdif.monitor=spdin 112.It SPDIF input to both SPDIF output and speaker 113.Dl mixerctl -w spdif.output=spdin spdif.monitor=spdin 114.It Playback to both SPDIF output and speaker 115.Dl mixerctl -w playback.mode=spdif spdif.output=playback spdif.output.playback=wave spdif.monitor=spdout 116.It Mix playback and SPDIF input to speaker 117.Dl mixerctl -w playback.mode=dac spdif.monitor=spdin 118.El 119.Sh SEE ALSO 120.Xr mixerctl 1 , 121.Xr audio 4 , 122.Xr midi 4 , 123.Xr mpu 4 , 124.Xr opl 4 , 125.Xr pci 4 126.Sh HISTORY 127The 128.Nm 129device driver appeared in 130.Nx 1.5 . 131.Sh BUGS 1324ch/6ch playback is not yet available. 133Joystick port is not supported. 134.Pp 135.Dv spdif.output.playback=legacy 136does not seem to work properly. 137