xref: /netbsd-src/share/man/man4/ym.4 (revision 8b0f9554ff8762542c4defc4f70e1eb76fb508fa)
1.\" $NetBSD: ym.4,v 1.17 2006/08/14 09:50:18 wiz 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 August 14, 2006
38.Dt YM 4
39.Os
40.Sh NAME
41.Nm ym
42.Nd Yamaha OPL3-SA2 and OPL3-SA3 audio device driver
43.Sh SYNOPSIS
44.Cd "ym*    at acpi?"
45.Cd "ym*    at isapnp?"
46.Cd "ym*    at pnpbios? index ?"
47.Cd "audio* at audiobus?"
48.Cd "mpu*   at ym?"
49.Cd "opl*   at ym?"
50.Sh DESCRIPTION
51The
52.Nm
53driver provides support for
54Yamaha YMF711 (OPL3-SA2) and YMF715x (OPL3-SA3) sound devices.
55.Pp
56The OPL3-SAx device has
57WSS compatible full-duplex 16bit CODEC,
58OPL3 FM synthesizer, and
59MPU401 compatible MIDI I/O port interface.
60Additionally, OPL3-SA3 has built-in
61.Sq 3D Enhanced
62equalizer.
63.Pp
64The joystick interface is handled by the
65.Xr joy 4
66driver.
67.Sh MIXER DEVICE
68The mixer device of
69.Nm
70driver can be accessed by
71.Xr mixerctl 1
72command.
73The layout is shown below.
74.Bd -literal
75            dac ------------------------\*[Lt]-----  -----------------
76midi(OPL3/ZV)-\*[Gt]-+----------------------------+-\*[Gt]|inputs.midi    |
77cd      -\*[Gt]------+-*--------------------------+-\*[Gt]|inputs.cd      |
78line    -\*[Gt]----*-+-+--------------------------+-\*[Gt]|inputs.line    |
79speaker -\*[Gt]----+-+-+--------------------------+-\*[Gt]|inputs.speaker |
80mic     -\*[Gt]--*-+-+-+--------------------------+-\*[Gt]|inputs.mic     |
81            v v v v      monitor.monitor     |  |               |
82        ---------------  -------  |  ------- |  |               |
83        |record.record|-\*[Gt]| A/D |----\*[Gt]| D/A |-*-\*[Gt]|inputs.dac     |analog
84        |             |  |conv.|-- -\*[Gt]|conv.|    |               |output
85        ---------------  ------- | | -------    | outputs.master|--\*[Gt]
86                           wave  v | wave       | equalization.*|
87                         recording playback     -----------------
88.Ed
89.Pp
90Note that the
91.Sq Dv inputs.dac
92is twice as sensitive as other
93.Sq Dv inputs
94volume variables.
95.Pp
96The hardware volume changes the
97.Sq Dv outputs.master
98value.
99.Pp
100If an external input source is unmuted by setting corresponding
101.Sq Dv inputs.*.mute
102variable to
103.Sq Dv off ,
104the device is never put in global power down or power save mode.
105This is because if the device is in global power down or power save mode,
106the output is automatically muted.
107.Pp
108All the external input sources (CD playback, line input, speaker, and MIC)
109are muted by default.
110.Pp
111The
112.Sq Dv equalization.*
113variables does not exists on OPL3-SA2.
114The
115.Sq equalization.treble
116and
117.Sq equalization.bass
118are enhancement only, and any values below the center position (128)
119don't take any effect.
120.Sh POWER MANAGEMENT
121The
122.Nm
123driver is capable of power management on the OPL3-SAx devices.
124The following modes can be selected by setting
125.Sq Dv power.save
126variable of
127.Xr mixerctl 1
128to
129.Sq Dv powerdown ,
130.Sq Dv powersave ,
131and
132.Sq Dv nosave
133respectively.
134.Pp
135.Bl -tag -width indent -compact
136.It Global power-down mode
137When a subpart of the device is unused, the part is power-down after
138a timeout period (specified by
139.Sq Dv power.save.timeout
140variable of
141.Xr mixerctl 1
142in seconds).
143When all the subparts of the device are unused,
144and all the external input sources are muted,
145the driver puts the device in
146.Sq Global Power Down
147mode.
148.Pp
149On the global power down mode, the power consumption is minimized
150(10\(*mA (SA3) or 200\(*mA (SA2) typ.),
151.\" Note: \(*m is Greek mu
152but the click noise on power up/down the device is rather loud.
153.Bf Em
154This mode should not be used with headphones or hi\-fi audio systems,
155or your ears or the systems may be damaged.
156.Ef
157.It Power save mode
158When a subpart of the device is unused, the part is powered-down after
159a timeout period (specified by
160.Sq Dv power.save.timeout
161variable of
162.Xr mixerctl 1
163in seconds).
164When all the subparts of the device are unused,
165and all the external input sources are muted,
166the driver put the device in
167.Sq Power Save
168mode.
169.Pp
170In power save mode, the power consumption is reduced (5mA typ.).
171The click noise on power up/down of the device is very small,
172but this operation requires muting/unmuting the device, which make some noise.
173In order to reduce the noise, setting the master volume at the small value
174is effective.
175.It "No power-save mode"
176Once the device is powered-up, it remains on after the use of the device.
177Once a subpart of the device is powered-up, it shall not be power-down.
178This mode minimizes click noises on power switching,
179but maximizes power consumption (30-100mA).
180.Pp
181On suspending, the device is put into power-save state.
182.El
183.Sh SEE ALSO
184.Xr mixerctl 1 ,
185.Xr apm 4 ,
186.Xr audio 4 ,
187.Xr isapnp 4 ,
188.Xr joy 4 ,
189.Xr midi 4 ,
190.Xr mpu 4 ,
191.Xr opl 4 ,
192.Xr pnpbios 4
193.Sh HISTORY
194The
195.Nm
196device driver appeared in
197.Nx 1.4 .
198.Sh BUGS
199Although the parameters of the device are saved and restored on
200.Xr apm 4
201suspend/resume, the DMA state is not restored.
202That is, if the system suspends during playback,
203this is not continued after suspend/resume cycle.
204.Pp
205The joystick port is not under power management.
206If a
207.Xr joy 4
208device is configured,
209the device will never be put in global power down or power save mode.
210.Pp
211The external devices, such as Zoomed Video port, OPL4-ML/2, modem, and CD-ROM
212are not supported.
213