User avatar
flatmax
Posts: 346
Joined: Thu May 26, 2016 10:36 pm

Pulse audio and surround

Fri Jun 02, 2017 10:05 am

Hi there,

Was wondering whether there are any pulse audio experts here ?

We have a surround sound card which registers find with Raspbian. Problems is that whilst you can see it in ALSA we can't see it in Pulse ...

Does any one know of how to setup a surround sound card with pulse ?

thanks
Matt
Discuss hearing, acoustics, audio injector products, - https://lists.audioinjector.net/mailman/listinfo/people
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Pulse audio and surround

Sat Jun 03, 2017 10:13 pm

I posted some of this in your forum.

PulseAudio 5.0 in Raspbian Jessie doesn't automatically detect the card, module-udev-detect fails. It seems that this is due to the more limited default ALSA profile-sets in PulseAudio 5.0. Apparently the Octo doesn't match any of the profiles. It seems it can be manually configured in default.pa or system.pa for PulseAudio 5.0.

Here's PulseAudio 5.0 - /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf

Code: Select all

# 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

[Mapping analog-mono]
device-strings = hw:%f
channel-map = mono
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
priority = 1

[Mapping analog-stereo]
device-strings = front:%f hw:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 10

[Mapping analog-surround-40]
device-strings = surround40:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output

[Mapping analog-surround-41]
device-strings = surround41:%f
channel-map = front-left,front-right,rear-left,rear-right,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output

[Mapping analog-surround-50]
device-strings = surround50:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output

[Mapping analog-surround-51]
device-strings = surround51:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 8
direction = output

[Mapping analog-surround-71]
device-strings = surround71:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
description = Analog Surround 7.1
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output

[Mapping analog-4-channel-input]
# Alsa doesn't currently provide any better device name than "hw" for 4-channel
# input. If this causes trouble at some point, then we will need to get a new
# device name standardized in alsa.
device-strings = hw:%f
channel-map = aux0,aux1,aux2,aux3
priority = 1
direction = input

[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-input = iec958-stereo-input
paths-output = iec958-stereo-output
priority = 5

[Mapping iec958-ac3-surround-40]
device-strings = a52:%f
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
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
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = iec958-stereo-output
priority = 3
direction = output

[Mapping hdmi-stereo]
device-strings = hdmi:%f
channel-map = left,right
priority = 4
direction = output
paths-output = hdmi-output-0

; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
#output-mappings = analog-stereo iec958-stereo
#input-mappings = analog-stereo
Here's PulseAudio 10.0 - /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf

Code: Select all

# 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, see <http://www.gnu.org/licenses/>.

; 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?
;
; exact-channels = yes | no                 # If no, and the exact number of channels is not supported,
;                                           # allow device to be opened with another channel count
; fallback = no | yes                       # This mapping will only be considered if all non-fallback mappings fail
; [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.
;
; fallback = no | yes                       # This profile will only be considered if all non-fallback profiles fail
; [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

[Mapping analog-mono]
device-strings = hw:%f
channel-map = mono
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
priority = 2

[Mapping analog-stereo]
device-strings = front:%f hw:%f
channel-map = left,right
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic
priority = 10

[Mapping analog-surround-21]
device-strings = surround21:%f
channel-map = front-left,front-right,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 8
direction = output

[Mapping analog-surround-40]
device-strings = surround40:%f
channel-map = front-left,front-right,rear-left,rear-right
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 7
direction = output

[Mapping analog-surround-41]
device-strings = surround41:%f
channel-map = front-left,front-right,rear-left,rear-right,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 8
direction = output

[Mapping analog-surround-50]
device-strings = surround50:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 7
direction = output

[Mapping analog-surround-51]
device-strings = surround51:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 8
direction = output

[Mapping analog-surround-71]
device-strings = surround71:%f
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
description = Analog Surround 7.1
paths-output = analog-output analog-output-lineout analog-output-speaker
priority = 7
direction = output

[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-input = iec958-stereo-input
paths-output = iec958-stereo-output
priority = 5

[Mapping iec958-ac3-surround-40]
device-strings = a52:%f
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
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
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
paths-output = iec958-stereo-output
priority = 3
direction = output

[Mapping hdmi-stereo]
description = Digital Stereo (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = left,right
priority = 4
direction = output

[Mapping hdmi-surround]
description = Digital Surround 5.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output

[Mapping hdmi-surround71]
description = Digital Surround 7.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 3
direction = output

[Mapping hdmi-dts-surround]
description = Digital Surround 5.1 (HDMI/DTS)
device-strings = dcahdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra1]
description = Digital Stereo (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra1]
description = Digital Surround 5.1 (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra1]
description = Digital Surround 7.1 (HDMI 2)
device-strings = hdmi:%f,1
paths-output = hdmi-output-1
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra1]
description = Digital Surround 5.1 (HDMI 2/DTS)
device-strings = dcahdmi:%f,1
paths-output = hdmi-output-1
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra2]
description = Digital Stereo (HDMI 3)
device-strings = hdmi:%f,2
paths-output = hdmi-output-2
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra2]
description = Digital Surround 5.1 (HDMI 3)
device-strings = hdmi:%f,2
paths-output = hdmi-output-2
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra2]
description = Digital Surround 7.1 (HDMI 3)
device-strings = hdmi:%f,2
paths-output = hdmi-output-2
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra2]
description = Digital Surround 5.1 (HDMI 3/DTS)
device-strings = dcahdmi:%f,2
paths-output = hdmi-output-2
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra3]
description = Digital Stereo (HDMI 4)
device-strings = hdmi:%f,3
paths-output = hdmi-output-3
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra3]
description = Digital Surround 5.1 (HDMI 4)
device-strings = hdmi:%f,3
paths-output = hdmi-output-3
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra3]
description = Digital Surround 7.1 (HDMI 4)
device-strings = hdmi:%f,3
paths-output = hdmi-output-3
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra3]
description = Digital Surround 5.1 (HDMI 4/DTS)
device-strings = dcahdmi:%f,3
paths-output = hdmi-output-3
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra4]
description = Digital Stereo (HDMI 5)
device-strings = hdmi:%f,4
paths-output = hdmi-output-4
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra4]
description = Digital Surround 5.1 (HDMI 5)
device-strings = hdmi:%f,4
paths-output = hdmi-output-4
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra4]
description = Digital Surround 7.1 (HDMI 5)
device-strings = hdmi:%f,4
paths-output = hdmi-output-4
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra4]
description = Digital Surround 5.1 (HDMI 5/DTS)
device-strings = dcahdmi:%f,4
paths-output = hdmi-output-4
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra5]
description = Digital Stereo (HDMI 6)
device-strings = hdmi:%f,5
paths-output = hdmi-output-5
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra5]
description = Digital Surround 5.1 (HDMI 6)
device-strings = hdmi:%f,5
paths-output = hdmi-output-5
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra5]
description = Digital Surround 7.1 (HDMI 6)
device-strings = hdmi:%f,5
paths-output = hdmi-output-5
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra5]
description = Digital Surround 5.1 (HDMI 6/DTS)
device-strings = dcahdmi:%f,5
paths-output = hdmi-output-5
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra6]
description = Digital Stereo (HDMI 7)
device-strings = hdmi:%f,6
paths-output = hdmi-output-6
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra6]
description = Digital Surround 5.1 (HDMI 7)
device-strings = hdmi:%f,6
paths-output = hdmi-output-6
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra6]
description = Digital Surround 7.1 (HDMI 7)
device-strings = hdmi:%f,6
paths-output = hdmi-output-6
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra6]
description = Digital Surround 5.1 (HDMI 7/DTS)
device-strings = dcahdmi:%f,6
paths-output = hdmi-output-6
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-stereo-extra7]
description = Digital Stereo (HDMI 8)
device-strings = hdmi:%f,7
paths-output = hdmi-output-7
channel-map = left,right
priority = 2
direction = output

[Mapping hdmi-surround-extra7]
description = Digital Surround 5.1 (HDMI 8)
device-strings = hdmi:%f,7
paths-output = hdmi-output-7
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping hdmi-surround71-extra7]
description = Digital Surround 7.1 (HDMI 8)
device-strings = hdmi:%f,7
paths-output = hdmi-output-7
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 1
direction = output

[Mapping hdmi-dts-surround-extra7]
description = Digital Surround 5.1 (HDMI 8/DTS)
device-strings = dcahdmi:%f,7
paths-output = hdmi-output-7
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 1
direction = output

[Mapping multichannel-output]
device-strings = hw:%f
channel-map = left,right,rear-left,rear-right
exact-channels = false
fallback = yes
priority = 1
direction = output
paths-output = multichannel-output

[Mapping multichannel-input]
device-strings = hw:%f
channel-map = left,right,rear-left,rear-right
exact-channels = false
fallback = yes
priority = 1
direction = input
paths-input = multichannel-input

; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
#output-mappings = analog-stereo iec958-stereo
#input-mappings = analog-stereo
I've been using PulseAudio 10.0 from Raspbian Stretch on both Stretch and Jessie where the AudioInjector Octo is recognized as multichannel-output and multichannel-input. The multichannel-output and multichannel-input profiles do not exist in PulseAudio 5.0.

Code: Select all

[Mapping multichannel-output]
device-strings = hw:%f
channel-map = left,right,rear-left,rear-right
exact-channels = false
fallback = yes
priority = 1
direction = output
paths-output = multichannel-output

[Mapping multichannel-input]
device-strings = hw:%f
channel-map = left,right,rear-left,rear-right
exact-channels = false
fallback = yes
priority = 1
direction = input
paths-input = multichannel-input
To get the Octo working with PulseAudio 5.0 from Raspbian Jessie (in non system mode) apparently requires two things.

1. Manually specifying the device in /etc/pulse/default.pa using module-alsa-sink and module-alsa-source:

Code: Select all

load-module module-alsa-sink device=hw:0
load-module module-alsa-source device=hw:0
Being more specific seems to work fine too, but doesn't seem to really make any difference.

Code: Select all

load-module module-alsa-sink device=hw:0 sink_name=multichannel-output channels=8 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
load-module module-alsa-source device=hw:0 source_name=multichannel-input channels=6 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe
set-default-sink multichannel-output
set-default-source multichannel-input

2. Modifying /etc/xdg/autostart/pulseaudio.desktop to add a delay before running start-pulseaudio-x11. It should also be possible to start pulseaudio from an LXSession autostart file (@pulseaudio --start) or using a systemd user-service unit file (as is used in Raspbian Stretch). I don't know why the extra delay seems to be required before running /usr/bin/start-pulseaudio-x11.

/etc/xdg/autostart/pulseaudio.desktop

Code: Select all

[Desktop Entry]
Version=1.0
Name=PulseAudio Sound System
Name[as]=PulseAudio শব্দ ব্যৱস্থা
Name[bn_IN]=PulseAudio শব্দ ব্যবস্থা
Name[ca]=Sistema de so PulseAudio
Name[cs]=Zvukový systém PulseAudio
Name[de]=PulseAudio Sound System
Name[de_CH]=PulseAudio Sound System
Name[es]=Sistema de Sonido PulseAudio
Name[fi]=PulseAudio-äänijärjestelmä
Name[fr]=Système de son PulseAudio
Name[gu]=PulseAudio સાઉન્ડ સિસ્ટમ
Name[he]=מערכת הקול PulseAudio
Name[hi]=पल्सऑडियो ध्वनि तंत्र
Name[hu]=PulseAudio hangrendszer
Name[id]=Sistem Suara PulseAudio
Name[it]=Sistema sonoro PulseAudio
Name[ja]=PulseAudio サウンドシステム
Name[kn]=PulseAudio ಧ್ವನಿ ವ್ಯವಸ್ಥೆ
Name[ml]=PulseAudio സൌണ്ട് സിസ്റ്റം
Name[mr]=PulseAudio आवाज प्रणाली
Name[nl]=PulseAudio geluidssysteem
Name[or]=PulseAudio ଧ୍ୱନି ତନ୍ତ୍ର
Name[pa]=ਪਲਸਆਡੀਓ ਸਾਊਂਡ ਸਿਸਟਮ
Name[pl]=System dźwięku PulseAudio
Name[pt]=Sistema de Som PulseAudio
Name[pt_BR]=Sistema de som PulseAudio
Name[ru]=Звуковая система PulseAudio
Name[sr]=PulseAudio звучни систем
Name[sr@latin]=PulseAudio zvučni sistem
Name[ta]=பள்ஸ் ஆடியோ ஒலி கணினி
Name[te]=PulseAudio శబ్దపు సిస్టమ్
Name[uk]=Звукова система PulseAudio
Name[zh_CN]=PulseAudio 声音系统
Name[zh_TW]=PulseAudio 音效系統
Comment=Start the PulseAudio Sound System
Comment[as]=PulseAudio শব্দ ব্যৱস্থা আৰম্ভ কৰা হ'ব
Comment[bn_IN]=PulseAudio শব্দ ব্যবস্থা আরম্ভ করা হবে
Comment[ca]=Inicialitza el sistema de so PulseAudio
Comment[cs]=Spustit zvukový systém PulseAudio
Comment[de]=Das PulseAudio Sound System starten
Comment[de_CH]=Das PulseAudio Sound System starten
Comment[es]=Iniciar el Sistema de Sonido PulseAudio
Comment[fi]=Käynnistä PulseAudio-äänijärjestelmä
Comment[fr]=Démarrer le système de son PulseAudio
Comment[gu]=PulseAudio સાઉન્ડ સિસ્ટમને શરૂ કરો
Comment[he]=התחל את מערכת הקול PulseAudio
Comment[hi]=पल्सऑडियो ध्वनि तंत्र प्रारंभ करें
Comment[hu]=A PulseAudio hangrendszer elindítása
Comment[id]=Memulai Sistem Suara PulseAudio
Comment[it]=Avvia il sistema sonoro PulseAudio
Comment[ja]=PulseAudio サウンドシステムを開始
Comment[kn]=PulseAudio ಧ್ವನಿ ವ್ಯವಸ್ಥೆಯನ್ನು ಆರಂಭಿಸಿ
Comment[ml]=PulseAudio സൌണ്ട് സിസ്റ്റം ആരംഭിക്കുക
Comment[mr]=PulseAudio आवाज प्रणाली सुरू करा
Comment[nl]=Start het PulseAudio geluidssysteem
Comment[or]=PulseAudio ଧ୍ୱନି ତନ୍ତ୍ରକୁ ଆରମ୍ଭ କରନ୍ତୁ
Comment[pa]=ਪਲਸਆਡੀਓ ਸਾਊਂਡ ਸਿਸਟਮ ਚਲਾਓ
Comment[pl]=Uruchomienie systemu dźwięku PulseAudio
Comment[pt]=Inciar o Sistema de Som PulseAudio
Comment[pt_BR]=Iniciar o sistema de som PulseAudio
Comment[ru]=Запуск звуковой системы PulseAudio
Comment[sr]=Покрени PulseAudio звучни систем
Comment[sr@latin]=Pokreni PulseAudio zvučni sistem
Comment[ta]=பள்ஸ் ஆடியோ ஒலி கணினியை துவக்கவும
Comment[te]=PulseAudio శబ్దపు సిస్టమ్‌ను ప్రారంభించుము
Comment[uk]=Запустити звукову систему PulseAudio
Comment[zh_CN]=启动 PulseAudio 声音系统
Comment[zh_TW]=啟動 PulseAudio 音效系統
Exec=/bin/sh -c "sleep 5; start-pulseaudio-x11"
Terminal=false
Type=Application
Categories=
GenericName=
X-GNOME-Autostart-Phase=Initialization
NotShowIn=KDE;
PulseAudio 5.0 will still produce a bunch of errors:

Code: Select all

Jun 03 19:41:06 raspberrypi rtkit-daemon[1213]: Successfully made thread 1212 of process 1212 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
Jun 03 19:41:06 raspberrypi pulseaudio[1212]: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:41:11 raspberrypi pulseaudio[1212]: Tried to configure /devices/platform/soc/soc:sound/sound/card0 (alsa_card.platform-soc_sound) more often than 5 times in 10s
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to find a working profile.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-soc_sound" card_name="alsa_card.platform-soc_sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1""): initialization failed.
Jun 03 19:42:06 raspberrypi pulseaudio[1212]: Tried to configure /devices/platform/soc/soc:sound/sound/card0 (alsa_card.platform-soc_sound) more often than 5 times in 10s
Those can be silenced by commenting out the section for module-udev-detect and module-detect in /etc/pulse/default.pa:

Code: Select all

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif

User avatar
flatmax
Posts: 346
Joined: Thu May 26, 2016 10:36 pm

Re: Pulse audio and surround

Sun Jun 04, 2017 12:51 pm

Thanks KTB - you're a legend !

Matt
Discuss hearing, acoustics, audio injector products, - https://lists.audioinjector.net/mailman/listinfo/people
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

Return to “Graphics, sound and multimedia”