[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-233-gca560cc

Lennart Poettering gitmailer-noreply at 0pointer.de
Wed Jun 17 18:58:03 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  4951e08031a74864b889ecdaaa3bcaa3a1f0ceb7 (commit)

- Log -----------------------------------------------------------------
ca560cc alsa: add profile set for Native Instruments Audio 8 DJ sound card
60df970 alsa: properly count mappings of manually defined profiles
b5cea8d alsa: fix duplicate mapping detection
34b4888 alsa: when creating alsa sinks/sources include mapping name in device name to allow profiles mit multiple sinks or multiple sources
8d3362c device-restore: properly check save_muted flag when storing muted state
39b37a2 core: be a bit more verbose when registering a sink/source fails
-----------------------------------------------------------------------

Summary of changes:
 src/Makefile.am                                    |    9 +-
 src/modules/alsa/alsa-mixer.c                      |   10 +-
 src/modules/alsa/alsa-sink.c                       |   10 +-
 src/modules/alsa/alsa-source.c                     |   10 +-
 .../alsa/mixer/profile-sets/78-pulseaudio.rules    |    9 +
 .../profile-sets/native-instruments-audio8dj.conf  |  160 ++++++++++++++++++++
 src/modules/module-device-restore.c                |    2 +-
 src/pulsecore/sink.c                               |    1 +
 src/pulsecore/source.c                             |    1 +
 9 files changed, 202 insertions(+), 10 deletions(-)
 create mode 100644 src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules
 create mode 100644 src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf

-----------------------------------------------------------------------

commit 39b37a2bac34df671a3ff5a5d4ea8b4003f09fc9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:40:47 2009 +0200

    core: be a bit more verbose when registering a sink/source fails

diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 4779229..7e4513e 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -181,6 +181,7 @@ pa_sink* pa_sink_new(
     s = pa_msgobject_new(pa_sink);
 
     if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_SINK, s, data->namereg_fail))) {
+        pa_log_debug("Failed to register name %s.", data->name);
         pa_xfree(s);
         return NULL;
     }
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 1e43116..74f38bc 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -149,6 +149,7 @@ pa_source* pa_source_new(
     s = pa_msgobject_new(pa_source);
 
     if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_SOURCE, s, data->namereg_fail))) {
+        pa_log_debug("Failed to register name %s.", data->name);
         pa_xfree(s);
         return NULL;
     }

commit 8d3362cec6263301ec5a8b40cc0ef333ca721c30
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:41:49 2009 +0200

    device-restore: properly check save_muted flag when storing muted state

diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c
index 5fa6f06..a2745b8 100644
--- a/src/modules/module-device-restore.c
+++ b/src/modules/module-device-restore.c
@@ -226,7 +226,7 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3
             entry.volume_valid = TRUE;
         }
 
-        if (sink->save_volume) {
+        if (sink->save_muted) {
             entry.muted = pa_sink_get_mute(sink, FALSE);
             entry.muted_valid = TRUE;
         }

commit 34b48887ef74d7ec4d54282d4364ec2ee34e8234
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:42:39 2009 +0200

    alsa: when creating alsa sinks/sources include mapping name in device name to allow profiles mit multiple sinks or multiple sources

diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 2226bc6..34ff658 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1335,7 +1335,7 @@ finish:
     pa_log_debug("Thread shutting down");
 }
 
-static void set_sink_name(pa_sink_new_data *data, pa_modargs *ma, const char *device_id, const char *device_name) {
+static void set_sink_name(pa_sink_new_data *data, pa_modargs *ma, const char *device_id, const char *device_name, pa_alsa_mapping *mapping) {
     const char *n;
     char *t;
 
@@ -1356,7 +1356,11 @@ static void set_sink_name(pa_sink_new_data *data, pa_modargs *ma, const char *de
         data->namereg_fail = FALSE;
     }
 
-    t = pa_sprintf_malloc("alsa_output.%s", n);
+    if (mapping)
+        t = pa_sprintf_malloc("alsa_output.%s.%s", n, mapping->name);
+    else
+        t = pa_sprintf_malloc("alsa_output.%s", n);
+
     pa_sink_new_data_set_name(data, t);
     pa_xfree(t);
 }
@@ -1679,7 +1683,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
     data.driver = driver;
     data.module = m;
     data.card = card;
-    set_sink_name(&data, ma, dev_id, u->device_name);
+    set_sink_name(&data, ma, dev_id, u->device_name, mapping);
     pa_sink_new_data_set_sample_spec(&data, &ss);
     pa_sink_new_data_set_channel_map(&data, &map);
 
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index f2e4e23..c8244c6 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -1187,7 +1187,7 @@ finish:
     pa_log_debug("Thread shutting down");
 }
 
-static void set_source_name(pa_source_new_data *data, pa_modargs *ma, const char *device_id, const char *device_name) {
+static void set_source_name(pa_source_new_data *data, pa_modargs *ma, const char *device_id, const char *device_name, pa_alsa_mapping *mapping) {
     const char *n;
     char *t;
 
@@ -1208,7 +1208,11 @@ static void set_source_name(pa_source_new_data *data, pa_modargs *ma, const char
         data->namereg_fail = FALSE;
     }
 
-    t = pa_sprintf_malloc("alsa_input.%s", n);
+    if (mapping)
+        t = pa_sprintf_malloc("alsa_input.%s.%s", n, mapping->name);
+    else
+        t = pa_sprintf_malloc("alsa_input.%s", n);
+
     pa_source_new_data_set_name(data, t);
     pa_xfree(t);
 }
@@ -1528,7 +1532,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
     data.driver = driver;
     data.module = m;
     data.card = card;
-    set_source_name(&data, ma, dev_id, u->device_name);
+    set_source_name(&data, ma, dev_id, u->device_name, mapping);
     pa_source_new_data_set_sample_spec(&data, &ss);
     pa_source_new_data_set_channel_map(&data, &map);
 

commit b5cea8d5907a5af2072acfd4570fae3c99714502
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:43:22 2009 +0200

    alsa: fix duplicate mapping detection

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 6f21e10..c5db303 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2930,7 +2930,7 @@ static int profile_verify(pa_alsa_profile *p) {
             char **in;
             pa_bool_t duplicate = FALSE;
 
-            for (in = p->output_mapping_names; *in; in++)
+            for (in = name + 1; *in; in++)
                 if (pa_streq(*name, *in)) {
                     duplicate = TRUE;
                     break;
@@ -2963,7 +2963,7 @@ static int profile_verify(pa_alsa_profile *p) {
             char **in;
             pa_bool_t duplicate = FALSE;
 
-            for (in = p->input_mapping_names; *in; in++)
+            for (in = name + 1; *in; in++)
                 if (pa_streq(*name, *in)) {
                     duplicate = TRUE;
                     break;

commit 60df970bd9a17f4e7d2a09f5e20120be1beff2ab
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:43:51 2009 +0200

    alsa: properly count mappings of manually defined profiles

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index c5db303..def2622 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2945,6 +2945,9 @@ static int profile_verify(pa_alsa_profile *p) {
             }
 
             pa_idxset_put(p->output_mappings, m, NULL);
+
+            if (p->supported)
+                m->supported++;
         }
 
         pa_xstrfreev(p->output_mapping_names);
@@ -2978,6 +2981,9 @@ static int profile_verify(pa_alsa_profile *p) {
             }
 
             pa_idxset_put(p->input_mappings, m, NULL);
+
+            if (p->supported)
+                m->supported++;
         }
 
         pa_xstrfreev(p->input_mapping_names);

commit ca560ccc4a562c7a2a477331b72e7c62adf21a95
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Jun 18 03:58:05 2009 +0200

    alsa: add profile set for Native Instruments Audio 8 DJ sound card

diff --git a/src/Makefile.am b/src/Makefile.am
index 40b5675..f3099e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,6 +31,7 @@ pulselibexecdir=$(libexecdir)/pulse
 xdgautostartdir=$(sysconfdir)/xdg/autostart
 alsaprofilesetsdir=$(datadir)/alsa-mixer/profile-sets
 alsapathsdir=$(datadir)/alsa-mixer/paths
+udevrulesdir=/lib/udev/rules.d
 
 ###################################
 #            Defines              #
@@ -115,6 +116,8 @@ EXTRA_DIST = \
 		map-file \
 		daemon/org.pulseaudio.policy.in \
 		modules/alsa/mixer/profile-sets/default.conf \
+		modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf \
+		modules/alsa/mixer/profile-sets/78-pulseaudio.rules \
 		modules/alsa/mixer/paths/analog-input-aux.conf \
 		modules/alsa/mixer/paths/analog-input.conf \
 		modules/alsa/mixer/paths/analog-input.conf.common \
@@ -1045,7 +1048,11 @@ modlibexec_LTLIBRARIES += \
 		module-alsa-card.la
 
 alsaprofilesets_DATA = \
-		modules/alsa/mixer/profile-sets/default.conf
+		modules/alsa/mixer/profile-sets/default.conf \
+		modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
+
+udevrules_DATA = \
+		modules/alsa/mixer/profile-sets/78-pulseaudio.rules
 
 alsapaths_DATA = \
 		modules/alsa/mixer/paths/analog-input-aux.conf \
diff --git a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules
new file mode 100644
index 0000000..92a6b03
--- /dev/null
+++ b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules
@@ -0,0 +1,9 @@
+# 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"
+
+LABEL="pulseaudio_end"
diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
new file mode 100644
index 0000000..fe1e9ae
--- /dev/null
+++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
@@ -0,0 +1,160 @@
+# 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 8 DJ
+;
+; This card has four stereo pairs of input and four stereo pairs of
+; output, named channels A to D. Channel C has an additional Mic/Line
+; connector, channel D 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]
+description = Analog Stereo Channel B
+device-strings = hw:%f,0,1
+channel-map = left,right
+
+# Since we want to set a different description for channel C's/D's input
+# and output we define two seperate mappings for them
+[Mapping analog-stereo-c-output]
+description = Analog Stereo Channel C
+device-strings = hw:%f,0,2
+channel-map = left,right
+direction = output
+
+[Mapping analog-stereo-c-input]
+description = Analog Stereo Channel C (Line/Mic)
+device-strings = hw:%f,0,2
+channel-map = left,right
+direction = input
+
+[Mapping analog-stereo-d-output]
+description = Analog Stereo Channel D (Headphones)
+device-strings = hw:%f,0,3
+channel-map = left,right
+direction = output
+
+[Mapping analog-stereo-d-input]
+description = Analog Stereo Channel D
+device-strings = hw:%f,0,3
+channel-map = left,right
+direction = input
+
+[Profile output:analog-stereo-all+input:analog-stereo-all]
+description = Analog Stereo Duplex Channels A, B, C (Line/Mic), D (Headphones)
+output-mappings = analog-stereo-a analog-stereo-b analog-stereo-c-output analog-stereo-d-output
+input-mappings = analog-stereo-a analog-stereo-b analog-stereo-c-input analog-stereo-d-input
+priority = 100
+skip-probe = yes
+
+[Profile output:analog-stereo-d+input:analog-stereo-c]
+description = Analog Stereo Channel D (Headphones) Output, Channel C (Line/Mic) Input
+output-mappings = analog-stereo-d-output
+input-mappings = analog-stereo-c-input
+priority = 90
+skip-probe = yes
+
+[Profile output:analog-stereo-c-d+input:analog-stereo-c-d]
+description = Analog Stereo Duplex Channels C (Line/Mic), D (Line/Mic)
+output-mappings = analog-stereo-c-output analog-stereo-d-output
+input-mappings = analog-stereo-c-input analog-stereo-d-input
+priority = 80
+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 = 50
+skip-probe = yes
+
+[Profile output:analog-stereo-b+input:analog-stereo-b]
+description = Analog Stereo Duplex Channel B
+output-mappings = analog-stereo-b
+input-mappings = analog-stereo-b
+priority = 40
+skip-probe = yes
+
+[Profile output:analog-stereo-c+input:analog-stereo-c]
+description = Analog Stereo Duplex Channel C (Line/Mic)
+output-mappings = analog-stereo-c-output
+input-mappings = analog-stereo-c-input
+priority = 60
+skip-probe = yes
+
+[Profile output:analog-stereo-d+input:analog-stereo-d]
+description = Analog Stereo Duplex Channel D (Headphones)
+output-mappings = analog-stereo-d-output
+input-mappings = analog-stereo-d-input
+priority = 70
+skip-probe = yes
+
+[Profile output:analog-stereo-a]
+description = Analog Stereo Output Channel A
+output-mappings = analog-stereo-a
+priority = 6
+skip-probe = yes
+
+[Profile output:analog-stereo-b]
+description = Analog Stereo Output Channel B
+output-mappings = analog-stereo-b
+priority = 5
+skip-probe = yes
+
+[Profile output:analog-stereo-c]
+description = Analog Stereo Output Channel C
+output-mappings = analog-stereo-c-output
+priority = 7
+skip-probe = yes
+
+[Profile output:analog-stereo-d]
+description = Analog Stereo Output Channel D (Headphones)
+output-mappings = analog-stereo-d-output
+priority = 8
+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
+priority = 1
+skip-probe = yes
+
+[Profile input:analog-stereo-c]
+description = Analog Stereo Input Channel C (Line/Mic)
+input-mappings = analog-stereo-c-input
+priority = 4
+skip-probe = yes
+
+[Profile input:analog-stereo-d]
+description = Analog Stereo Input Channel D
+input-mappings = analog-stereo-d-input
+priority = 3
+skip-probe = yes

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list