[pulseaudio-commits] 3 commits - src/modules

David Henningsson diwic at kemper.freedesktop.org
Fri Apr 10 07:08:55 PDT 2015


 src/modules/alsa/alsa-mixer.c                    |   10 ++++++++--
 src/modules/alsa/mixer/profile-sets/default.conf |   13 ++++++++++++-
 src/modules/udev-util.c                          |   11 +++++++----
 3 files changed, 27 insertions(+), 7 deletions(-)

New commits:
commit 6db74fc3c7e2875d3f93dcf346ccd654a0e972aa
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Mar 31 14:38:04 2015 +0200

    alsa-mixer: Add paths/ports for multichannel profile
    
    This makes the GUIs (e g gnome/unity-control-center) look more consistent
    with other inputs/outputs that also have ports.
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 3832327..2314612 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2389,7 +2389,9 @@ static int path_verify(pa_alsa_path *p) {
         { "hdmi-output",                N_("HDMI / DisplayPort") },
         { "iec958-stereo-output",       N_("Digital Output (S/PDIF)") },
         { "iec958-stereo-input",        N_("Digital Input (S/PDIF)") },
-        { "iec958-passthrough-output",  N_("Digital Passthrough (S/PDIF)") }
+        { "iec958-passthrough-output",  N_("Digital Passthrough (S/PDIF)") },
+        { "multichannel-input",         N_("Multichannel Input") },
+        { "multichannel-output",        N_("Multichannel Output") },
     };
 
     pa_alsa_element *e;
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index 25c1960..470eb99 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -449,6 +449,7 @@ exact-channels = false
 fallback = yes
 priority = 1
 direction = output
+paths-output = multichannel-output
 
 [Mapping multichannel-input]
 device-strings = hw:%f
@@ -457,6 +458,7 @@ 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]

commit 02dc6d84edde7af86e155b224b6aa98080ef2979
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Mar 31 14:38:03 2015 +0200

    alsa-mixer: Use separate profiles for Multichannel Input/Output
    
    This works around bug 80850: a mapping can only have one channel map,
    and in case of a 6-out 10-in device, the mapping will be adjusted to
    have both 10 and 6 channels, which does not work.
    
    Reported-by: Benjamin Tegge <benjaminosm at googlemail.com>
    Suggested-by: Raymond Yau <superquad.vortex2 at gmail.com>
    BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=80850
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 2fe2ae4..3832327 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -3897,7 +3897,10 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
     static const struct description_map well_known_descriptions[] = {
         { "analog-mono",            N_("Analog Mono") },
         { "analog-stereo",          N_("Analog Stereo") },
-        { "multichannel",           N_("Multichannel") },
+        /* Note: Not translated to "Multichannel Input" - then the source name would be "Multichannel Input Input".
+           Same for multichannel-output. */
+        { "multichannel-input",     N_("Multichannel") },
+        { "multichannel-output",    N_("Multichannel") },
         { "analog-surround-21",     N_("Analog Surround 2.1") },
         { "analog-surround-30",     N_("Analog Surround 3.0") },
         { "analog-surround-31",     N_("Analog Surround 3.1") },
@@ -4049,6 +4052,7 @@ static int profile_verify(pa_alsa_profile *p) {
         { "output:analog-mono+input:analog-mono",     N_("Analog Mono Duplex") },
         { "output:analog-stereo+input:analog-stereo", N_("Analog Stereo Duplex") },
         { "output:iec958-stereo+input:iec958-stereo", N_("Digital Stereo Duplex (IEC958)") },
+        { "output:multichannel-output+input:multichannel-input", N_("Multichannel Duplex") },
         { "off",                                      N_("Off") }
     };
 
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index 2d6720e..25c1960 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -442,12 +442,21 @@ channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
 priority = 1
 direction = output
 
-[Mapping multichannel]
+[Mapping multichannel-output]
 device-strings = hw:%f
 channel-map = left,right,rear-left,rear-right
 exact-channels = false
 fallback = yes
 priority = 1
+direction = 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
 
 ; An example for defining multiple-sink profiles
 #[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]

commit 3ac73598c67cb59a318c8baaf33fe97eed1e0b3e
Author: Takashi Sakamoto <o-takashi at sakamocchi.jp>
Date:   Tue Mar 31 14:38:02 2015 +0200

    udev: use ID_MODEL/ID_VENDOR to give friendly name for FireWire devices
    
    For recently supported FireWire sound devices, udev's database assign
    the name of IEEE 1394 Phy/Link chipset to ID_XXX_FROM_DATABASE. This is
    not friently names to users.
    
    This commit applies a workaround to skip ID_XXX_FROM_DATABASE for any
    FireWire devices.
    
    [Fixed up by David Henningsson <david.henningsson at canonical.com>]
    
    Reported-by: Andras Muranyi <muranyia at gmail.com>
    Reference: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1381475
    Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
index 49fc701..d32f8d7 100644
--- a/src/modules/udev-util.c
+++ b/src/modules/udev-util.c
@@ -168,6 +168,7 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) {
     struct udev_device *card = NULL;
     char *t;
     const char *v;
+    const char *bus;
     int id;
 
     pa_assert(p);
@@ -201,15 +202,16 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) {
             pa_proplist_sets(p, "udev.id", v);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_BUS))
-        if ((v = udev_device_get_property_value(card, "ID_BUS")) && *v)
-            pa_proplist_sets(p, PA_PROP_DEVICE_BUS, v);
+        if ((bus = udev_device_get_property_value(card, "ID_BUS")) && *bus)
+            pa_proplist_sets(p, PA_PROP_DEVICE_BUS, bus);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_ID))
         if ((id = read_id(card, "ID_VENDOR_ID")) > 0)
             pa_proplist_setf(p, PA_PROP_DEVICE_VENDOR_ID, "%04x", id);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) {
-        if ((v = udev_device_get_property_value(card, "ID_VENDOR_FROM_DATABASE")) && *v)
+        /* ID_VENDOR_FROM_DATABASE returns the name of IEEE 1394 Phy/Link chipset for FireWire devices */
+        if (!pa_streq(bus, "firewire") && (v = udev_device_get_property_value(card, "ID_VENDOR_FROM_DATABASE")) && *v)
             pa_proplist_sets(p, PA_PROP_DEVICE_VENDOR_NAME, v);
         else if ((v = udev_device_get_property_value(card, "ID_VENDOR_ENC")) && *v)
             proplist_sets_unescape(p, PA_PROP_DEVICE_VENDOR_NAME, v);
@@ -222,7 +224,8 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) {
             pa_proplist_setf(p, PA_PROP_DEVICE_PRODUCT_ID, "%04x", id);
 
     if (!pa_proplist_contains(p, PA_PROP_DEVICE_PRODUCT_NAME)) {
-        if ((v = udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE")) && *v)
+        /* ID_MODEL_FROM_DATABASE returns the name of IEEE 1394 Phy/Link chipset for FireWire devices */
+        if (!pa_streq(bus, "firewire") && (v = udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE")) && *v)
             pa_proplist_sets(p, PA_PROP_DEVICE_PRODUCT_NAME, v);
         else if ((v = udev_device_get_property_value(card, "ID_MODEL_ENC")) && *v)
             proplist_sets_unescape(p, PA_PROP_DEVICE_PRODUCT_NAME, v);



More information about the pulseaudio-commits mailing list