[pulseaudio-discuss] please explain me this recommendation

2011-04-15 Thread Claude Frantz

Hello !

In many places, I have found the recommendation to set

default-framents = 8
default-fragment-size-msec = 5

in daemon.conf when using old software. Please explain me why.
Are there drawbacks when using more modern software ? Many thanks,

Claude

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Crash in RAOP sink

2011-04-15 Thread David Henningsson
I'm trying to fix a crash a few people have encountered in the upcoming 
version of Ubuntu, which uses 0.9.22 plus a few stable-queue patches.


It crashes with an assertion failure at 
modules/raop/module-raop-sink.c:246. As I don't know much about these 
RAOP things, the below was the best I could come up with. Any thoughts?


Here's a link to the stack trace: 
https://i68752006.restricted.launchpadlibrarian.net/68752006/ThreadStacktrace.txt?token=492a8975a0bfe5d32e7feca41d576110


diff --git a/src/modules/raop/module-raop-sink.c 
b/src/modules/raop/module-raop-sink.c

index 466488e..edeb542 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -243,9 +243,8 @@ static int sink_process_msg(pa_msgobject *o, int 
code, void *data, int64_t offse

 }

 case SINK_MESSAGE_RIP_SOCKET: {
-pa_assert(u-fd = 0);
-
-pa_close(u-fd);
+if (u-fd = 0)
+pa_close(u-fd);
 u-fd = -1;

 if (u-sink-thread_info.state == PA_SINK_SUSPENDED) {




--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] pa_poll(): Simplify detectin of invalid fds in select() emulation mode

2011-04-15 Thread Daniel Mack
On Thu, Apr 14, 2011 at 7:07 PM, Sean McNamara smc...@gmail.com wrote:
 Hi,

 On Thu, Apr 14, 2011 at 9:57 AM, Daniel Mack zon...@gmail.com wrote:
 On Thu, Apr 14, 2011 at 3:53 PM, Maarten Bosmans mkbosm...@gmail.com wrote:
 2011/4/14 Daniel Mack zon...@gmail.com:
 On Thu, Apr 14, 2011 at 12:46 AM, Maarten Bosmans mkbosm...@gmail.com 
 wrote:
 return (fd = 0)  (fcntl(fd, F_GETFL) != -1);

 For Windows, both fcntl and F_GETFL are not available.

 Sigh. Ok, thanks for the feedback. Attached is a new patch which keeps
 things as they are for Windows but fixes the problem for OS X.

 That should do it, yes.

 +#else /* !OS_IS_WINDOWS */
 Minor: this is not exactly the symbol used in the #ifdef.

 Ok.

 Anyway, isn't the #else only supposed to be used for OSX? In that case
 the comment should probably say so.

 No, it's actually really a workaround for Windows as we don't have
 fcntl() there. (Just curious - the header file does exist, right? I
 saw it being included by quite a lot of other source files in the PA
 tree ...)

 The fcntl.h header *does* exist in MSVC (and in MingW...) but the core
 Microsoft C Runtime doesn't actually export the fcntl function. On
 Windows, fcntl header only exists to expose the O_* hexadecimal
 #defines for the flags for the open() call, which *is* supported.

 The only fcntl on Windows comes if you use an alternative C library,
 such as Cygwin's port of newlib or glibc. The native stack doesn't
 supply it.

Ok, thanks for expaining. Colin, can you pick the latest patch from
this thread then and apply? Or do you want me to push it and send a
pull request?


Thanks, everone.

Daniel
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] please explain me this recommendation

2011-04-15 Thread Arun Raghavan
On Fri, 2011-04-15 at 11:40 +0200, Claude Frantz wrote:
 Hello !
 
 In many places, I have found the recommendation to set
 
 default-framents = 8
 default-fragment-size-msec = 5
 
 in daemon.conf when using old software. Please explain me why.
 Are there drawbacks when using more modern software ? Many thanks,

In recent version, and by default, PulseAudio will dynamically adjust
these values based on the latency requirements of the clients that are
connected.

Cheers,
Arun

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] PulseAudio Developer's Meetup at LAC

2011-04-15 Thread Kurt Taylor
(Reposting due to this being embedded in an old thread)

I have worked out a separate room for us to meet at LAC from 2:00-4:00 pm on
Saturday. It's official, we're on the agenda!

http://lac.linuxaudio.org/2011/?page=programmode=tableday=2

I need to get back to the organizers with a purpose and agenda. I am
proposing the following:

PulseAudio Developer's Meetup and Working Session (2-4pm Sat, May 7th, LAC -
O'Callaghan Room)
 - Meetup and brief introductions
 - Release content and schedule
 - Technical discussions
 - Coding breakouts (if time permits)

Please respond with comments and suggestions as soon as possible. And, if
you haven't already, let me know if you are planning on attending.

Thanks!

Kurt Taylor (irc krtaylor)
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] pa_poll(): Simplify detectin of invalid fds in select() emulation mode

2011-04-15 Thread Colin Guthrie
'Twas brillig, and Daniel Mack at 15/04/11 11:54 did gyre and gimble:
 On Thu, Apr 14, 2011 at 7:07 PM, Sean McNamara smc...@gmail.com wrote:
 Hi,

 On Thu, Apr 14, 2011 at 9:57 AM, Daniel Mack zon...@gmail.com wrote:
 On Thu, Apr 14, 2011 at 3:53 PM, Maarten Bosmans mkbosm...@gmail.com 
 wrote:
 2011/4/14 Daniel Mack zon...@gmail.com:
 On Thu, Apr 14, 2011 at 12:46 AM, Maarten Bosmans mkbosm...@gmail.com 
 wrote:
 return (fd = 0)  (fcntl(fd, F_GETFL) != -1);

 For Windows, both fcntl and F_GETFL are not available.

 Sigh. Ok, thanks for the feedback. Attached is a new patch which keeps
 things as they are for Windows but fixes the problem for OS X.

 That should do it, yes.

 +#else /* !OS_IS_WINDOWS */
 Minor: this is not exactly the symbol used in the #ifdef.

 Ok.

 Anyway, isn't the #else only supposed to be used for OSX? In that case
 the comment should probably say so.

 No, it's actually really a workaround for Windows as we don't have
 fcntl() there. (Just curious - the header file does exist, right? I
 saw it being included by quite a lot of other source files in the PA
 tree ...)

 The fcntl.h header *does* exist in MSVC (and in MingW...) but the core
 Microsoft C Runtime doesn't actually export the fcntl function. On
 Windows, fcntl header only exists to expose the O_* hexadecimal
 #defines for the flags for the open() call, which *is* supported.

 The only fcntl on Windows comes if you use an alternative C library,
 such as Cygwin's port of newlib or glibc. The native stack doesn't
 supply it.
 
 Ok, thanks for expaining. Colin, can you pick the latest patch from
 this thread then and apply? Or do you want me to push it and send a
 pull request?

I'll grab it from here but will likely wait until next week as am on my
holidays just now :)

Cheers

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] PulseAudio Developer's Meetup at LAC

2011-04-15 Thread Colin Guthrie
'Twas brillig, and Kurt Taylor at 15/04/11 15:06 did gyre and gimble:
 (Reposting due to this being embedded in an old thread)
 
 I have worked out a separate room for us to meet at LAC from 2:00-4:00
 pm on Saturday. It's official, we're on the agenda!
 
 http://lac.linuxaudio.org/2011/?page=programmode=tableday=2
 http://lac.linuxaudio.org/2011/?page=programmode=tableday=2
 
 I need to get back to the organizers with a purpose and agenda. I am
 proposing the following:
 
 PulseAudio Developer's Meetup and Working Session (2-4pm Sat, May 7th,
 LAC - O'Callaghan Room)
  - Meetup and brief introductions
  - Release content and schedule
  - Technical discussions
  - Coding breakouts (if time permits)
 
 Please respond with comments and suggestions as soon as possible. And,
 if you haven't already, let me know if you are planning on attending.

Great! That's ideal.

I think the agenda you have there is fine. I think keeping it relatively
free form is fine :)

Cheers

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread Colin Guthrie
Hi,

Here is my first draft of a filter module to automatically load
equalizer and/or echo-cancel modules if automagically and in a manual
but convenient way.

Essentially you just set the filter.want property on the stream and it
should be magically used. It just tries to load a module with the same
name as the filter.want value but with module- prepended to it. So if
you set filter.want=echo-cancel, it will be automatically loaded and the
stream will be moved to it. When the filter sink is no longer needed it
will be automatically unloaded.

For the automagical bit, a separate module will simply automatically set
the filter.want property and set it to echo-cancel for phone streams. If
you want to suppress the automatic loading of a filter sink module, just
set filter.suppress property equal to the module you want to suppress.
e.g. Skype should probably set filter.suppress=echo-cancel.

One thing that I've not really considered is how to deal with the fact
that echo-cancel is probably only needed when the external mic and
speakers are used so there may need to be more smarts added to deal
with this, but I'm not really all that clued up on when this should or
shouldn't be used.

I plan to add a couple buttons next to streams in pavucontrol that
toggles manually the equalizer and maybe also echo-cancel too.


Comments welcome. I've not really self-reviewed it too much, so probably
a couple howlers in there :) (I'll move the prop name defines into the
central file that has some common property names before committing)

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]
From 328dc6d61bf96246cb5a0e51106d23b58734b810 Mon Sep 17 00:00:00 2001
From: Colin Guthrie co...@mageia.org
Date: Thu, 14 Apr 2011 13:04:03 +0200
Subject: [PATCH 1/2] filter-apply: New module to automatically load filter sinks (and move streams) based on sink-input property hints.

This module does not yet deal with modules that need matched inputs/outputs
(i.e. echo-cancel) but this will be added in due course.
---
 src/Makefile.am   |   10 +-
 src/modules/module-filter-apply.c |  400 +
 2 files changed, 408 insertions(+), 2 deletions(-)
 create mode 100644 src/modules/module-filter-apply.c

diff --git a/src/Makefile.am b/src/Makefile.am
index 38fb569..78076f6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1053,7 +1053,8 @@ modlibexec_LTLIBRARIES += \
 		module-loopback.la \
 		module-virtual-sink.la \
 		module-virtual-source.la \
-		module-switch-on-connect.la
+		module-switch-on-connect.la \
+		module-filter-apply.la
 
 # See comment at librtp.la above
 if !OS_IS_WIN32
@@ -1341,7 +1342,8 @@ SYMDEF_FILES = \
 		module-loopback-symdef.h \
 		module-virtual-sink-symdef.h \
 		module-virtual-source-symdef.h \
-		module-switch-on-connect-symdef.h
+		module-switch-on-connect-symdef.h \
+		module-filter-apply-symdef.h
 
 EXTRA_DIST += $(SYMDEF_FILES)
 BUILT_SOURCES += $(SYMDEF_FILES) builddirs
@@ -1487,6 +1489,10 @@ module_switch_on_connect_la_SOURCES = modules/module-switch-on-connect.c
 module_switch_on_connect_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_switch_on_connect_la_LIBADD = $(MODULE_LIBADD)
 
+module_filter_apply_la_SOURCES = modules/module-filter-apply.c
+module_filter_apply_la_LDFLAGS = $(MODULE_LDFLAGS)
+module_filter_apply_la_LIBADD = $(MODULE_LIBADD)
+
 module_remap_sink_la_SOURCES = modules/module-remap-sink.c
 module_remap_sink_la_LDFLAGS = $(MODULE_LDFLAGS)
 module_remap_sink_la_LIBADD = $(MODULE_LIBADD)
diff --git a/src/modules/module-filter-apply.c b/src/modules/module-filter-apply.c
new file mode 100644
index 000..d4bded5
--- /dev/null
+++ b/src/modules/module-filter-apply.c
@@ -0,0 +1,400 @@
+/***
+  This file is part of PulseAudio.
+
+  Copyright 2011 Colin Guthrie
+
+  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.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include pulse/timeval.h
+#include pulse/rtclock.h
+
+#include pulsecore/macro.h
+#include pulsecore/hashmap.h
+#include pulsecore/hook-list.h
+#include pulsecore/core.h
+#include pulsecore/core-util.h

Re: [pulseaudio-discuss] Crash in RAOP sink

2011-04-15 Thread David Henningsson

On 2011-04-15 11:49, David Henningsson wrote:

I'm trying to fix a crash a few people have encountered in the upcoming
version of Ubuntu, which uses 0.9.22 plus a few stable-queue patches.


Actually there's a different set of crashes at 
modules/raop/module-raop-sink.c:230 as well:


case SINK_MESSAGE_PASS_SOCKET: {
struct pollfd *pollfd;

pa_assert(!u-rtpoll_item); --- crashes here

An example stack trace is here: 
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/753394/+attachment/1993351/+files/ThreadStacktrace.txt





It crashes with an assertion failure at
modules/raop/module-raop-sink.c:246. As I don't know much about these
RAOP things, the below was the best I could come up with. Any thoughts?

Here's a link to the stack trace:
https://i68752006.restricted.launchpadlibrarian.net/68752006/ThreadStacktrace.txt?token=492a8975a0bfe5d32e7feca41d576110


Corrected link for the other stack trace type: 
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/755166/+attachment/2003582/+files/ThreadStacktrace.txt


--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] sink-input: Check flat volume with pa_sink_flat_volume_enabled().

2011-04-15 Thread Tanu Kaskinen
Checking just the flag doesn't work if the sink uses volume sharing, because
such sinks never have PA_SINK_FLAT_VOLUME set.
---
 src/pulsecore/sink-input.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 46f26f9..1931d99 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -1020,7 +1020,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const 
pa_cvolume *volume, pa_boo
 pa_assert(volume-channels == 1 || pa_cvolume_compatible(volume, 
i-sample_spec));
 pa_assert(i-volume_writable);
 
-if ((i-sink-flags  PA_SINK_FLAT_VOLUME)  !absolute) {
+if (!absolute  pa_sink_flat_volume_enabled(i-sink)) {
 v = i-sink-reference_volume;
 pa_cvolume_remap(v, i-sink-channel_map, i-channel_map);
 
@@ -1043,7 +1043,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const 
pa_cvolume *volume, pa_boo
 i-volume = *volume;
 i-save_volume = save;
 
-if (i-sink-flags  PA_SINK_FLAT_VOLUME) {
+if (pa_sink_flat_volume_enabled(i-sink)) {
 /* We are in flat volume mode, so let's update all sink input
  * volumes and update the flat volume of the sink */
 
-- 
1.7.4.1

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread Colin Guthrie
Forgot to say but I have this patch lined up too to make the
filter.want=equalizer-sink stuff work.

Better argument standardisation across the board welcome. Happy for any
suggestions on naming conventions or leaving it as it is.

Also, I had to apply this patch to equalizer-sink to prevent it from
crashing the server on unload:

diff --git a/src/modules/module-equalizer-sink.c
b/src/modules/module-equalizer-sink.c
index 0bbb23a..611f7dd 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1286,7 +1286,7 @@ void pa__done(pa_module*m) {

 save_state(u);

-dbus_done(u);
+//dbus_done(u);

 for(c = 0; c  u-channels; ++c)
 pa_xfree(u-base_profiles[c]);


I mentioned this in another thread... hopefully someone more familiar
with dbus can take a look at the underlying issue here :)

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]
From a11b6cd5a9c9a713d7e1468151627c2c659835d3 Mon Sep 17 00:00:00 2001
From: Colin Guthrie co...@mageia.org
Date: Thu, 14 Apr 2011 13:00:58 +0200
Subject: [PATCH] equalizer: Use sink_master as the module argument rather than just master.

This brings more uniformity to arguments to match module-echo-cancel
(which needs both sink and source masters, hence the disambiguation).

This will allow other modules to load filters in a more uniform way
in the future without kludges to deal with variation in arguments.
---
 src/modules/module-equalizer-sink.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index bb350c3..0bbb23a 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -79,7 +79,7 @@ PA_MODULE_LOAD_ONCE(FALSE);
 PA_MODULE_USAGE(
 _(sink_name=name of the sink 
   sink_properties=properties for the sink 
-  master=sink to connect to 
+  sink_master=sink to connect to 
   format=sample format 
   rate=sample rate 
   channels=number of channels 
@@ -133,7 +133,7 @@ struct userdata {
 static const char* const valid_modargs[] = {
 sink_name,
 sink_properties,
-master,
+sink_master,
 format,
 rate,
 channels,
@@ -1088,7 +1088,7 @@ int pa__init(pa_module*m) {
 goto fail;
 }
 
-if (!(master = pa_namereg_get(m-core, pa_modargs_get_value(ma, master, NULL), PA_NAMEREG_SINK))) {
+if (!(master = pa_namereg_get(m-core, pa_modargs_get_value(ma, sink_master, NULL), PA_NAMEREG_SINK))) {
 pa_log(Master sink not found);
 goto fail;
 }
-- 
1.7.4.3

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] sink-input: Check flat volume with pa_sink_flat_volume_enabled().

2011-04-15 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 15/04/11 17:36 did gyre and gimble:
 Checking just the flag doesn't work if the sink uses volume sharing, because
 such sinks never have PA_SINK_FLAT_VOLUME set.

Thanks. In my tree now.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] pa_poll(): Simplify detectin of invalid fds in select() emulation mode

2011-04-15 Thread Colin Guthrie
'Twas brillig, and Colin Guthrie at 15/04/11 17:04 did gyre and gimble:
 I'll grab it from here but will likely wait until next week as am on my
 holidays just now 

Actually it's in my tree now. Will test and push when I get back.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] stream-restore: Check for readability before reading volume

2011-04-15 Thread Colin Guthrie
'Twas brillig, and Arun Raghavan at 12/04/11 09:48 did gyre and gimble:
 On Tue, 2011-04-12 at 13:11 +0530, Arun Raghavan wrote:
 This avoids an assert in pa_sink_input_get_volume() when connecting a
 passthrough stream.
 
 Based on Tanu's comments on the previous version of the patch, this one
 should be correct.

Cool.  In my tree now. It's a bit strange having an assert for writable
right after a check for readable... it should perhaps be less harsh, but
we can cross that bridge in the future :)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread pl bossart
 Here is my first draft of a filter module to automatically load
 equalizer and/or echo-cancel modules if automagically and in a manual
 but convenient way.

Thanks for these patches, this is interesting, Arun and I were talking
last week about better support for effects, after we realized how apps
such as banshee/rhythmbox handle effects and volume ramps with awful
hard-coded gstreamer pipelines. All this PCM processing should move to
PulseAudio really.
Your approach makes sense with the existing solution based on virtual
sinks/sources, but with the current implementation, the effects are
really global, post-mix. If you want to add an effect on a specific
stream, you need to create a new sink and move the sink-input. That
really doesn't scale. Ideally we would want to use a linked list of
effects, so that the effects can be added/enabled/disabled/removed
quickly and their order modified, and we should be able to handle
- local/per-stream effects.
- global/post-mix effects
- aux effects (such as reverb)
We would also need a standard way for apps to set/get the parameters
needed by effects.
This isn't new, this is what Android/AudioFlinger/OpenSL ES implement.
In most cases, users really care about global effects only, but you
may want to have a specific filter on a stream (ReplayGain or some
volume ramp for example).
I also don't think using a 10s timer is really great to check if the
effect is actually needed. If you had a linked list you wouldn't need
to do this type of things.
let me know if I am making any sense, it's been a long week...
-Pierre
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread Colin Guthrie
'Twas brillig, and pl bossart at 15/04/11 22:33 did gyre and gimble:
 I also don't think using a 10s timer is really great to check if the
 effect is actually needed. If you had a linked list you wouldn't need
 to do this type of things.
 let me know if I am making any sense, it's been a long week...

The reason for that was to prevent churn on e.g. song changes where
streams may disappear for a moment before being replaced (this might not
be likely in a practical situation where the same stream is reused, but
the reasoning is sound I think).

I also agree fully on the general need to make things more unique but
IMO that will require a less kludgy solution of using virtual sinks to
apply said filters.

So I won't be upset if this is a short lived module and it can be
replaced later, but hopefully it'll do for the time being :)

Cheers

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread Maarten Bosmans
2011/4/15 pl bossart bossart.nos...@gmail.com:
 Here is my first draft of a filter module to automatically load
 equalizer and/or echo-cancel modules if automagically and in a manual
 but convenient way.

 Thanks for these patches, this is interesting, Arun and I were talking
 last week about better support for effects, after we realized how apps
 such as banshee/rhythmbox handle effects and volume ramps with awful
 hard-coded gstreamer pipelines. All this PCM processing should move to
 PulseAudio really.

Do the developers of those applications feel the same? Perhaps this is
a right time to step back and think about what we want to achieve. I'd
say that some sort of client-side access to volume ramping
(fade-in/fade-out) is appropriate. But effects like equalizer is
probably better off in a gstreamer pipeline.

 Your approach makes sense with the existing solution based on virtual
 sinks/sources, but with the current implementation, the effects are
 really global, post-mix. If you want to add an effect on a specific
 stream, you need to create a new sink and move the sink-input. That
 really doesn't scale. Ideally we would want to use a linked list of
 effects, so that the effects can be added/enabled/disabled/removed
 quickly and their order modified, and we should be able to handle

That looks awfully lot like a reimplementation of gstreamer. Is that
really what we want?

 - local/per-stream effects.
 - global/post-mix effects
 - aux effects (such as reverb)

I consider the global reverb option one of the most terrible parts of
a lot of windows audio drivers. What's the use case for that?

 We would also need a standard way for apps to set/get the parameters
 needed by effects.
 This isn't new, this is what Android/AudioFlinger/OpenSL ES implement.
 In most cases, users really care about global effects only, but you
 may want to have a specific filter on a stream (ReplayGain or some
 volume ramp for example).
 I also don't think using a 10s timer is really great to check if the
 effect is actually needed. If you had a linked list you wouldn't need
 to do this type of things.
 let me know if I am making any sense, it's been a long week...
 -Pierre

I'm sorry for sounding perhaps a bit grumpy, but I am a bit hesitant.
This is really something that should be planned carefully. PulseAudio
can't be everything for everybody. That said, it is perfectly possible
that I miss some important usage scenario's, especially you seem to be
working on embedded stuff, with other demands on pulse.

Maarten
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] RFC: Filter module loader

2011-04-15 Thread IL'dar AKHmetgaleev
На Sat, 16 Apr 2011 06:28:29 +0300
Tanu Kaskinen ta...@iki.fi записано:

 Doing effects in Pulseaudio removes the need to implement equalizer
 support in each and every music player. With better filter support it
 should also be easy to configure per-output eq settings.

Inputs also may have fiters. I would like to have a way to filter my
mic input.

-- 
Ильдар Ахметгалеев aka AkhIL
Сбт Апр 16 11:12:48 NOVST 2011
Sat Apr 16 04:12:48 UTC 2011
--
Visit my home page http://akhil.homelinux.org
jabber: ak...@jabber.ru
--
Все есть так как есть потому что оно так есть... безупречно.
--
Linux artstation 2.6.32-gentoo-r24 #1 SMP Sat Jan 1 20:29:36 NOVT 2011
x86_64 AMD Phenom(tm) 9550 Quad-Core Processor AuthenticAMD GNU/Linux
up 3 days, 18:46,  0 users,  load average: 0.09, 0.03, 0.01
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss