153a5a1b3Sopenharmony_ci# This file is part of PulseAudio.
253a5a1b3Sopenharmony_ci#
353a5a1b3Sopenharmony_ci# PulseAudio is free software; you can redistribute it and/or modify
453a5a1b3Sopenharmony_ci# it under the terms of the GNU Lesser General Public License as
553a5a1b3Sopenharmony_ci# published by the Free Software Foundation; either version 2.1 of the
653a5a1b3Sopenharmony_ci# License, or (at your option) any later version.
753a5a1b3Sopenharmony_ci#
853a5a1b3Sopenharmony_ci# PulseAudio is distributed in the hope that it will be useful, but
953a5a1b3Sopenharmony_ci# WITHOUT ANY WARRANTY; without even the implied warranty of
1053a5a1b3Sopenharmony_ci# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1153a5a1b3Sopenharmony_ci# General Public License for more details.
1253a5a1b3Sopenharmony_ci#
1353a5a1b3Sopenharmony_ci# You should have received a copy of the GNU Lesser General Public License
1453a5a1b3Sopenharmony_ci# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
1553a5a1b3Sopenharmony_ci
1653a5a1b3Sopenharmony_ci; Common part of all paths
1753a5a1b3Sopenharmony_ci
1853a5a1b3Sopenharmony_ci; So here's generally how mixer paths are used by PA: PA goes through
1953a5a1b3Sopenharmony_ci; a mixer path file from top to bottom and checks if a mixer element
2053a5a1b3Sopenharmony_ci; described therein exists. If so it is added to the list of mixer
2153a5a1b3Sopenharmony_ci; elements PA will control, keeping the order it read them in. If a
2253a5a1b3Sopenharmony_ci; mixer element described here has set the required= or
2353a5a1b3Sopenharmony_ci; required-absent= directives a path might not be accepted as valid
2453a5a1b3Sopenharmony_ci; and is ignored in its entirety (see below). However usually if a
2553a5a1b3Sopenharmony_ci; element listed here is missing this one element is ignored but not
2653a5a1b3Sopenharmony_ci; the entire path.
2753a5a1b3Sopenharmony_ci;
2853a5a1b3Sopenharmony_ci; When a device shall be muted/unmuted *all* elements listed in a path
2953a5a1b3Sopenharmony_ci; file with "switch = mute" will be toggled.
3053a5a1b3Sopenharmony_ci;
3153a5a1b3Sopenharmony_ci; When a device shall change its volume, PA will got through the list
3253a5a1b3Sopenharmony_ci; of all elements with "volume = merge" and set the volume on the
3353a5a1b3Sopenharmony_ci; first element. If that element does not support dB volumes, this is
3453a5a1b3Sopenharmony_ci; where the story ends. If it does support dB volumes, PA divides the
3553a5a1b3Sopenharmony_ci; requested volume by the volume that was set on this element, and
3653a5a1b3Sopenharmony_ci; then go on to the next element with "volume = merge" and then set
3753a5a1b3Sopenharmony_ci; that there, and so on.  That way the first volume element in the
3853a5a1b3Sopenharmony_ci; path will be the one that does the 'biggest' part of the overall
3953a5a1b3Sopenharmony_ci; volume adjustment, with the remaining elements usually being set to
4053a5a1b3Sopenharmony_ci; some value next to 0dB. This logic makes sure we get the full range
4153a5a1b3Sopenharmony_ci; over all volume sliders and a very high granularity of volumes
4253a5a1b3Sopenharmony_ci; already in hardware.
4353a5a1b3Sopenharmony_ci;
4453a5a1b3Sopenharmony_ci; All switches and enumerations set to "select" are exposed via the
4553a5a1b3Sopenharmony_ci; "port" functionality of sinks/sources. Basically every possible
4653a5a1b3Sopenharmony_ci; switch setting and every possible enumeration setting will be
4753a5a1b3Sopenharmony_ci; combined and made into a "port". So make sure you don't list too
4853a5a1b3Sopenharmony_ci; many switches/enums for exposing, because the number of ports might
4953a5a1b3Sopenharmony_ci; rise exponentially.
5053a5a1b3Sopenharmony_ci;
5153a5a1b3Sopenharmony_ci; Only one path can be selected at a time. All paths that are valid
5253a5a1b3Sopenharmony_ci; for an audio device will be exposed as "port" for the sink/source.
5353a5a1b3Sopenharmony_ci
5453a5a1b3Sopenharmony_ci
5553a5a1b3Sopenharmony_ci; [General]
5653a5a1b3Sopenharmony_ci; type = ...                             # The device type. It's highly recommended to set a type for every path.
5753a5a1b3Sopenharmony_ci;                                        # See parse_type() in alsa-mixer.c for supported values.
5853a5a1b3Sopenharmony_ci; priority = ...                         # Priority for this path
5953a5a1b3Sopenharmony_ci; description-key = ...                  # The path description is looked up from a table in path_verify() in
6053a5a1b3Sopenharmony_ci;                                        # src/modules/alsa/alsa-mixer.c. By default the path name (i.e. the file name
6153a5a1b3Sopenharmony_ci;                                        # minus the ".conf" suffix) is used as the lookup key, but if this option is
6253a5a1b3Sopenharmony_ci;                                        # set, then the given string is used as the key instead. In any case the
6353a5a1b3Sopenharmony_ci;                                        # "description" option can be used to override the path description.
6453a5a1b3Sopenharmony_ci; description = ...                      # Description for this path. Overrides the normal description lookup logic, as
6553a5a1b3Sopenharmony_ci;                                        # described in the "description-key" documentation above.
6653a5a1b3Sopenharmony_ci; mute-during-activation = yes | no      # If this path supports hardware mute, should the hw mute be used while activating this
6753a5a1b3Sopenharmony_ci;                                        # path? In some cases this can reduce extra noises during port switching, while in other
6853a5a1b3Sopenharmony_ci;                                        # cases this can increase such noises. Default: no.
6953a5a1b3Sopenharmony_ci; eld-device = ...                       # If this is an HDMI port, set to "auto" so that PulseAudio will try to read
7053a5a1b3Sopenharmony_ci;                                        # the monitor ELD information from the ALSA mixer. By default the ELD information
7153a5a1b3Sopenharmony_ci;                                        # is not read, because it's only applicable with HDMI. Earlier the "auto" option
7253a5a1b3Sopenharmony_ci;                                        # didn't exist, and the hw device index had to be manually configured. For
7353a5a1b3Sopenharmony_ci;                                        # backwards compatibility, it's still possible to manually configure the device
7453a5a1b3Sopenharmony_ci;                                        # index using this option.
7553a5a1b3Sopenharmony_ci;
7653a5a1b3Sopenharmony_ci; [Properties]                           # Property list for this path. The list is merged into the port property list.
7753a5a1b3Sopenharmony_ci; <key> = <value>                        # Each property is defined on its own line.
7853a5a1b3Sopenharmony_ci; ...
7953a5a1b3Sopenharmony_ci;
8053a5a1b3Sopenharmony_ci; [Option ...:...]                       # For each option of an enumeration or switch element
8153a5a1b3Sopenharmony_ci;                                        # that shall be exposed as a sink/source port. Needs to
8253a5a1b3Sopenharmony_ci;                                        # be named after the Element, followed by a colon, followed
8353a5a1b3Sopenharmony_ci;                                        # by the option name, resp. on/off if the element is a switch.
8453a5a1b3Sopenharmony_ci; name = ...                             # Logical name to use in the path identifier
8553a5a1b3Sopenharmony_ci; priority = ...                         # Priority if this is made into a device port
8653a5a1b3Sopenharmony_ci; required = ignore | enumeration | any            # In this element, this option must exist or the path will be invalid. ("any" is an alias for "enumeration".)
8753a5a1b3Sopenharmony_ci; required-any = ignore | enumeration | any        # In this element, either this or another option must exist (or an element)
8853a5a1b3Sopenharmony_ci; required-absent = ignore | enumeration | any     # In this element, this option must not exist or the path will be invalid
8953a5a1b3Sopenharmony_ci;
9053a5a1b3Sopenharmony_ci; [Element ...]                          # For each element that we shall control. The "..." here is the element name,
9153a5a1b3Sopenharmony_ci;                                        # or name and index separated by a comma.
9253a5a1b3Sopenharmony_ci; required = ignore | switch | volume | enumeration | any     # If set, require this element to be of this kind and available,
9353a5a1b3Sopenharmony_ci;                                                             # otherwise don't consider this path valid for the card
9453a5a1b3Sopenharmony_ci; required-any = ignore | switch | volume | enumeration | any # If set, at least one of the elements or jacks with required-any in this
9553a5a1b3Sopenharmony_ci;                                                             # path must be present, otherwise this path is invalid for the card
9653a5a1b3Sopenharmony_ci; required-absent = ignore | switch | volume                  # If set, require this element to not be of this kind and not
9753a5a1b3Sopenharmony_ci;                                                             # available, otherwise don't consider this path valid for the card
9853a5a1b3Sopenharmony_ci;
9953a5a1b3Sopenharmony_ci; switch = ignore | mute | off | on | select # What to do with this switch: ignore it, make it follow mute status,
10053a5a1b3Sopenharmony_ci;                                            # always set it to off, always to on, or make it selectable as port.
10153a5a1b3Sopenharmony_ci;                                            # If set to 'select' you need to define an Option section for on
10253a5a1b3Sopenharmony_ci;                                            # and off
10353a5a1b3Sopenharmony_ci; volume = ignore | merge | off | zero | <volume step> # What to do with this volume: ignore it, merge it into the device
10453a5a1b3Sopenharmony_ci;                                                      # volume slider, always set it to the lowest value possible, or always
10553a5a1b3Sopenharmony_ci;                                                      # set it to 0 dB (for whatever that means), or always set it to
10653a5a1b3Sopenharmony_ci;                                                      # <volume step> (this only makes sense in path configurations where
10753a5a1b3Sopenharmony_ci;                                                      # the exact hardware and driver are known beforehand).
10853a5a1b3Sopenharmony_ci; volume-limit = <volume step>           # Limit the maximum volume by disabling the volume steps above <volume step>.
10953a5a1b3Sopenharmony_ci; enumeration = ignore | select          # What to do with this enumeration, ignore it or make it selectable
11053a5a1b3Sopenharmony_ci;                                        # via device ports. If set to 'select' you need to define an Option section
11153a5a1b3Sopenharmony_ci;                                        # for each of the items you want to expose
11253a5a1b3Sopenharmony_ci; direction = playback | capture         # Is this relevant only for playback or capture? If not set this will implicitly be
11353a5a1b3Sopenharmony_ci;                                        # set the direction of the PCM device is opened as. Generally this doesn't need to be set
11453a5a1b3Sopenharmony_ci;                                        # unless you have a broken driver that has playback controls marked for capture or vice
11553a5a1b3Sopenharmony_ci;                                        # versa
11653a5a1b3Sopenharmony_ci; direction-try-other = no | yes         # If the element does not supported what is requested, try the other direction, too?
11753a5a1b3Sopenharmony_ci;
11853a5a1b3Sopenharmony_ci; override-map.1 = ...                   # Override the channel mask of the mixer control if the control only exposes a single channel
11953a5a1b3Sopenharmony_ci; override-map.2 = ...                   # Override the channel masks of the mixer control if the control only exposes two channels
12053a5a1b3Sopenharmony_ci;                                        # Override maps should list for each element channel which high-level channels it controls via a
12153a5a1b3Sopenharmony_ci;                                        # channel mask. A channel mask may either be the name of a single channel, or the words "all-left",
12253a5a1b3Sopenharmony_ci;                                        # "all-right", "all-center", "all-front", "all-rear", and "all" to encode a specific subset of
12353a5a1b3Sopenharmony_ci;                                        # channels in a mask
12453a5a1b3Sopenharmony_ci; [Jack ...]                           # For each jack that we will use for jack detection
12553a5a1b3Sopenharmony_ci;                                      # The name 'Jack Foo' must match ALSA's 'Foo Jack' control.
12653a5a1b3Sopenharmony_ci; required = ignore | any              # If not set to ignore, make the path invalid if this jack control is not present.
12753a5a1b3Sopenharmony_ci; required-absent = ignore | any       # If not set to ignore, make the path invalid if this jack control is present.
12853a5a1b3Sopenharmony_ci; required-any = ignore | any          # If not set to ignore, make the path invalid if no jack controls and no elements with
12953a5a1b3Sopenharmony_ci;                                      # the required-any are present.
13053a5a1b3Sopenharmony_ci; state.plugged = yes | no | unknown   # Normally a plugged jack would mean the port becomes available, and an unplugged means it's
13153a5a1b3Sopenharmony_ci; state.unplugged = yes | no | unknown # unavailable, but the port status can be overridden by specifying state.plugged and/or state.unplugged.
13253a5a1b3Sopenharmony_ci; append-pcm-to-name = no | yes        # Add ",pcm=N" to the jack name? N is the hw PCM device index. HDMI jacks have
13353a5a1b3Sopenharmony_ci;                                      # the PCM device index in their name, but different drivers use different
13453a5a1b3Sopenharmony_ci;                                      # numbering schemes, so we can't hardcode the full jack name in our configuration
13553a5a1b3Sopenharmony_ci;                                      # files.
13653a5a1b3Sopenharmony_ci
13753a5a1b3Sopenharmony_ci[Element PCM]
13853a5a1b3Sopenharmony_ciswitch = mute
13953a5a1b3Sopenharmony_civolume = merge
14053a5a1b3Sopenharmony_cioverride-map.1 = all
14153a5a1b3Sopenharmony_cioverride-map.2 = all-left,all-right
14253a5a1b3Sopenharmony_ci
14353a5a1b3Sopenharmony_ci[Element External Amplifier]
14453a5a1b3Sopenharmony_ciswitch = select
14553a5a1b3Sopenharmony_ci
14653a5a1b3Sopenharmony_ci[Option External Amplifier:on]
14753a5a1b3Sopenharmony_ciname = output-amplifier-on
14853a5a1b3Sopenharmony_cipriority = 10
14953a5a1b3Sopenharmony_ci
15053a5a1b3Sopenharmony_ci[Option External Amplifier:off]
15153a5a1b3Sopenharmony_ciname = output-amplifier-off
15253a5a1b3Sopenharmony_cipriority = 0
15353a5a1b3Sopenharmony_ci
15453a5a1b3Sopenharmony_ci[Element Bass Boost]
15553a5a1b3Sopenharmony_ciswitch = select
15653a5a1b3Sopenharmony_ci
15753a5a1b3Sopenharmony_ci[Option Bass Boost:on]
15853a5a1b3Sopenharmony_ciname = output-bass-boost-on
15953a5a1b3Sopenharmony_cipriority = 0
16053a5a1b3Sopenharmony_ci
16153a5a1b3Sopenharmony_ci[Option Bass Boost:off]
16253a5a1b3Sopenharmony_ciname = output-bass-boost-off
16353a5a1b3Sopenharmony_cipriority = 10
16453a5a1b3Sopenharmony_ci
16553a5a1b3Sopenharmony_ci[Element IEC958]
16653a5a1b3Sopenharmony_ciswitch = off
16753a5a1b3Sopenharmony_ci
16853a5a1b3Sopenharmony_ci[Element IEC958 Optical Raw]
16953a5a1b3Sopenharmony_ciswitch = off
17053a5a1b3Sopenharmony_ci
17153a5a1b3Sopenharmony_ci;;; 'Analog Output'
17253a5a1b3Sopenharmony_ci
17353a5a1b3Sopenharmony_ci[Element Analog Output]
17453a5a1b3Sopenharmony_cienumeration = select
17553a5a1b3Sopenharmony_ci
17653a5a1b3Sopenharmony_ci[Option Analog Output:Speakers]
17753a5a1b3Sopenharmony_ciname = output-speaker
17853a5a1b3Sopenharmony_cipriority = 10
17953a5a1b3Sopenharmony_ci
18053a5a1b3Sopenharmony_ci[Option Analog Output:Headphones]
18153a5a1b3Sopenharmony_ciname = output-headphones
18253a5a1b3Sopenharmony_cipriority = 9
18353a5a1b3Sopenharmony_ci
18453a5a1b3Sopenharmony_ci[Option Analog Output:FP Headphones]
18553a5a1b3Sopenharmony_ciname = output-headphones
18653a5a1b3Sopenharmony_cipriority = 8
187