xref: /netbsd-src/share/man/man4/ym.4 (revision 3b01aba77a7a698587faaae455bbfe740923c1f5)
1.\" $NetBSD: ym.4,v 1.11 1999/12/27 03:23:41 itohy Exp $
2.\"
3.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Lennart Augustsson.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"        This product includes software developed by the NetBSD
20.\"        Foundation, Inc. and its contributors.
21.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22.\"    contributors may be used to endorse or promote products derived
23.\"    from this software without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35.\" POSSIBILITY OF SUCH DAMAGE.
36.\"
37.Dd May 20, 1998
38.Dt YM 4
39.Os
40.Sh NAME
41.Nm ym
42.Nd Yamaha OPL3-SA3 audio device driver
43.Sh SYNOPSIS
44.Cd "ym*    at isapnp?"
45.Cd "ym*    at pnpbios? index ?"
46.Cd "audio* at ym?"
47.Cd "mpu*   at ym?"
48.Cd "opl*   at ym?"
49.Sh DESCRIPTION
50The
51.Nm
52driver provides support for Yamaha YMF715x (OPL3-SA3) sound devices.
53.Pp
54The OPL3-SA3 device has
55WSS compatible full-duplex 16bit CODEC,
56OPL3 FM synthesizer,
57MPU401 compatible MIDI I/O port interface,
58and built-in
59.Sq 3D Enhanced
60equalizer.
61.Pp
62The joystick interface is handled by the
63.Xr joy 4
64driver.
65.Sh MIXER DEVICE
66The mixer device of
67.Nm
68driver can be accessed by
69.Xr mixerctl 1
70command.
71The layout is shown below.
72.Bd -literal
73            dac ------------------------<-----  -----------------
74midi(OPL3/ZV)->-+----------------------------+->|inputs.midi    |
75cd      ->------+-*--------------------------+->|inputs.cd      |
76line    ->----*-+-+--------------------------+->|inputs.line    |
77speaker ->----+-+-+--------------------------+->|inputs.speaker |
78  inputs.mic  v v v      monitor.monitor     |  |               |
79     |  ---------------  -------  |  ------- |  |               |
80mic --->|record.record|->| A/D |---->| D/A |-*->|inputs.dac     |analog
81        |             |  |conv.|-- ->|conv.|    |               |output
82        ---------------  ------- | | -------    | outputs.master|-->
83                           wave  v | wave       | equalization.*|
84                         recording playback     -----------------
85.Ed
86.Pp
87Note that the
88.Sq Dv inputs.dac
89is twice as sensitive as other
90.Sq Dv inputs
91volume variables.
92.Pp
93The hardware volume changes the
94.Sq Dv outputs.master
95value.
96.Pp
97If an external input source is unmuted by setting corresponding
98.Sq Dv inputs.*.mute
99variable to
100.Sq Dv off ,
101the device is never put in global power down or power save mode.
102This is because if the device is in global power down or power save mode,
103the output is automatically muted.
104.Pp
105All the external input sources (CD playback, line input, and speaker)
106are muted by default.
107.Sh POWER MANAGEMENT
108The
109.Nm
110driver is capable of power management on the OPL3-SA3 devices.
111The following modes can be selected by setting
112.Sq Dv power.save
113variable of
114.Xr mixerctl 1
115to
116.Sq Dv powerdown ,
117.Sq Dv powersave ,
118and
119.Sq Dv nosave
120respectively.
121.Pp
122.Bl -tag -width indent -compact
123.It Global power-down mode
124When a subpart of the device is unused, the part is power-down after
125a timeout period (specified by
126.Sq Dv power.save.timeout
127variable of
128.Xr mixerctl 1
129in seconds).
130When all the subparts of the device are unused,
131and all the external input sources are muted,
132the driver puts the device in
133.Sq Global Power Down
134mode.
135.Pp
136On the global power down mode, the power consumption is minimized
137(10\(*mA typ.),
138.\" Note: \(*m is Greek mu
139but the click noise on power up/down the device is rather loud.
140.Bf Em
141This mode should not be used with headphones or hi\-fi audio systems,
142or your ears or the systems may be damaged.
143.Ef
144.It Power save mode
145When a subpart of the device is unused, the part is powered-down after
146a timeout period (specified by
147.Sq Dv power.save.timeout
148variable of
149.Xr mixerctl 1
150in seconds).
151When all the subparts of the device are unused,
152and all the external input sources are muted,
153the driver put the device in
154.Sq Power Save
155mode.
156.Pp
157In power save mode, the power consumption is reduced (5mA typ.).
158The click noise on power up/down of the device is very small,
159but this operation requires muting/unmuting the device, which make some noise.
160In order to reduce the noise, setting the master volume at the small value
161is effective.
162.It "No power-save mode"
163Once the device is powered-up, it remains on after the use of the device.
164Once a subpart of the device is powered-up, it shall not be power-down.
165This mode minimizes click noises on power switching,
166but maximizes power consumption (30-100mA).
167.Pp
168On suspending, the device is put into power-save state.
169.El
170.Sh BUGS
171Although the parameters of the device are saved and restored on
172.Xr apm 4
173suspend/resume, the DMA state is not restored.
174That is, if the system suspends during playback,
175this is not continued after suspend/resume cycle.
176.Pp
177The joystick port is not under power management.
178If a
179.Xr joy 4
180device is configured,
181the device will never be put in global power down or power save mode.
182.Pp
183The external devices, such as Zoomed Video port, OPL4-ML/2, modem, and CD-ROM
184are not supported.
185.Sh SEE ALSO
186.Xr mixerctl 1 ,
187.Xr audio 4 ,
188.Xr apm 4 ,
189.Xr isapnp 4 ,
190.Xr joy 4 ,
191.Xr midi 4 ,
192.Xr mpu 4 ,
193.Xr opl 4 ,
194.Xr pnpbios 4
195.Sh HISTORY
196The
197.Nm
198device driver appeared in
199.Nx 1.4 .
200