Skip to content

Instantly share code, notes, and snippets.

@CommanderAlchemy
Last active December 22, 2015 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CommanderAlchemy/6411609 to your computer and use it in GitHub Desktop.
Save CommanderAlchemy/6411609 to your computer and use it in GitHub Desktop.
Pulseaudio Asus Xonar Essence STX This uses default configuration that is somewat flawed that it does not detect that the card can use S/PDIF when Analog is enabled. Profile addition in the end ads S/PDIF + Analog Duplex functionality. In other words can output different streams to two different sinks with pulse. Will probably config this more s…
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
; Default profile definitions for the ALSA backend of PulseAudio. This
; is used as fallback for all cards that have no special mapping
; assigned (and should be good enough for the vast majority of
; cards). If you want to assign a different profile set than this one
; to a device, either set the udev property PULSE_PROFILE_SET for the
; card, or use the "profile_set" module argument when loading
; module-alsa-card.
;
; So what is this about? Simply, what we do here is map ALSA devices
; to how they are exposed in PA. We say which ALSA device string to
; use to open a device, which channel mapping to use then, and which
; mixer path to use. This is encoded in a 'mapping'. Multiple of these
; mappings can be bound together in a 'profile' which is then directly
; exposed in the UI as a card profile. Each mapping assigned to a
; profile will result in one sink/source to be created if the profile
; is selected for the card.
;
; Additionally, the path set configuration files can describe the
; decibel values assigned to the steps of the volume elements. This
; can be used to work around situations when the alsa driver doesn't
; provide any decibel information, or when the information is
; incorrect.
; [General]
; auto-profiles = no | yes # Instead of defining all profiles manually, autogenerate
; # them by combining every input mapping with every output mapping.
;
; [Mapping id]
; device-strings = ... # ALSA device string. %f will be replaced by the card identifier.
; channel-map = ... # Channel mapping to use for this device
; description = ...
; paths-input = ... # A list of mixer paths to use. Every path in this list will be probed.
; # If multiple are found to be working they will be available as device ports
; paths-output = ...
; element-input = ... # Instead of configuring a full mixer path simply configure a single
; # mixer element for volume/mute handling
; element-output = ...
; priority = ...
; direction = any | input | output # Only useful for?
;
; [Profile id]
; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be
; # defined in this file too
; output-mappings = ... # Lists mappings for sinks on this profile, those mappings must be
; # defined in this file too
; description = ...
; priority = ... # Numeric value to deduce priority for this profile
; skip-probe = no | yes # Skip probing for availability? If this is yes then this profile
; # will be assumed as working without probing. Makes initialization
; # a bit faster but only works if the card is really known well.
;
; [DecibelFix element] # Decibel fixes can be used to work around missing or incorrect dB
; # information from alsa. A decibel fix is a table that maps volume steps
; # to decibel values for one volume element. The "element" part in the
; # section title is the name of the volume element.
; #
; # NOTE: This feature is meant just as a help for figuring out the correct
; # decibel values. PulseAudio is not the correct place to maintain the
; # decibel mappings!
; #
; # If you need this feature, then you should make sure that when you have
; # the correct values figured out, the alsa driver developers get informed
; # too, so that they can fix the driver.
;
; db-values = ... # The option value consists of pairs of step numbers and decibel values.
; # The pairs are separated with whitespace, and steps are separated from
; # the corresponding decibel values with a colon. The values must be in an
; # increasing order. Here's an example of a valid string:
; #
; # "0:-40.50 1:-38.70 3:-33.00 11:0"
; #
; # The lowest step imposes a lower limit for hardware volume and the
; # highest step correspondingly imposes a higher limit. That means that
; # that the mixer will never be set outside those values - the rest of the
; # volume scale is done using software volume.
; #
; # As can be seen in the example, you don't need to specify a dB value for
; # each step. The dB values for skipped steps will be linearly interpolated
; # using the nearest steps that are given.
[General]
auto-profiles = yes
; ### Mappings ###
[Mapping analog-mono]
device-strings = hw:%f
channel-map = mono
paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-mic analog-input-linein
priority = 1
[Mapping analog-stereo]
device-strings = front:%f hw:%f
channel-map = left,right
paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input analog-input-mic analog-input-linein
priority = 10
[Mapping iec958-stereo]
device-strings = hw:%f,1,0
channel-map = left,right
paths-input =
paths-output = iec958-stereo-output
priority = 5
[Mapping iec958-ac3-surround-40]
device-strings = a52:%f,1,0
channel-map = front-left,front-right,rear-left,rear-right
paths-output = iec958-stereo-output
priority = 2
direction = output
[Mapping iec958-ac3-surround-51]
device-strings = a52:%f hw:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = iec958-stereo-output
priority = 3
direction = output
[Mapping iec958-dts-surround-51]
device-strings = dca:%f,1,0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = iec958-stereo-output
priority = 3
direction = output
; ### Profiles ###
[Profile analog-stereo+iec958-stereo]
description = Analog Stereo Duplex + Digital Stereo Output (PCM)
input-mappings = analog-stereo
output-mappings = analog-stereo iec958-stereo
skip-probe = yes
[Profile analog-stereo+iec958-ac3-surround-51]
description = Analog Stereo Duplex + Digital Stereo Output (Dolby 5.1)
input-mappings = analog-stereo
output-mappings = analog-stereo iec958-ac3-surround-51
skip-probe = yes
@CommanderAlchemy
Copy link
Author

First change would be to remove the unsupported listings.

  • Asus Xonar Essence STX is only stereo
    • remove all analog surround mappings
      [DONE]
  • This card does not have any digital inputs, however are auto profiled for that
    • remove iec958-stereo-input?
      [DONE]
  • Mapping cleanup
    • Remove the unused mappings this card does not have
      [Partial]
  • Profile cleanup
    • Remove unused profiles by setting auto-profiles = no and adding those manually
      [Partial]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment