From 8a5f8f41f6524ff36c473712b073f18b08e6483d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Jun 2009 22:58:58 +0200 Subject: alsa: add profile set for Native Instruments 4 DJ --- .../alsa/mixer/profile-sets/78-pulseaudio.rules | 1 + .../profile-sets/native-instruments-audio4dj.conf | 89 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf (limited to 'src/modules/alsa/mixer/profile-sets') diff --git a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules index 92a6b034..e3a234f7 100644 --- a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules +++ b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules @@ -5,5 +5,6 @@ ACTION!="change", GOTO="pulseaudio_end" KERNEL!="card*", GOTO="pulseaudio_end" SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" LABEL="pulseaudio_end" diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf new file mode 100644 index 00000000..3b119a2c --- /dev/null +++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf @@ -0,0 +1,89 @@ +# 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. + +; Native Instruments Audio 4 DJ +; +; This card has two stereo pairs of input and two stereo pairs of +; output, named channels A and B. Channel B has an additional +; Headphone connector. +; +; We knowingly only define a subset of the theoretically possible +; mapping combinations as profiles here. + +[General] +auto-profiles = no + +[Mapping analog-stereo-a] +description = Analog Stereo Channel A +device-strings = hw:%f,0,0 +channel-map = left,right + +[Mapping analog-stereo-b-output] +description = Analog Stereo Channel B (Headphones) +device-strings = hw:%f,0,1 +channel-map = left,right +direction = output + +[Mapping analog-stereo-b-input] +description = Analog Stereo Channel B +device-strings = hw:%f,0,1 +channel-map = left,right +direction = input + +[Profile output:analog-stereo-all+input:analog-stereo-all] +description = Analog Stereo Duplex Channels A, B (Headphones) +output-mappings = analog-stereo-a analog-stereo-b-output +input-mappings = analog-stereo-a analog-stereo-b-input +priority = 100 +skip-probe = yes + +[Profile output:analog-stereo-a+input:analog-stereo-a] +description = Analog Stereo Duplex Channel A +output-mappings = analog-stereo-a +input-mappings = analog-stereo-a +priority = 40 +skip-probe = yes + +[Profile output:analog-stereo-b+input:analog-stereo-b] +description = Analog Stereo Duplex Channel B (Headphones) +output-mappings = analog-stereo-b-output +input-mappings = analog-stereo-b-input +priority = 50 +skip-probe = yes + +[Profile output:analog-stereo-a] +description = Analog Stereo Output Channel A +output-mappings = analog-stereo-a +priority = 5 +skip-probe = yes + +[Profile output:analog-stereo-b] +description = Analog Stereo Output Channel B (Headphones) +output-mappings = analog-stereo-b-output +priority = 6 +skip-probe = yes + +[Profile input:analog-stereo-a] +description = Analog Stereo Input Channel A +input-mappings = analog-stereo-a +priority = 2 +skip-probe = yes + +[Profile input:analog-stereo-b] +description = Analog Stereo Input Channel B +input-mappings = analog-stereo-b-input +priority = 1 +skip-probe = yes -- cgit From 0fd17c6cb9733e11f81a90d7a5799caaea7357d4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Jun 2009 23:00:53 +0200 Subject: alsa: document default profile set a bit better --- src/modules/alsa/mixer/profile-sets/default.conf | 56 +++++++++++++++++------- 1 file changed, 39 insertions(+), 17 deletions(-) (limited to 'src/modules/alsa/mixer/profile-sets') diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf index bbe53410..ebd4ff45 100644 --- a/src/modules/alsa/mixer/profile-sets/default.conf +++ b/src/modules/alsa/mixer/profile-sets/default.conf @@ -1,22 +1,43 @@ -# Profile definitions for PulseAudio's ALSA backend +# This file is part of PulseAudio. # -# [Mapping id] -# device-strings = ... -# channel-map = ... -# description = ... -# paths-input = ... -# paths-output = ... -# element-input = ... -# element-output = ... -# priority = ... -# direction = any | input | output +# 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. # -# [Profile id] -# input-mappings = ... -# output-mappings = ... -# description = ... -# priority = ... -# skip-probe = no | yes +# 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) +; +; [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? [General] auto-profiles = yes @@ -99,6 +120,7 @@ channel-map = left,right priority = 4 direction = output +; 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 -- cgit From 11d2a7ee21852d836001e960ffe036f5eda6365b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 18 Jun 2009 23:03:28 +0200 Subject: alsa: move udev rules file behind the other sound related rules --- src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules | 10 ---------- src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules create mode 100644 src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules (limited to 'src/modules/alsa/mixer/profile-sets') diff --git a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules deleted file mode 100644 index e3a234f7..00000000 --- a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules +++ /dev/null @@ -1,10 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM!="sound", GOTO="pulseaudio_end" -ACTION!="change", GOTO="pulseaudio_end" -KERNEL!="card*", GOTO="pulseaudio_end" - -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" -SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" - -LABEL="pulseaudio_end" diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules new file mode 100644 index 00000000..e3a234f7 --- /dev/null +++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules @@ -0,0 +1,10 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="sound", GOTO="pulseaudio_end" +ACTION!="change", GOTO="pulseaudio_end" +KERNEL!="card*", GOTO="pulseaudio_end" + +SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" + +LABEL="pulseaudio_end" -- cgit From b70b5edcfc95b5cb258caacc21ffbe255d70ece6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jun 2009 01:30:24 +0200 Subject: alsa: add copyright blobs and comments to all mixer paths/profile sets --- src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules | 16 ++++++++++++++++ src/modules/alsa/mixer/profile-sets/default.conf | 15 ++++++++++----- .../mixer/profile-sets/native-instruments-audio4dj.conf | 2 ++ .../mixer/profile-sets/native-instruments-audio8dj.conf | 2 ++ 4 files changed, 30 insertions(+), 5 deletions(-) (limited to 'src/modules/alsa/mixer/profile-sets') diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules index e3a234f7..ea1a2fed 100644 --- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules +++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules @@ -1,5 +1,21 @@ # do not edit this file, it will be overwritten on update +# 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. + SUBSYSTEM!="sound", GOTO="pulseaudio_end" ACTION!="change", GOTO="pulseaudio_end" KERNEL!="card*", GOTO="pulseaudio_end" diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf index ebd4ff45..6ae11b47 100644 --- a/src/modules/alsa/mixer/profile-sets/default.conf +++ b/src/modules/alsa/mixer/profile-sets/default.conf @@ -19,22 +19,27 @@ ; assigned. (and should be good enough for the vast majority of cards) ; ; [General] -; auto-profiles = no | yes # Instead of defining all profiles manually, autogenerate them by combining every input mapping with every output mapping. +; 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-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-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 +; 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? diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf index 3b119a2c..2b835308 100644 --- a/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf +++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf @@ -22,6 +22,8 @@ ; ; We knowingly only define a subset of the theoretically possible ; mapping combinations as profiles here. +; +; See default.conf for an explanation on the directives used here. [General] auto-profiles = no diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf index fe1e9ae8..3fe3cc56 100644 --- a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf +++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf @@ -22,6 +22,8 @@ ; ; We knowingly only define a subset of the theoretically possible ; mapping combinations as profiles here. +; +; See default.conf for an explanation on the directives used here. [General] auto-profiles = no -- cgit From b1ea7c0d89a9516f89a7eed5d7a2f121d639b10a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jun 2009 01:55:59 +0200 Subject: alsa: document alsa mixer path/profile sets a bit more --- src/modules/alsa/mixer/profile-sets/default.conf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/modules/alsa/mixer/profile-sets') diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf index 6ae11b47..ac41a8d3 100644 --- a/src/modules/alsa/mixer/profile-sets/default.conf +++ b/src/modules/alsa/mixer/profile-sets/default.conf @@ -16,8 +16,18 @@ ; 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) -; +; assigned. (and should be good enough for the vast majority of +; cards). Use the udev property PULSE_PROFILE_SET to assign a +; different profile set than this one to a device. 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. + ; [General] ; auto-profiles = no | yes # Instead of defining all profiles manually, autogenerate ; # them by combining every input mapping with every output mapping. @@ -42,7 +52,9 @@ ; # defined in this file too ; description = ... ; priority = ... # Numeric value to deduce priority for this profile -; skip-probe = no | yes # Skip probing for availability? +; 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. [General] auto-profiles = yes -- cgit