1.\" $NetBSD: cmpci.4,v 1.8 2008/04/30 13:10:53 martin 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.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 22.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 24.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 25.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31.\" POSSIBILITY OF SUCH DAMAGE. 32.\" 33.Dd June 22, 2005 34.Dt CMPCI 4 35.Os 36.Sh NAME 37.Nm cmpci 38.Nd C-Media CMI8x38 audio device driver 39.Sh SYNOPSIS 40.Cd "cmpci* at pci? dev ? function ?" 41.Cd "audio* at audiobus?" 42.Cd "mpu* at cmpci?" 43.Cd "opl* at cmpci? flags 1" 44.Sh DESCRIPTION 45The 46.Nm 47device driver supports C-Media CMI8x38 based sound cards. 48.Pp 49The device has 50SPDIF input/output interfaces, 5116bit CODEC with analog mixer, 52OPL3 FM Synthesizer, 53and MPU401 compatible MIDI I/O port interface. 54.Sh MIXER DEVICE 55The mixer device of 56.Nm 57driver can be accessed via 58.Xr mixerctl 1 59command. 60The complex structure is analyzed as follows. 61.Bd -literal 62SPDIF in ---------------------- 63#1(coax)-\*[Gt]|spdin1 | R ----------------------- 64#2(opt)--\*[Gt]|spdin2 spdif.input |--*-\*[Gt]--|spdin spdif.output |--\*[Gt] SPDIF 65 --\*[Gt]|spdout | | --\*[Gt]|playback | output 66 | ---------------------- | | ----------------------- 67 --------------------\*[Lt]------+-* 68 ---------\*[Lt]-------------------+-+---------------------------------- 69 | ------------------------ | | ----------------------- | 70 --\*[Gt]|legacy spdif.output. |--+-*--\*[Gt]|spdout | | 71 --\*[Gt]|wave playback | -----\*[Gt]|spdin spdif.monitor |---- | 72 | ------------------------ NC-|off | | | 73 ---------\*[Lt]-- spdif ----------------------- | | 74 -------+------- dac ------------ ----------------- v | 75wave --\*[Gt]|playback.mode|----\*[Gt]|inputs.dac|-*-\*[Gt]|inputs.dac.mute|-\*[Gt]----- | 76playback --------------- ------------ R ----------------- | + | | 77 ----------------- --------------------- |mix| | 78FM synthesizer --\*[Gt]|inputs.fmsynth |--*-\*[Gt]|inputs.fmsynth.mute|--\*[Gt]----- | 79 ----------------- R --------------------- *-\*[Gt]-- 80CD ---------------------- --------------------------- v 81LINE-IN -\*[Gt]|inputs.{cd,line,aux}|-*\*[Gt]|inputs.{cd,line,aux}.mute|-\*[Gt]----- 82AUX ---------------------- R --------------------------- | | 83 ------------------ | | 84PC-SPK --\*[Gt]| inputs.speaker |-----------------------------------\*[Gt]| + | 85 ------------------ | | 86 ------------------- ------------ ----------------- |mix| 87MIC --*--\*[Gt]|inputs.mic.preamp|-\*[Gt]|inputs.mic|-\*[Gt]|inputs.mic.mute|-\*[Gt]| | 88 | ------------------- ------------ ----------------- ----- 89 | ------------ ----------------- | 90 ---\*[Gt]|record.mic|--\*[Gt]| | v 91 ------------ | record.source |--\*[Gt]to ----------- 92 *R--\*[Gt]| (select, mix) | recording |outputs.*|--\*[Gt] 93 ----------------- ----------- SPK 94 (front) 95.Ed 96.Pp 97Note the 2nd SPDIF input exists only on CMI8738/PCI-6ch versions. 98.Sh MIXER EXAMPLES 99Here are examples about wave playback and SPDIF input/output ports. 100.Bl -tag -width 1n 101.It Playback to speaker, SPDIF input to SPDIF output 102.Dl mixerctl -w playback.mode=dac spdif.output=spdin spdif.monitor=off 103.It Playback to SPDIF output, SPDIF input to speaker 104.Dl mixerctl -w playback.mode=spdif spdif.output=playback spdif.output.playback=wave spdif.monitor=spdin 105.It SPDIF input to both SPDIF output and speaker 106.Dl mixerctl -w spdif.output=spdin spdif.monitor=spdin 107.It Playback to both SPDIF output and speaker 108.Dl mixerctl -w playback.mode=spdif spdif.output=playback spdif.output.playback=wave spdif.monitor=spdout 109.It Mix playback and SPDIF input to speaker 110.Dl mixerctl -w playback.mode=dac spdif.monitor=spdin 111.El 112.Sh SEE ALSO 113.Xr mixerctl 1 , 114.Xr audio 4 , 115.Xr midi 4 , 116.Xr mpu 4 , 117.Xr opl 4 , 118.Xr pci 4 119.Sh HISTORY 120The 121.Nm 122device driver appeared in 123.Nx 1.5 . 124.Sh BUGS 1254ch/6ch playback is not yet available. 126Joystick port is not supported. 127.Pp 128.Dv spdif.output.playback=legacy 129does not seem to work properly. 130