Caio | 28 May 20:25 2015
Picon

Split Stereo into two mono channels

Hello,

I would like to split my stereo codec into two mono channels (input/output) (hardware restriction, I would like to use this configuration into a embedded system) but using pulse audio.
I could have separated using Alsa , but I will need apply echo-cancelling in each channel.
I'm trying to connect the alsa output to pulseaudio but I didn't have success.

Someone has some better idea to split this channels using pulseaudio? My configuration using alsa is above.

The basic configuration in my .asounrd is:

cat ~/.asoundrc

pcm.input_left {
    type dsnoop
    ipc_key 234884
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  0
}
pcm.input_right {
    type dsnoop
    ipc_key 2241234
    slave {
        pcm "hw:0,0"
        channels 2
    }   
    bindings.0  1
}

pcm.device-separation {
   type dmix
   ipc_key 1234
   slave {
      pcm "hw:0,0"
      period_time 0
      period_size 4096
      buffer_size 8192
      rate 44100
   }
}

pcm.output_left {
   type route
   slave.pcm device-separation
   slave.channels 2
   ttable.0.0 0.5
   ttable.1.0 0.5
   hint.description "Left channel"
}

pcm.output_right {
   type route
   slave.pcm device-separation
   slave.channels 2
   ttable.0.1 0.5
   ttable.1.1 0.5
   hint.description "Right channel"
}




After I modify the file to try connect the alsa to pulseaudio

pcm.input_left {
    type dsnoop
    ipc_key 234884
    slave {
        pcm "hw:0,0"
        channels 2
    }
    bindings.0  0
}
pcm.input_right {
    type dsnoop
    ipc_key 2241234
    slave {
        pcm "hw:0,0"
        channels 2
    }   
    bindings.0  1
}

pcm.input_left_pulse {
   type pulse
   slave.pcm input_left
}

ctl.input_left_pulse {
   type pulse
}


pcm.intput_right_pulse {
  type pulse
  slave.pcm input_right
}

ctl.intput_right_pulse {
  type pulse
}

pcm.device-separation {
   type dmix
   ipc_key 1234
   slave {
      pcm "hw:0,0"
      period_time 0
      period_size 4096
      buffer_size 8192
      rate 44100
   }
}

pcm.output_left {
   type pulse
   slave.pcm device-separation
   slave.channels 2
   ttable.0.0 0.5
   ttable.1.0 0.5
   hint.description "Left channel"
}

clt.output_left {
   type pulse
}

pcm.output_right {
   type pulse
   slave.pcm device-separation
   slave.channels 2
   ttable.0.1 0.5
   ttable.1.1 0.5
   hint.description "Right channel"
}

ctl.output_right {
    type pulse
}

In the /etc/pulse/default.pa I added these lines

load-module module-alsa-sink device=output_right
load-module module-alsa-source device=input_right_plug

load-module module-alsa-sink device=output_left
load-module module-alsa-source device=input_left_plug

But these configuration it's wrong and doesn't work .

Someone have a better idea?

Thank you very much!

Regards,


--
----------------------------------------------
Caio Pereira
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Joseph Codadeen | 28 May 12:32 2015
Picon

How to disable HFP support of pulseaudio on Ubuntu 14.04 LTS





_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Oz Dror | 27 May 04:48 2015
Picon

unable to remove sink or source suspension when switching desktop environment

I have pulsesaudio running on ubuntu 15.04 desktop on vt7

I have a container running arch on vt8 using the PULSE_SERVER on vt7

/etc/pulse/default.pa includes the following lines:

load-module module-native-protocol-tcp auth-anonymous=1
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24

as soon as I switch form vt7 to vt8 the pulseaudio sinks and sources becomes suspended. If I am switching to any of the terminals tty1-7
I have no problem. Even If the container uses that terminal. I get IDLE instead of SUSPENDED. 

When I apply any of the following commands the suspension does  not change:

pactl suspend-source 1 0
pactl suspend-source 0
pactl suspend-sink 1 0
pactl suspend-sink 0

There is something in the X11 environment that  force this irreversible suspension.

I suspect that there is a conflict. I cannot tell where it is coming form. Possibly from one of the the modules.

any help will be appreciated.

vt8: pactl list sinks:

Sink #1
        State: SUSPENDED <--------------------------------------------------------
        Name: alsa_output.pci-0000_00_1b.0.analog-stereo
        Description: Built-in Audio Analog Stereo
        Driver: module-alsa-card.c
        Sample Specification: s16le 2ch 44100Hz
        Channel Map: front-left,front-right
        Owner Module: 7
        Mute: no
        Volume: front-left: 58409 /  89% / -3.00 dB,   front-right: 58409 /  89% / -3.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
        Latency: 0 usec, configured 0 usec
        Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        Properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "92HD89E2 Analog"
                alsa.id = "92HD89E2 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7110000 irq 30"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "8c20"
                device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "IDT 92HD89E2"
                alsa.components = "HDA:111d76c7,103c2af3,00100102"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        Ports:
                analog-output: Analog Output (priority: 9900)
        Active Port: analog-output
        Formats:
                pcm

vt8:pactl list modules | grep Name:

        Name: module-stream-restore
Name: module-card-restore
Name: module-augment-properties
Name: module-switch-on-port-available
Name: module-udev-detect
Name: module-alsa-card
Name: module-alsa-card
Name: module-bluetooth-policy
Name: module-bluetooth-discover
Name: module-bluez4-discover
Name: module-esound-protocol-unix
Name: module-native-protocol-unix
Name: module-native-protocol-tcp
Name: module-gconf
Name: module-default-device-restore
Name: module-rescue-streams
Name: module-intended-roles
Name: module-systemd-login
Name: module-position-event-sounds
Name: module-filter-heuristics
Name: module-filter-apply
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Peter Meerwald | 26 May 23:40 2015
Picon

[PATCH 1/2] padsp: Fix wrong condition discovered by -Wlogical-not-parentheses warning

warnings emited by gcc 5.1:

utils/padsp.c: In function 'dsp_trigger':
utils/padsp.c:1902:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
                                       ^
utils/padsp.c: In function 'dsp_cork':
utils/padsp.c:1937:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
                                       ^
Signed-off-by: Peter Meerwald <pmeerw <at> pmeerw.net>
---
 src/utils/padsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index e61373c..b696b39 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
 <at>  <at>  -1899,7 +1899,7  <at>  <at>  static int dsp_trigger(fd_info *i) {
     }

     i->operation_success = 0;
-    while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
+    while (pa_operation_get_state(o) != PA_OPERATION_DONE) {
         PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, fail);

         pa_threaded_mainloop_wait(i->mainloop);
 <at>  <at>  -1934,7 +1934,7  <at>  <at>  static int dsp_cork(fd_info *i, pa_stream *s, int b) {
     }

     i->operation_success = 0;
-    while (!pa_operation_get_state(o) != PA_OPERATION_DONE) {
+    while (pa_operation_get_state(o) != PA_OPERATION_DONE) {
         if (s == i->play_stream)
             PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, fail);
         else if (s == i->rec_stream)
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
David Henningsson | 26 May 08:49 2015

[PATCH] lfe-filter-test: Use S16NE format

...otherwise this code will fail on big-endian architectures.

Cc: Hui Wang <hui.wang <at> canonical.com>
Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>
---
 src/tests/lfe-filter-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/lfe-filter-test.c b/src/tests/lfe-filter-test.c
index ea8108c..389a2b9 100644
--- a/src/tests/lfe-filter-test.c
+++ b/src/tests/lfe-filter-test.c
 <at>  <at>  -133,7 +133,7  <at>  <at>  START_TEST (lfe_filter_test) {

     a.channels = 1;
     a.rate = 44100;
-    a.format = PA_SAMPLE_S16LE;
+    a.format = PA_SAMPLE_S16NE;

     lft.ss = &a;
     pa_assert_se(lft.pool = pa_mempool_new(false, 0));
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Hui Wang | 25 May 14:05 2015

[V2 PATCH] tests: add tolerant variation for comparing the rewind result

On 32bits OS, this test case fails. The reason is when rewinding to
the middle of a block, some of float parameters in the saved_state
are stored in the memory from FPU registers, and those parameters will
be used for next time to process data with lfe. Here if FPU register
is over 32bits, the storing from FPU register to memory will introduce
some variation, and this small variation will introduce small
variation to the rewinding result.

So adding the tolerant variation for comparing the rewind result, make
this test case can work on both 64bits OS and 32bits OS.

Signed-off-by: Hui Wang <hui.wang <at> canonical.com>
---
 src/tests/lfe-filter-test.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/tests/lfe-filter-test.c b/src/tests/lfe-filter-test.c
index 2c6d597..81682cb 100644
--- a/src/tests/lfe-filter-test.c
+++ b/src/tests/lfe-filter-test.c
 <at>  <at>  -37,6 +37,7  <at>  <at>  static uint8_t *ori_sample_ptr;

 #define ONE_BLOCK_SAMPLES 4096
 #define TOTAL_SAMPLES 8192
+#define TOLERANT_VARIATION 1

 static void save_data_block(struct lfe_filter_test *lft, void *d, pa_memblock *blk) {
     uint8_t *dst = d, *src;
 <at>  <at>  -63,11 +64,12  <at>  <at>  static pa_memblock* generate_data_block(struct lfe_filter_test *lft, int start)
 static int compare_data_block(struct lfe_filter_test *lft, void *a, void *b) {
     int ret = 0;
     uint32_t i;
-    uint32_t fz = pa_frame_size(lft->ss);
-    uint8_t *r = a, *u = b;
+    uint16_t *r = a, *u = b;
+
+    pa_assert_se(lft->ss->format == PA_SAMPLE_S16NE);

-    for (i = 0; i < ONE_BLOCK_SAMPLES * fz; i++) {
-        if (*r++ != *u++) {
+    for (i = 0; i < ONE_BLOCK_SAMPLES; i++) {
+        if (abs(*r++ - *u++) > TOLERANT_VARIATION) {
             pa_log_error("lfe-filter-test: test failed, the output data in the position 0x%x of a block does not
equal!\n", i);
             ret = -1;
             break;
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Hui Wang | 25 May 06:49 2015

[PATCH] tests: add tolerant variation for comparing the rewind result

On 32bits OS, this test case fails. The reason is when rewinding to
the middle of a block, some of float parameters in the saved_state
are stored in the memory from FPU registers, and those parameters will
be used for next time to process data with lfe. Here if FPU register
is over 32bits, the storing from FPU register to memory will introduce
some variation, and this small variation will introduce small
variation to the rewinding result.

So adding the tolerant variation for comparing the rewind result, make
this test case can work on both 64bits OS and 32bits OS.

Signed-off-by: Hui Wang <hui.wang <at> canonical.com>
---
I wrote a simple testcase to show the variation exists on 32bits OS.
When compile this test case on 64bits OS, it will not fail when running
it; while on 32bits OS if you just compile it without "-O2", this
testcase still pass without any variation, but if you add "-O2" when
compiling it, you will see variation when you running it.
http://pastebin.ubuntu.com/11342537/

 src/tests/lfe-filter-test.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/tests/lfe-filter-test.c b/src/tests/lfe-filter-test.c
index 2c6d597..50636a9 100644
--- a/src/tests/lfe-filter-test.c
+++ b/src/tests/lfe-filter-test.c
 <at>  <at>  -37,6 +37,7  <at>  <at>  static uint8_t *ori_sample_ptr;

 #define ONE_BLOCK_SAMPLES 4096
 #define TOTAL_SAMPLES 8192
+#define TOLERANT_VARIATION 1

 static void save_data_block(struct lfe_filter_test *lft, void *d, pa_memblock *blk) {
     uint8_t *dst = d, *src;
 <at>  <at>  -63,15 +64,26  <at>  <at>  static pa_memblock* generate_data_block(struct lfe_filter_test *lft, int start)
 static int compare_data_block(struct lfe_filter_test *lft, void *a, void *b) {
     int ret = 0;
     uint32_t i;
-    uint32_t fz = pa_frame_size(lft->ss);
-    uint8_t *r = a, *u = b;

-    for (i = 0; i < ONE_BLOCK_SAMPLES * fz; i++) {
-        if (*r++ != *u++) {
-            pa_log_error("lfe-filter-test: test failed, the output data in the position 0x%x of a block does not
equal!\n", i);
-            ret = -1;
+    switch (lft->ss->format) {
+        case PA_SAMPLE_S16NE:
+        case PA_SAMPLE_S16RE: {
+            uint16_t *r = a, *u = b;
+            for (i = 0; i < ONE_BLOCK_SAMPLES; i++) {
+                uint16_t va = *r++, vb = *u++;
+                uint16_t var = (va >= vb) ? (va - vb) : (vb - va);
+                if (var > TOLERANT_VARIATION) {
+                    pa_log_error("lfe-filter-test: test failed, the output data in the position 0x%x of a block does not
equal!\n", i);
+                    ret = -1;
+                    break;
+                }
+            }
             break;
         }
+        default:
+            pa_log_error("lfe-filter-test: not a suppported sample format yet in this testcase!\n");
+            ret = -1;
+            break;
     }
     return ret;
 }
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Tanu Kaskinen | 22 May 00:21 2015
Picon

[PATCH] conf-parser: add support for .d directories

This allows a configuration scheme where prior to loading
configuration from "somefile", the parser first loads configuration
from files in directory "somefile.d". This feature is currently
enabled only for client.conf and daemon.conf.

This makes it easier to create configuration packages in distributions
when there's need to have different configuration in different setups.
For example, the graphical Sato environment in OpenEmbedded-core needs
to set allow-autospawn-for-root=true in client.conf, but the default
configuration in OpenEmbedded-core should not set that option. With
this patch, I can create a Sato-specific package that simply installs
50-sato.conf in /etc/pulse/client.conf.d without conflicting with the
main client.conf file coming from a different package.

Signed-off-by: Tanu Kaskinen <tanu.kaskinen <at> linux.intel.com>
---
 src/daemon/daemon-conf.c                |  2 +-
 src/modules/alsa/alsa-mixer.c           |  4 ++--
 src/modules/module-augment-properties.c |  2 +-
 src/pulse/client-conf.c                 |  2 +-
 src/pulsecore/conf-parser.c             | 42 +++++++++++++++++++++++++++++++--
 src/pulsecore/conf-parser.h             |  8 ++++++-
 6 files changed, 52 insertions(+), 8 deletions(-)

diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 21a8edb..1332fc6 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
 <at>  <at>  -617,7 +617,7  <at>  <at>  int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
     ci.default_channel_map_set = ci.default_sample_spec_set = false;
     ci.conf = c;

-    r = f ? pa_config_parse(c->config_file, f, table, NULL, NULL) : 0;
+    r = f ? pa_config_parse(c->config_file, f, table, NULL, true, NULL) : 0;

     if (r >= 0) {

diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 2314612..988b4fe 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
 <at>  <at>  -2483,7 +2483,7  <at>  <at>  pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa

     fn = pa_maybe_prefix_path(fname, paths_dir);

-    r = pa_config_parse(fn, NULL, items, p->proplist, p);
+    r = pa_config_parse(fn, NULL, items, p->proplist, false, p);
     pa_xfree(fn);

     if (r < 0)
 <at>  <at>  -4288,7 +4288,7  <at>  <at>  pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
                               pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" :
                               PA_ALSA_PROFILE_SETS_DIR);

-    r = pa_config_parse(fn, NULL, items, NULL, ps);
+    r = pa_config_parse(fn, NULL, items, NULL, false, ps);
     pa_xfree(fn);

     if (r < 0)
diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c
index 42b6fd9..541f0e7 100644
--- a/src/modules/module-augment-properties.c
+++ b/src/modules/module-augment-properties.c
 <at>  <at>  -204,7 +204,7  <at>  <at>  static void update_rule(struct rule *r) {
     table[0].data = &r->application_name;
     table[1].data = &r->icon_name;

-    if (pa_config_parse(fn, NULL, table, NULL, r) < 0)
+    if (pa_config_parse(fn, NULL, table, NULL, false, r) < 0)
         pa_log_warn("Failed to parse .desktop file %s.", fn);

     pa_xfree(fn);
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 83331f8..3c3384d 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
 <at>  <at>  -149,7 +149,7  <at>  <at>  void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e

     f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER,
ENV_CLIENT_CONFIG_FILE, &fn);
     if (f) {
-        pa_config_parse(fn, f, table, NULL, NULL);
+        pa_config_parse(fn, f, table, NULL, true, NULL);
         pa_xfree(fn);
         fclose(f);
     }
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 2dcd45a..d473232 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
 <at>  <at>  -21,6 +21,7  <at>  <at> 
 #include <config.h>
 #endif

+#include <dirent.h>
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
 <at>  <at>  -103,7 +104,7  <at>  <at>  static int parse_line(pa_config_parser_state *state) {
             }
         }

-        r = pa_config_parse(fn, NULL, state->item_table, state->proplist, state->userdata);
+        r = pa_config_parse(fn, NULL, state->item_table, state->proplist, false, state->userdata);
         pa_xfree(path);
         return r;
     }
 <at>  <at>  -152,8 +153,13  <at>  <at>  static int parse_line(pa_config_parser_state *state) {
         return normal_assignment(state);
 }

+static int conf_filter(const struct dirent *entry) {
+    return pa_endswith(entry->d_name, ".conf");
+}
+
 /* Go through the file and parse each line */
-int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist,
void *userdata) {
+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist,
bool use_dot_d,
+                    void *userdata) {
     int r = -1;
     bool do_close = !f;
     pa_config_parser_state state;
 <at>  <at>  -163,6 +169,38  <at>  <at>  int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p

     pa_zero(state);

+    if (use_dot_d) {
+        char *dir_name;
+        int n;
+        struct dirent **entries = NULL;
+
+        dir_name = pa_sprintf_malloc("%s.d", filename);
+
+        n = scandir(dir_name, &entries, conf_filter, alphasort);
+        if (n >= 0) {
+            int i;
+
+            for (i = 0; i < n; i++) {
+                char *filename2;
+
+                filename2 = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", dir_name, entries[i]->d_name);
+                pa_config_parse(filename2, NULL, t, proplist, false, userdata);
+                pa_xfree(filename2);
+
+                free(entries[i]);
+            }
+
+            free(entries);
+        } else {
+            if (errno == ENOENT)
+                pa_log_debug("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno));
+            else
+                pa_log_warn("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno));
+        }
+
+        pa_xfree(dir_name);
+    }
+
     if (!f && !(f = pa_fopen_cloexec(filename, "r"))) {
         if (errno == ENOENT) {
             pa_log_debug("Failed to open configuration file '%s': %s", filename, pa_cstrerror(errno));
diff --git a/src/pulsecore/conf-parser.h b/src/pulsecore/conf-parser.h
index dbb6f5c..cc20d7d 100644
--- a/src/pulsecore/conf-parser.h
+++ b/src/pulsecore/conf-parser.h
 <at>  <at>  -59,6 +59,11  <at>  <at>  struct pa_config_parser_state {
  * pa_config_items in *t that is terminated by an item where lvalue is
  * NULL.
  *
+ * If use_dot_d is true, then before parsing the file named by the filename
+ * argument, the function will parse all files ending with ".conf" in
+ * alphabetical order from a directory whose name is filename + ".d", if such
+ * directory exists.
+ *
  * Some configuration files may contain a Properties section, which
  * is a bit special. Normally all accepted lvalues must be predefined
  * in the pa_config_item table, but in the Properties section the
 <at>  <at>  -68,7 +73,8  <at>  <at>  struct pa_config_parser_state {
  * properties, and those properties will be merged into the given
  * proplist. If proplist is NULL, then sections named "Properties"
  * are not allowed at all in the configuration file. */
-int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist,
void *userdata);
+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist,
bool use_dot_d,
+                    void *userdata);

 /* Generic parsers for integers, size_t, booleans and strings */
 int pa_config_parse_int(pa_config_parser_state *state);
--

-- 
1.9.3

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
David Henningsson | 21 May 08:28 2015

[PATCH] alsa-mixer: Add "Line Out" to known mixer controls

Reported-by: Raymond Yau <superquad.vortex2 <at> gmail.com>
Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>
---
 src/modules/alsa/mixer/paths/analog-output-headphones-2.conf   | 4 ++++
 src/modules/alsa/mixer/paths/analog-output-headphones.conf     | 4 ++++
 src/modules/alsa/mixer/paths/analog-output-lineout.conf        | 6 ++++++
 src/modules/alsa/mixer/paths/analog-output-speaker-always.conf | 4 ++++
 src/modules/alsa/mixer/paths/analog-output-speaker.conf        | 4 ++++
 5 files changed, 22 insertions(+)

diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
index ddabf77..1028b93 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
 <at>  <at>  -47,6 +47,10  <at>  <at>  volume = off
 switch = mute
 volume = zero

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Headphone+LO]
 switch = mute
 volume = zero
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index b6ee70b..a7a2140 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
 <at>  <at>  -68,6 +68,10  <at>  <at>  override-map.2 = all-left,all-right
 switch = off
 volume = off

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Speaker+LO]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-lineout.conf b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
index 68f444a..8e7a655 100644
--- a/src/modules/alsa/mixer/paths/analog-output-lineout.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-lineout.conf
 <at>  <at>  -83,6 +83,12  <at>  <at>  volume = merge
 override-map.1 = all
 override-map.2 = all-left,all-right

+[Element Line Out]
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right
+
 [Element Speaker+LO]
 switch = mute
 volume = merge
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
index b6d9f94..101edd8 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
 <at>  <at>  -68,6 +68,10  <at>  <at>  volume = zero
 switch = mute
 volume = zero

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Headphone+LO]
 switch = off
 volume = off
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
index 39193dd..e3b6c54 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
 <at>  <at>  -84,6 +84,10  <at>  <at>  volume = off
 switch = off
 volume = off

+[Element Line Out]
+switch = off
+volume = off
+
 [Element Speaker+LO]
 required-any = any
 switch = mute
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Peter Meerwald | 21 May 01:46 2015
Picon

[PATCH] biquad: Make use of M_SQRT2 constant

From: Peter Meerwald <p.meerwald <at> bct-electronic.com>

should be in math.h, use it

Signed-off-by: Peter Meerwald <pmeerw <at> pmeerw.net>
---
 src/pulsecore/filter/biquad.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/pulsecore/filter/biquad.c b/src/pulsecore/filter/biquad.c
index 7c21a29..4d14864 100644
--- a/src/pulsecore/filter/biquad.c
+++ b/src/pulsecore/filter/biquad.c
 <at>  <at>  -22,6 +22,10  <at>  <at> 
 #define M_PI 3.14159265358979323846
 #endif

+#ifndef M_SQRT2
+#define M_SQRT2 1.41421356237309504880
+#endif
+
 static void set_coefficient(struct biquad *bq, double b0, double b1, double b2,
 			    double a0, double a1, double a2)
 {
 <at>  <at>  -44,10 +48,8  <at>  <at>  static void biquad_lowpass(struct biquad *bq, double cutoff)
 		set_coefficient(bq, 1, 0, 0, 1, 0, 0);
 	} else if (cutoff > 0) {
 		/* Compute biquad coefficients for lowpass filter */
-		double d = sqrt(2);
-
 		double theta = M_PI * cutoff;
-		double sn = 0.5 * d * sin(theta);
+		double sn = 0.5 * M_SQRT2 * sin(theta);
 		double beta = 0.5 * (1 - sn) / (1 + sn);
 		double gamma = (0.5 + beta) * cos(theta);
 		double alpha = 0.25 * (0.5 + beta - gamma);
 <at>  <at>  -78,10 +80,8  <at>  <at>  static void biquad_highpass(struct biquad *bq, double cutoff)
 		set_coefficient(bq, 0, 0, 0, 1, 0, 0);
 	} else if (cutoff > 0) {
 		/* Compute biquad coefficients for highpass filter */
-		double d = sqrt(2);
-
 		double theta = M_PI * cutoff;
-		double sn = 0.5 * d * sin(theta);
+		double sn = 0.5 * M_SQRT2 * sin(theta);
 		double beta = 0.5 * (1 - sn) / (1 + sn);
 		double gamma = (0.5 + beta) * cos(theta);
 		double alpha = 0.25 * (0.5 + beta + gamma);
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Peter Meerwald | 21 May 01:46 2015
Picon

[PATCH] pulse: Document pa_mainloop_quit()'s retval parameter

From: Peter Meerwald <p.meerwald <at> bct-electronic.com>

Signed-off-by: Peter Meerwald <pmeerw <at> pmeerw.net>
---
 src/pulse/mainloop.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pulse/mainloop.h b/src/pulse/mainloop.h
index a110541..6e2ca5f 100644
--- a/src/pulse/mainloop.h
+++ b/src/pulse/mainloop.h
 <at>  <at>  -114,8 +114,8  <at>  <at>  int pa_mainloop_run(pa_mainloop *m, int *retval);
     and is destroyed when the loop is freed. */
 pa_mainloop_api* pa_mainloop_get_api(pa_mainloop*m);

-/** Shutdown the main loop */
-void pa_mainloop_quit(pa_mainloop *m, int r);
+/** Shutdown the main loop with the specified return value */
+void pa_mainloop_quit(pa_mainloop *m, int retval);

 /** Interrupt a running poll (for threaded systems) */
 void pa_mainloop_wakeup(pa_mainloop *m);
--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Gmane