1.\" $NetBSD: uaudio.4,v 1.31 2024/05/22 00:25:56 uwe Exp $ 2.\" 3.\" Copyright (c) 1999-2024 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.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd May 21, 2024 31.Dt UAUDIO 4 32.Os 33.Sh NAME 34.Nm uaudio 35.Nd USB audio device driver 36.Sh SYNOPSIS 37.Cd "uaudio* at uhub?" 38.Cd "audio* at audiobus?" 39.Sh DESCRIPTION 40The 41.Nm 42driver provides support for 43.Tn USB 44audio class devices. 45.Pp 46A 47.Tn USB 48audio device consists of a number of components: 49input terminals 50.Pq e.g. USB digital input , 51output terminals 52.Pq e.g. speakers , 53and a number of units in between 54.Pq e.g. volume control . 55The following types of units are handled by the 56.Nm 57driver and are accessible via the mixer 58.Pq see Xr audio 4 59interface: 60.Bl -tag -width Em 61.It Em mixer 62A mixer has a number of inputs and one output. 63Each input has a control that determines its volume in the output. 64The name of the control is 65.Sm off 66.Li mix Ar N Li \|- Ar S , 67.Sm on 68where 69.Ar N 70is a number that identifies which mixer it is and 71.Ar S 72which input. 73. 74.It Em selector 75A selector unit selects one of multiple audio sources such as mic-in 76and line-in. 77The name of the control is 78.Sm off 79.Li sel Ar N Li \|- Ar S1S2S3... , 80.Sm on 81where 82.Ar N 83is a number that identifies which selector unit it is and the sequence of 84.Ar Sn 85indicates candidate units for the audio source. 86. 87.It Em feature 88A feature unit changes the sound in some way, like bass, treble, 89mute, or volume. 90The name of the control is determined in a heuristic way. 91If the unit changes the sound to a speaker output terminal, 92the names of the controls may be 93.Li outputs.speaker.bass , 94.Li outputs.speaker.treble , 95.Li outputs.speaker.mute , 96.Li outputs.speaker , 97or likewise. 98. 99.It Em processing 100A processing unit does one of a number of audio processing functions 101.Pq e.g., channel up-down mixing, Dolby ProLogic, or chorus effects . 102The name of the on\[en]off control is 103.Sm off 104.Li pro Ar N Li \&. Ar M Li \|-enable , 105.Sm on 106where 107.Ar N 108is a number that identifies which processing unit it is and 109.Ar M 110which kind. 111Depending on the type of processing unit there may be other controls 112as well. 113. 114.It Em extension 115An extension unit performs some unspecified audio processing 116The name of the on\[en]off control is 117.Sm off 118.Li ext Ar N Li \|-enable , 119.Sm on 120where 121.Ar N 122is a number that identifies which processing unit it is. 123.El 124.Pp 125For more information the 126.Tn USB 127Audio class specification is indispensable 128reading. 129.Sh SEE ALSO 130.Xr audio 4 , 131.Xr usb 4 132.Rs 133.%T "USB Approved Class Specification Documents" 134.%U http://www.usb.org/developers/docs/devclass_docs/ 135.Re 136.Sh HISTORY 137The 138.Nm 139driver 140appeared in 141.Nx 1.5 . 142Support for USB Audio Class 2.0 devices appeared in 143.Nx 11.0 . 144.Sh BUGS 145There is no support for multiple-endpoints audio stream, 146adaptive recording, async playback, and TYPE-II/III formats. 147.Pp 148There is the possibility that a device has multiple mixer items 149which have the same name. 150