Re: [pulseaudio-discuss] ALSA or PulseAudio for low-latency voice?

2011-03-20 Thread David Henningsson

On 2011-03-19 17:45, Philip Jägenstedt wrote:

Hi PulseAudionauts,

I've been meaning to experiment a bit with low-latency voice codecs
and naturally want to add as little latency as possible to what is
imposed by the codec on both capture and playback. (My guess is that
the latency added would be between min(capture_latency,
playback_latency) and capture_latency+playback_latency, depending on
how well capture end and playback begin are synchronized.)

Q: Does it matters for latency if I program against ALSA or PulseAudio?


Well, that kind of depends on what scale you're on. If you need 
latencies under say - and this is just a qualified guess - ~ 10-20 ms, 
you'll need to program against ALSA or Jack. Above that and you'll be 
good with PulseAudio.



This is assuming a setup like on Ubuntu, where the default ALSA device
is using a PulseAudio backend. (Portability and code complexity may
favor one solution or the other, but that's not what I'm asking.)


When I say program against ALSA above, I mean directly against an ALSA 
sound card, i e bypassing Pulseaudio. As for if ALSA plugin - 
PulseAudio - ALSA - HW gives worse latency than PulseAudio - ALSA - 
HW, I don't think that matters much.


--
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] ALSA or PulseAudio for low-latency voice?

2011-03-20 Thread Tanu Kaskinen
On Sun, 2011-03-20 at 11:07 +0100, David Henningsson wrote:
 On 2011-03-19 17:45, Philip Jägenstedt wrote:
  Hi PulseAudionauts,
 
  I've been meaning to experiment a bit with low-latency voice codecs
  and naturally want to add as little latency as possible to what is
  imposed by the codec on both capture and playback. (My guess is that
  the latency added would be between min(capture_latency,
  playback_latency) and capture_latency+playback_latency, depending on
  how well capture end and playback begin are synchronized.)
 
  Q: Does it matters for latency if I program against ALSA or PulseAudio?
 
 Well, that kind of depends on what scale you're on. If you need 
 latencies under say - and this is just a qualified guess - ~ 10-20 ms, 
 you'll need to program against ALSA or Jack. Above that and you'll be 
 good with PulseAudio.
 
  This is assuming a setup like on Ubuntu, where the default ALSA device
  is using a PulseAudio backend. (Portability and code complexity may
  favor one solution or the other, but that's not what I'm asking.)
 
 When I say program against ALSA above, I mean directly against an ALSA 
 sound card, i e bypassing Pulseaudio. As for if ALSA plugin - 
 PulseAudio - ALSA - HW gives worse latency than PulseAudio - ALSA - 
 HW, I don't think that matters much.

A while back I discussed in IRC with someone who wanted to have low
latency with Pulseaudio. According to his experiments, it seemed like
libpulse enforces for some reason a minimum client-side buffering of 100
ms or so, unless pa_stream_begin_write() is used when writing data. The
alsa plugin doesn't use that function (I don't know why, maybe it just
can't use it for some reason), so I would guess that it's impossible to
get lower than 100 ms latencies through the alsa plugin. You can of
course try, and results of such experiment would be interesting
regardless of the outcome.

-- 
Tanu

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


Re: [pulseaudio-discuss] pulseaudio xbmc passthrough success

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Kelly Anderson at 18/03/11 21:10 did gyre and gimble:
 Good news :)  I've just watched District 9 and Master and Commander in
 full dts-hd.  A few minor glitches (a couple of pops, I think it might
 be buffer underruns),  other than that it worked great!
 
 One thing I did notice with Master and Commander was that with standard
 dts the dialog was not nearly as clear as it was with dts-hd.  dts-hd
 has about 4 times the bandwidth.
 
 I'll be putting up the newer code sometime tomorrow.  I've been working
 pretty long hours on it and now I just want to relax a bit.

Great news! Enjoy the relax :)

-- 

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 xbmc passthrough success

2011-03-20 Thread Ng Oon-Ee
On Sun, 2011-03-20 at 11:09 +, Colin Guthrie wrote: 
 'Twas brillig, and Kelly Anderson at 18/03/11 21:10 did gyre and gimble:
  Good news :)  I've just watched District 9 and Master and Commander in
  full dts-hd.  A few minor glitches (a couple of pops, I think it might
  be buffer underruns),  other than that it worked great!
  
  One thing I did notice with Master and Commander was that with standard
  dts the dialog was not nearly as clear as it was with dts-hd.  dts-hd
  has about 4 times the bandwidth.
  
  I'll be putting up the newer code sometime tomorrow.  I've been working
  pretty long hours on it and now I just want to relax a bit.
 
 Great news! Enjoy the relax :)
 
OT: I'd call watching District 9 and Master and Commander relaxing,
wouldn't you? =p

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


Re: [pulseaudio-discuss] pulseaudio xbmc passthrough success

2011-03-20 Thread Michał Sawicz
Dnia 2011-03-20, nie o godzinie 19:38 +0800, Ng Oon-Ee pisze:
 OT: I'd call watching District 9 and Master and Commander relaxing,
 wouldn't you? =p 

ReOT: No, watching District 9 was torture. :P

-- 
Michał Sawicz mic...@sawicz.net


signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] bluetooth: Do not stop decoding because of a crc error

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Luiz Augusto von Dentz at 18/03/11 17:10 did gyre and
gimble:
 Hi Colin, Maarten,
 
 On Fri, Mar 18, 2011 at 9:56 AM, Colin Guthrie gm...@colin.guthr.ie wrote:
 Luiz,

 I can't remember if you ACKed this patch or not?

 Also, I've pulled in lots of your BT changes. Will reply on the other
 thread about that as it needed a couple tweaks
 
 While I agree we should ignore such packets I believe we should log
 when that happen because it maybe caused by a bug on sbc code or on
 remote stack. What you guys think?

A warning sounds sensible. Maarten, if you reroll that patch with a
suitable warning in there, I'll merge it. Thanks :)

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] bluetooth: Allow frame length changes when decoding a2dp

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Luiz Augusto von Dentz at 18/03/11 17:01 did gyre and
gimble:
 Let me know if it's OK to run it and commit the results (or feel free to
 do it in your tree and an I can pull again).
 
 Please go ahead.

OK, I've done this now :)

There was however a slight problem in that a patch you did to ipc.h in
PA code back in 8f3ef04b[1] was not merged to upstream bluez and thus I
had to reapply the hunk manually. Is it possible to push this hunk
upstream or should we look at a way to do this without patching the
upstream files?

I've attached the code change to this message.

Col


1.
commit 8f3ef04b4310bfbbe0aa8042585340e1832cacf6
Author: Luiz Augusto von Dentz luiz.dentz-...@nokia.com
Date:   Thu Oct 7 17:22:41 2010 +0300

bluetooth: Add support for Media API

Make use of D-Bus to transfer file descriptors.


-- 

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/]
 const char* pa_bluetooth_get_form_factor(uint32_t class);
diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
index 2e170f5..9537886 100644
--- a/src/modules/bluetooth/ipc.h
+++ b/src/modules/bluetooth/ipc.h
@@ -201,6 +201,34 @@ typedef struct {
 	uint8_t max_bitpool;
 } __attribute__ ((packed)) sbc_capabilities_t;

+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+typedef struct {
+	uint8_t channel_mode:4;
+	uint8_t frequency:4;
+	uint8_t allocation_method:2;
+	uint8_t subbands:2;
+	uint8_t block_length:4;
+	uint8_t min_bitpool;
+	uint8_t max_bitpool;
+} __attribute__ ((packed)) sbc_capabilities_raw_t;
+
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+typedef struct {
+	uint8_t frequency:4;
+	uint8_t channel_mode:4;
+	uint8_t block_length:4;
+	uint8_t subbands:2;
+	uint8_t allocation_method:2;
+	uint8_t min_bitpool;
+	uint8_t max_bitpool;
+} __attribute__ ((packed)) sbc_capabilities_raw_t;
+
+#else
+#error Unknown byte order
+#endif
+
 typedef struct {
 	codec_capabilities_t capability;
 	uint8_t channel_mode;
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 1/2] alsa-mixer: Implement constant volume.

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 17/03/11 10:23 did gyre and gimble:
 This change makes it possible to configure an arbitrary constant volume for a
 volume element in the path configuration, which is applied when the path is
 selected. Note: this is only useful when the exact hardware and driver are
 known beforehand.

OK, merged now.

Like you say, not overly useful in the standard case, but I can see this
being useful in the embedded word where the h/w is known and fixed.

Cheers

-- 

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] Get rid of some warnings

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 19/03/11 15:26 did gyre and gimble:
 Mostly warnings about unused stuff.
 Furthermore, the first hunk is a fix for the change in 177948a6.
 Finally, comment in AEC_dtd was translated and the code simplified slightly.

Thanks :)

 CC module_echo_cancel_la-adrian-aec.lo
 modules/echo-cancel/adrian-aec.h:360:15: warning: ‘AEC_getambient’ defined 
 but not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:368:14: warning: ‘AEC_setgain’ defined but 
 not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:374:14: warning: ‘AEC_setaes’ defined but 
 not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:377:16: warning: ‘AEC_max_dotp_xf_xf’ 
 declared ‘static’ but never defined [-Wunused-function]

Is the Adrian code ours or is it external in some capacity. Arun, if
it's external and we will update it periodically, can you do the
necessary to push where it needs to go? (Obviously the PA_GCC_UNUSED
cannot be pushed anywhere).

 CC module_echo_cancel_la-module-echo-cancel.lo
 modules/echo-cancel/module-echo-cancel.c: In function ‘time_callback’:
 modules/echo-cancel/module-echo-cancel.c:266:12: warning: variable ‘fs’ set 
 but not used [-Wunused-but-set-variable]

I made a couple tweaks here to use /* */ rather than // as is Lennart's
general desire (doesn't bother me personally but meh!)

So merged 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] Get rid of some more warnings

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 19/03/11 12:59 did gyre and gimble:
 Here are the last (relatively) easy fixes for compiler warnings.
 
 [PATCH 1/2] Get rid of some warnings: -Wunused-result
 [PATCH 2/2] Get rid of some warnings: -Wunsafe-loop-optimizations
 
 The war is not over yet, my friends.  Prepare for the final battle and we 
 shall be victorious!

The war is not over, but the troops on the frontline have their supplies
as this patch has been merged. :)

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 1/2] daemon: Fix missing include - cpu-orc.h

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Arun Raghavan at 19/03/11 12:01 did gyre and gimble:
 ---
  src/daemon/main.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
 
 diff --git a/src/daemon/main.c b/src/daemon/main.c
 index 533c4c3..f7aed51 100644
 --- a/src/daemon/main.c
 +++ b/src/daemon/main.c
 @@ -95,6 +95,7 @@
  #endif
  #include pulsecore/cpu-arm.h
  #include pulsecore/cpu-x86.h
 +#include pulsecore/cpu-orc.h
  
  #include cmdline.h
  #include cpulimit.h


Thanks, applied.

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 2/2] bluetooth: Fix alignment warning

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Arun Raghavan at 19/03/11 12:01 did gyre and gimble:
 While it seems to be common practice to just work around the cast to
 integer and assume alignment is fine, let's play it safe and do it right
 by memcpy'ing.

I've not applied this specific patch as I've just run make update-sbc
and that's pulled in upstream bluez changes that also included a similar
patch (it just reuses ret variable rather than introducing a new fd
var, but is otherwise the same.

Col

 ---
  src/modules/bluetooth/ipc.c |7 +--
  1 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/src/modules/bluetooth/ipc.c b/src/modules/bluetooth/ipc.c
 index dcecad8..fdca7a3 100644
 --- a/src/modules/bluetooth/ipc.c
 +++ b/src/modules/bluetooth/ipc.c
 @@ -106,8 +106,11 @@ int bt_audio_service_get_data_fd(int sk)
   for (cmsg = CMSG_FIRSTHDR(msgh); cmsg != NULL;
   cmsg = CMSG_NXTHDR(msgh, cmsg)) {
   if (cmsg-cmsg_level == SOL_SOCKET
 -  cmsg-cmsg_type == SCM_RIGHTS)
 - return (*(int *) CMSG_DATA(cmsg));
 +  cmsg-cmsg_type == SCM_RIGHTS) {
 + int fd;
 + memcpy(fd, CMSG_DATA(cmsg), sizeof(int));
 + return fd;
 + }
   }
  
   errno = EINVAL;


-- 

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] [WIP] Passthrough support

2011-03-20 Thread Arun Raghavan
On Sat, 2011-03-19 at 18:04 -0600, Kelly Anderson wrote:
 On 03/16/11 10:48, Arun Raghavan wrote:
  On Wed, 2011-03-16 at 11:19 +0530, Arun Raghavan wrote:
  [...]
  It will work, but not with paplay, only with the extended API when you
  create a non-PCM stream. I will rationalise the check for passthrough
  sink inputs in a bit, but for now, could you change the checks (there
  I've pushed a more comprehensive fix, so you shouldn't need to change
  that line and using paplay should work for you.
 
  -- Arun
 
 Arun,
 
 Hey, I just got around to testing without the following patch.  It 
 doesn't work.  I also didn't see any recent checkins in the passthrough 
 tree that would seem to affect this.  Is it possible the fix didn't get 
 pushed?

Yep. :| Pushed now.

Cheers,
Arun

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


Re: [pulseaudio-discuss] Merge of pavucontrol and paprefs

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 20/03/11 00:00 did gyre and gimble:
 With the approaching switch to freedesktop.org infrastructure, only
 pulseaudio and and pavucontrol are going to be migrated, if I
 understand it correctly. Of the other utils, paman and padevchooser
 were already deprecated for several years. (I have closed all the
 tickets as wontfix, to emphasize that point) Pavumeter has also seen
 very little development and is not so interesting.

Indeed. pavumeter is really just a toy that serves very little practical
purpose (if people want to create eyecandy meters, they'd make a nicer
GUI than pavumeter and the practical usage of the vumeter has been in
pavucontrol for a while).

 Paprefs however, is used quite a lot. I think Colin proposed merging
 it with pavucontrol. (and may be even mentioned already working on
 such a merge?)

Not so much worked on the merge itself, but rather a module for PA that
would deprecate gconf and thus allow such a merge to take place.

 I think Colin mentioned that he would like the gconf module to go. Can
 we make a plan for that?

Yeah sure. My only plans thus far were for a new module (module-loader)
and a protocol extension that allowed editing thereof. I stopped working
on it a long time about but did make a start on it. Can't remember
exactly how far I got with it.

In theory tho' it should be pretty simple.

This is all I've done so far. I've rebased it on current git master but
it may not compile (not tested).
http://colin.guthr.ie/git/pulseaudio/commit/?h=loaderid=c2dfa53322f902051b5cd816a8772e14babb4ceb


 Putting all the paprefs stuff on a new pavucontrol tab, or with the
 current configuration tab makes sense, I'd say. Any ideas on that?

I think a new dialog should be added with an Options... button added
to the Configuration tab. This new window can basically be the same as
the paprefs one initially. But I have zero strong opinions on this so
fully open to suggestions - just stating what was in my head.

 After the merge is done, may be it makes sense to rename the tool to
 pacontrol, as it is about much more than just controlling volumes. If
 we decide to do this, it makes sense to start with the fd.o git repo
 already renamed.

I'm not against a rename although adding a symlink on install for
pavucontrol binary name would probably be a nice courtesy.

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] Get rid of some warnings

2011-03-20 Thread Arun Raghavan
On Sun, 2011-03-20 at 13:12 +, Colin Guthrie wrote:
 'Twas brillig, and Maarten Bosmans at 19/03/11 15:26 did gyre and gimble:
  Mostly warnings about unused stuff.
  Furthermore, the first hunk is a fix for the change in 177948a6.
  Finally, comment in AEC_dtd was translated and the code simplified slightly.
 
 Thanks :)
 
  CC module_echo_cancel_la-adrian-aec.lo
  modules/echo-cancel/adrian-aec.h:360:15: warning: ‘AEC_getambient’ defined 
  but not used [-Wunused-function]
  modules/echo-cancel/adrian-aec.h:368:14: warning: ‘AEC_setgain’ defined but 
  not used [-Wunused-function]
  modules/echo-cancel/adrian-aec.h:374:14: warning: ‘AEC_setaes’ defined but 
  not used [-Wunused-function]
  modules/echo-cancel/adrian-aec.h:377:16: warning: ‘AEC_max_dotp_xf_xf’ 
  declared ‘static’ but never defined [-Wunused-function]
 
 Is the Adrian code ours or is it external in some capacity. Arun, if
 it's external and we will update it periodically, can you do the
 necessary to push where it needs to go? (Obviously the PA_GCC_UNUSED
 cannot be pushed anywhere).

The upstream code isn't actively developed, and if it does, I'm going to
have to do a manual merge anyway (since the original code was C++). So
all good here. :)

Cheers,
Arun

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


Re: [pulseaudio-discuss] [PATCH 2/9] Find modules and config files relative to the installed libraries.

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 19/03/11 12:47 did gyre and gimble:
 2011/3/18 Colin Guthrie gm...@colin.guthr.ie:
 'Twas brillig, and Maarten Bosmans at 16/03/11 09:55 did gyre and gimble:
 +#ifdef OS_IS_WIN32
 +{
 +char *toplevel = pa_win32_get_toplevel(NULL);
 +c-dl_search_path = pa_sprintf_malloc(%s PA_PATH_SEP lib 
 PA_PATH_SEP pulse-1.0 PA_PATH_SEP modules, toplevel);
 +}
 +#else

 Is there no nicer way to get this path than hard-coding pulse-1.0 here?
 
 Makes sense. I didn't do it before because PA_MAJORMINOR is not easily
 exported to a C define. I now used the fact that VERSION starts with
 major.minor-. A bit ugly, but this code is only to provide some sane
 default for the dl_search_path, before this patch you had to always
 specify it at the command line on Windows.

In version.h PA_MAJOR and PA_MINOR are defines which might be usable in
a slightly neater fashion? It can be fixed later tho' I've pulled this
branch as it is for now.

So this is also a merged your branch notification email.

Thanks as always :)

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 2/9] Find modules and config files relative to the installed libraries.

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Colin Guthrie at 20/03/11 13:13 did gyre and gimble:
 'Twas brillig, and Maarten Bosmans at 19/03/11 12:47 did gyre and gimble:
 2011/3/18 Colin Guthrie gm...@colin.guthr.ie:
 'Twas brillig, and Maarten Bosmans at 16/03/11 09:55 did gyre and gimble:
 +#ifdef OS_IS_WIN32
 +{
 +char *toplevel = pa_win32_get_toplevel(NULL);
 +c-dl_search_path = pa_sprintf_malloc(%s PA_PATH_SEP lib 
 PA_PATH_SEP pulse-1.0 PA_PATH_SEP modules, toplevel);
 +}
 +#else

 Is there no nicer way to get this path than hard-coding pulse-1.0 here?

 Makes sense. I didn't do it before because PA_MAJORMINOR is not easily
 exported to a C define. I now used the fact that VERSION starts with
 major.minor-. A bit ugly, but this code is only to provide some sane
 default for the dl_search_path, before this patch you had to always
 specify it at the command line on Windows.
 
 In version.h PA_MAJOR and PA_MINOR are defines which might be usable in
 a slightly neater fashion? 

As a coincidence, I had to make a similar change in paprefs a moment ago:

http://git.0pointer.de/?p=paprefs.git;a=commitdiff;h=d7589d48d26289f333fdd623a21e76c5fcb07c8d

-- 

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] XBMC - PulseAudio - passthrough ready for testing

2011-03-20 Thread Kelly Anderson
Not sure how many PulseAudio developers are interested, but here's my 
post in the Xbmc developer's forum.


OK, I've been burnin the midnight oil so I'm ready for others to test 
the results.


Download/build/install in order.

git://git.collabora.co.uk/git/user/arun/pulseaudio.git

git://github.com/cbxbiker61/audiofilter.git

git://github.com/cbxbiker61/xbmc.git

Configure xbmc with appropriate devices selected in System 
Settings/Audio, pulse audio devices show up with (pulse) extension.

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


[pulseaudio-discuss] More patches for OS X

2011-03-20 Thread Daniel Mack
Hi,

I'm catching up with my work on PulseAudio for OS X and have some
patches ready I would like to get merged.

Feedback welcome, as always.

Thanks,
Daniel

The following changes since commit f7acd4bdab7092700a9386802a0ec86d4362e58c:

  log: Add a new log target to a file descriptor (2011-03-18 12:32:51 +)

are available in the git repository at:
  git://github.com/zonque/pulseaudio.git osx

Daniel Mack (5):
  module-coreaudio-detect: fix pa__done()
  osx: re-order module locations
  osx: add -headerpad_max_install_names to LDFLAGS
  configure.ac: add --mac-universal directive for OS X
  osx: add routines for real-time thread scheduling

 configure.ac   |   13 +++
 src/Makefile.am|   11 --
 src/modules/{ = macosx}/module-bonjour-publish.c  |0
 .../module-coreaudio-detect.c  |5 +--
 .../module-coreaudio-device.c  |0
 src/pulsecore/core-util.c  |   37 +++-
 6 files changed, 58 insertions(+), 8 deletions(-)
 rename src/modules/{ = macosx}/module-bonjour-publish.c (100%)
 rename src/modules/{coreaudio = macosx}/module-coreaudio-detect.c (98%)
 rename src/modules/{coreaudio = macosx}/module-coreaudio-device.c (100%)

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


[pulseaudio-discuss] [PATCH 1/5] module-coreaudio-detect: fix pa__done()

2011-03-20 Thread Daniel Mack
From: Daniel Mack dan...@caiaq.de

This would have crashed when unloading the module.
---
 src/modules/coreaudio/module-coreaudio-detect.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/modules/coreaudio/module-coreaudio-detect.c 
b/src/modules/coreaudio/module-coreaudio-detect.c
index 1d26b84..fda1f17 100644
--- a/src/modules/coreaudio/module-coreaudio-detect.c
+++ b/src/modules/coreaudio/module-coreaudio-detect.c
@@ -231,13 +231,10 @@ fail:
 }
 
 void pa__done(pa_module *m) {
-struct userdata *u;
+struct userdata *u = m-userdata;
 struct ca_device *dev = u-devices;
 AudioObjectPropertyAddress property_address;
 
-pa_assert(m);
-pa_assert_se(u = m-userdata);
-
 property_address.mSelector = kAudioHardwarePropertyDevices;
 property_address.mScope = kAudioObjectPropertyScopeGlobal;
 property_address.mElement = kAudioObjectPropertyElementMaster;
-- 
1.7.1

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


[pulseaudio-discuss] [PATCH 5/5] osx: add routines for real-time thread scheduling

2011-03-20 Thread Daniel Mack
Code sniplets are based on examples provided by Apple. See
http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html
---
 src/pulsecore/core-util.c |   37 -
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index a713cae..5747f6e 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -107,6 +107,10 @@
 
 #ifdef __APPLE__
 #include xlocale.h
+#include mach/mach_init.h
+#include mach/thread_act.h
+#include mach/thread_policy.h
+#include sys/sysctl.h
 #endif
 
 #ifdef HAVE_DBUS
@@ -685,7 +689,38 @@ static int set_scheduler(int rtprio) {
  * the thread is already realtime, don't do anything. */
 int pa_make_realtime(int rtprio) {
 
-#ifdef _POSIX_PRIORITY_SCHEDULING
+#if defined(OS_IS_DARWIN)
+struct thread_time_constraint_policy ttcpolicy;
+uint64_t freq = 0;
+size_t size = sizeof(freq);
+int ret;
+
+ret = sysctlbyname(hw.cpufrequency, freq, size, NULL, 0);
+if (ret  0) {
+pa_log_info(Unable to read CPU frequency using sysctlbyname());
+return 0;
+}
+
+pa_log_debug(sysctl for hw.cpufrequency: %llu, freq);
+
+/* See 
http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html
 */
+ttcpolicy.period = freq / 160;
+ttcpolicy.computation = freq / 3300;
+ttcpolicy.constraint = freq / 2200;
+ttcpolicy.preemptible = 1;
+
+ret = thread_policy_set(mach_thread_self(),
+THREAD_TIME_CONSTRAINT_POLICY,
+(thread_policy_t) ttcpolicy,
+THREAD_TIME_CONSTRAINT_POLICY_COUNT);
+if (ret)
+pa_log_info(Unable to set real-time thread priority (%d)., ret);
+else
+pa_log_info(Successfully set real-time thread priority.);
+
+return ret;
+
+#elif _POSIX_PRIORITY_SCHEDULING
 int p;
 
 if (set_scheduler(rtprio) = 0) {
-- 
1.7.1

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


[pulseaudio-discuss] [PATCH 4/5] configure.ac: add --mac-universal directive for OS X

2011-03-20 Thread Daniel Mack
On a system with all depency libs built as multi-arch binaries, this
option can now be used to build fat Mach-O binaries for multiple
architectures.
---
 configure.ac |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5a78ffb..78b37c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,6 +169,11 @@ AC_ARG_ENABLE([atomic-arm-memory-barrier],
 esac
 ],)
 
+AC_ARG_ENABLE(mac-universal,
+AS_HELP_STRING([--enable-mac-universal], [Build Mac universal binaries]),
+   enable_mac_universal=$enableval, enable_mac_universal=no)
+
+
 AC_MSG_CHECKING([target operating system])
 case $host in
 *-*-linux*)
@@ -178,6 +183,14 @@ case $host in
 *-*-darwin*)
 AC_MSG_RESULT([darwin])
 pulse_target_os=darwin
+
+if test x$enable_mac_universal = xyes ; then
+   mac_version_min=-mmacosx-version-min=10.5
+mac_arches=-arch i386 -arch x86_64
+mac_sysroot=-isysroot /Developer/SDKs/MacOSX10.5.sdk
+LDFLAGS=$LDFLAGS $mac_arches $mac_sysroot $mac_version_min
+CFLAGS=$CFLAGS $CFLAGS $mac_arches $mac_sysroot 
$mac_version_min
+fi
 ;;
 *)
 AC_MSG_RESULT([unknown])
-- 
1.7.1

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


[pulseaudio-discuss] [PATCH 3/5] osx: add -headerpad_max_install_names to LDFLAGS

2011-03-20 Thread Daniel Mack
This is needed for sufficient padding of library names in linked
binaries.
---
 src/Makefile.am |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index ff98ddb..c182483 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,6 +82,11 @@ FOREIGN_CFLAGS = -w
 MODULE_LDFLAGS = $(AM_LDFLAGS) -module -disable-static -avoid-version 
$(LDFLAGS_NOUNDEFINED)
 MODULE_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la 
libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
 
+if OS_IS_DARWIN
+AM_LDFLAGS+=-headerpad_max_install_names
+MODULE_LDFLAGS+=-headerpad_max_install_names
+endif
+
 ###
 #  Extra files#
 ###
-- 
1.7.1

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


Re: [pulseaudio-discuss] [PATCH 1/5] module-coreaudio-detect: fix pa__done()

2011-03-20 Thread Tanu Kaskinen
On Sun, 2011-03-20 at 18:39 +0100, Daniel Mack wrote:
  void pa__done(pa_module *m) {
 -struct userdata *u;
 +struct userdata *u = m-userdata;
  struct ca_device *dev = u-devices;
  AudioObjectPropertyAddress property_address;
  
 -pa_assert(m);
 -pa_assert_se(u = m-userdata);
 -
  property_address.mSelector = kAudioHardwarePropertyDevices;
  property_address.mScope = kAudioObjectPropertyScopeGlobal;
  property_address.mElement = kAudioObjectPropertyElementMaster;

I think the old assertions were good. I'd rather initialize dev after
the assertions.

-- 
Tanu

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


Re: [pulseaudio-discuss] More patches for OS X

2011-03-20 Thread Tanu Kaskinen
On Sun, 2011-03-20 at 18:39 +0100, Daniel Mack wrote:
   osx: re-order module locations

This patch didn't reach the list for some reason.

-- 
Tanu

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


Re: [pulseaudio-discuss] [PATCH 3/5] osx: add -headerpad_max_install_names to LDFLAGS

2011-03-20 Thread Tanu Kaskinen
On Sun, 2011-03-20 at 18:39 +0100, Daniel Mack wrote:
 This is needed for sufficient padding of library names in linked
 binaries.
 ---
  src/Makefile.am |5 +
  1 files changed, 5 insertions(+), 0 deletions(-)
 
 diff --git a/src/Makefile.am b/src/Makefile.am
 index ff98ddb..c182483 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
 @@ -82,6 +82,11 @@ FOREIGN_CFLAGS = -w
  MODULE_LDFLAGS = $(AM_LDFLAGS) -module -disable-static -avoid-version 
 $(LDFLAGS_NOUNDEFINED)
  MODULE_LIBADD = $(AM_LIBADD) libpulsecore-@PA_MAJORMINOR@.la 
 libpulsecommon-@PA_MAJORMINOR@.la libpulse.la
  
 +if OS_IS_DARWIN
 +AM_LDFLAGS+=-headerpad_max_install_names
 +MODULE_LDFLAGS+=-headerpad_max_install_names
 +endif

If you put this block before MODULE_LDFLAGS is defined, then you don't
need to touch MODULE_LDFLAGS, because they include AM_LDFLAGS
automatically.

Cosmetic: spaces around += would be nice (it seems that it wasn't
entirely consistent before either...)

-- 
Tanu

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


Re: [pulseaudio-discuss] MacOS X Support

2011-03-20 Thread Stephen Lee
 Jep, I have plans to continue my work on the OS X port, and finish the 
 virtual audio driver I was working on. Currently, this is all just prove of 
 concept, but I'm confident that it will be really useful once it's finished.
 
 At the moment, I am travelling, but once I'm back in some weeks, I will 
 hopefully find some time to catch up with this project. I'll post updates on 
 this list, of course.
 
   Generally, what's the plan for being able to manipulate native
   MacOS X clients/streams via PA?  It'd be great to replace the
   AirTunes (AirPlay) functionality that Apple offers.  If this
   functionality is still a work in progress, is there a workaround?
  
   The workaround would be to use an audio player that output to
   PulseAudio, like vlc, rhythmbox, banshee, amarok, though I don't
   have a clue whether these are ported to OSX and are able to use
   libpulse there.
 
  While I don't know, I strongly suspect that VLC on mac is not compiled
  with PA support
 
 No, that would't make sense either. What we need is  generic way to get audio 
 from all CoreAudio applications, without modifing them. I'm working on this, 
 stay tuned :-)
 
You'll be my hero if you make a virtual audio driver.  Now, if that isn't 
incentive enough, then I don't know what is!  :)___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] how to capture both mic and line-out

2011-03-20 Thread Dolfy
Dear list members,

Any ideas on how to capture both line-in and line-out at the same time? Like to 
record a skype or other IM conversation.

Thx, Dolfy


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


Re: [pulseaudio-discuss] More patches for OS X

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Tanu Kaskinen at 20/03/11 18:07 did gyre and gimble:
 On Sun, 2011-03-20 at 18:39 +0100, Daniel Mack wrote:
   osx: re-order module locations
 
 This patch didn't reach the list for some reason.
 

Stuck in the queue. clearing now.

-- 

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 1/5] module-coreaudio-detect: fix pa__done()

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Daniel Mack at 20/03/11 17:39 did gyre and gimble:
 From: Daniel Mack dan...@caiaq.de
 
 This would have crashed when unloading the module.
 ---
  src/modules/coreaudio/module-coreaudio-detect.c |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)
 
 diff --git a/src/modules/coreaudio/module-coreaudio-detect.c 
 b/src/modules/coreaudio/module-coreaudio-detect.c
 index 1d26b84..fda1f17 100644
 --- a/src/modules/coreaudio/module-coreaudio-detect.c
 +++ b/src/modules/coreaudio/module-coreaudio-detect.c
 @@ -231,13 +231,10 @@ fail:
  }
  
  void pa__done(pa_module *m) {
 -struct userdata *u;
 +struct userdata *u = m-userdata;
  struct ca_device *dev = u-devices;
  AudioObjectPropertyAddress property_address;
  
 -pa_assert(m);
 -pa_assert_se(u = m-userdata);
 -
  property_address.mSelector = kAudioHardwarePropertyDevices;
  property_address.mScope = kAudioObjectPropertyScopeGlobal;
  property_address.mElement = kAudioObjectPropertyElementMaster;

From what I can see, most modules are still calling pa_assert(m) so it's
probably better to keep the assert in there and just move the dev =
u-devices line lower.

Other than that the other patches are all fine.

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] how to capture both mic and line-out

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Dolfy at 07/03/11 16:12 did gyre and gimble:
 Any ideas on how to capture both line-in and line-out at the same
 time? Like to record a skype or other IM conversation.

It's possible but not that easy. In an ideal world someone would write
module-combine-source but that doesn't exist at the moment.

In theory all you need to do is:
 0. Assume you mic is called my_mic and your output is called
my_output. Check with pacmd list-sinks and pacmd list-sources.
 1. Create a null sink. Call it null (pactl load-module
module-null-sink sink_name=null)
 2. Create a looback from your mic to the null sink. This means
everything you say will be played back on the null sink. (pactl
load-module module-loopback source=my_mic sink=null
 3. Create a loopback from your output's monitor to the null sink. This
means everything that is played back will be played on the null sink.
(pactl load-module module-loopback source=my_output.monitor sink=null)
 4. When you want to record the whole lot, you can simply record from
null.monitor and you'll get the combined output from both your mic and
what was played back on your card.

HTHs

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 1/5] module-coreaudio-detect: fix pa__done()

2011-03-20 Thread Daniel Mack
On Mar 20, 2011 7:15 PM, Colin Guthrie gm...@colin.guthr.ie wrote:

 'Twas brillig, and Daniel Mack at 20/03/11 17:39 did gyre and gimble:
  From: Daniel Mack dan...@caiaq.de
 
  This would have crashed when unloading the module.
  ---
   src/modules/coreaudio/module-coreaudio-detect.c |5 +
   1 files changed, 1 insertions(+), 4 deletions(-)
 
  diff --git a/src/modules/coreaudio/module-coreaudio-detect.c
b/src/modules/coreaudio/module-coreaudio-detect.c
  index 1d26b84..fda1f17 100644
  --- a/src/modules/coreaudio/module-coreaudio-detect.c
  +++ b/src/modules/coreaudio/module-coreaudio-detect.c
  @@ -231,13 +231,10 @@ fail:
   }
 
   void pa__done(pa_module *m) {
  -struct userdata *u;
  +struct userdata *u = m-userdata;
   struct ca_device *dev = u-devices;
   AudioObjectPropertyAddress property_address;
 
  -pa_assert(m);
  -pa_assert_se(u = m-userdata);
  -
   property_address.mSelector = kAudioHardwarePropertyDevices;
   property_address.mScope = kAudioObjectPropertyScopeGlobal;
   property_address.mElement = kAudioObjectPropertyElementMaster;

 From what I can see, most modules are still calling pa_assert(m) so it's
 probably better to keep the assert in there and just move the dev =
 u-devices line lower.

 Other than that the other patches are all fine.

Ok, can you add it back and amend the patch? I think that would be easier
than resending :-)

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


Re: [pulseaudio-discuss] how to capture both mic and line-out

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Dolfy at 07/03/11 16:12 did gyre and gimble:
 Any ideas on how to capture both line-in and line-out at the same
 time? Like to record a skype or other IM conversation.

It's possible but not that easy. In an ideal world someone would write
module-combine-source but that doesn't exist at the moment.

In theory all you need to do is:
 0. Assume you mic is called my_mic and your output is called
my_output. Check with pacmd list-sinks and pacmd list-sources.
 1. Create a null sink. Call it null (pactl load-module
module-null-sink sink_name=null)
 2. Create a looback from your mic to the null sink. This means
everything you say will be played back on the null sink. (pactl
load-module module-loopback source=my_mic sink=null
 3. Create a loopback from your output's monitor to the null sink. This
means everything that is played back will be played on the null sink.
(pactl load-module module-loopback source=my_output.monitor sink=null)
 4. When you want to record the whole lot, you can simply record from
null.monitor and you'll get the combined output from both your mic and
what was played back on your card.

HTHs

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 1/5] module-coreaudio-detect: fix pa__done()

2011-03-20 Thread Colin Guthrie
'Twas brillig, and Daniel Mack at 20/03/11 18:26 did gyre and gimble:
 Other than that the other patches are all fine.
 
 Ok, can you add it back and amend the patch? I think that would be
 easier than resending :-)

Yeah, no worries, editited in my tree. Tanu had a couple comments on
patches 3 and 5 tho' (you answered his comment on patch 4 already).

If you can comment on them I'll merge (and/or fix up as needed).

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] [PATCH] Get rid of some warnings

2011-03-20 Thread Maarten Bosmans
2011/3/20 Colin Guthrie gm...@colin.guthr.ie:
 'Twas brillig, and Maarten Bosmans at 19/03/11 15:26 did gyre and gimble:
 Mostly warnings about unused stuff.
 Furthermore, the first hunk is a fix for the change in 177948a6.
 Finally, comment in AEC_dtd was translated and the code simplified slightly.

 Thanks :)

 CC     module_echo_cancel_la-adrian-aec.lo
 modules/echo-cancel/adrian-aec.h:360:15: warning: ‘AEC_getambient’ defined 
 but not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:368:14: warning: ‘AEC_setgain’ defined but 
 not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:374:14: warning: ‘AEC_setaes’ defined but 
 not used [-Wunused-function]
 modules/echo-cancel/adrian-aec.h:377:16: warning: ‘AEC_max_dotp_xf_xf’ 
 declared ‘static’ but never defined [-Wunused-function]

 Is the Adrian code ours or is it external in some capacity. Arun, if
 it's external and we will update it periodically, can you do the
 necessary to push where it needs to go? (Obviously the PA_GCC_UNUSED
 cannot be pushed anywhere).

I checked that there were already a lot of changes in git after the
inital import, and Arun seems to confirm.
Arun: what is the license of those files?, it doesn't really say in
the header. May be a audit of all files/licenses should be done in
general?

Another thing what bothers me is that is apparantly wasn't clear to
both Colin and me which code is maintained externally and periodically
imported by us and which code was once imported and now maintained in
our tree. Am I right in thinking that only the stuff under
src/modules/bluetooth/sbc is external? Colin's download did seem to
affect some headers under src/modules/bluetooth though. We should
document this somewhere.

 CC     module_echo_cancel_la-module-echo-cancel.lo
 modules/echo-cancel/module-echo-cancel.c: In function ‘time_callback’:
 modules/echo-cancel/module-echo-cancel.c:266:12: warning: variable ‘fs’ set 
 but not used [-Wunused-but-set-variable]

 I made a couple tweaks here to use /* */ rather than // as is Lennart's
 general desire (doesn't bother me personally but meh!)

I used //, because that was already used to comment out the places fs
would be used. I think it makes sense to use /* */ exclusively for
textual comments on the workings of the code, but to allow // for
commenting out stuf (just like #ifdef 0), like it is used in
module-echo-cancel there. That way you have the ability to grep for //
and find locations of code that need some more work.

But of course my viewpoint is 'meh' enough not to care strongly either way.

 So merged now.

 Col

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


[pulseaudio-discuss] [PATCH] src/modules/module-tunnel.c: fix typo (s/passthough/passthrough/)

2011-03-20 Thread Paul Menzel
Date: Sun, 20 Mar 2011 23:00:19 +0100

---
 src/modules/module-tunnel.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 65fb67d..a8af6c1 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -1690,7 +1690,7 @@ static void setup_complete_callback(pa_pdispatch *pd, 
uint32_t command, uint32_t
 pa_tagstruct_put_boolean(reply, FALSE); /* relative volume */
 
 if (u-version = 18) {
-pa_tagstruct_put_boolean(reply, FALSE); /* passthough stream */
+pa_tagstruct_put_boolean(reply, FALSE); /* passthrough stream */
 #endif
 
 pa_pstream_send_tagstruct(u-pstream, reply);
-- 
1.7.4.1



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] src/modules/module-tunnel.c: remove unneeded `{`

2011-03-20 Thread Paul Menzel
Date: Sun, 20 Mar 2011 23:01:13 +0100

• fix up for

commit 36e7f8a92e8b340dd4034a39a655ba93bcd41886
Author: Colin Guthrie cguth...@mandriva.org
Date:   Sun Mar 20 14:09:14 2011 +

  tunnel: Fix tunnel streams with recent servers

  Prompted by bug #750. Thanks to Emil Renner Berthing for the 
original
  patch.
---
 src/modules/module-tunnel.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index a8af6c1..6cb22e0 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -1689,7 +1689,7 @@ static void setup_complete_callback(pa_pdispatch *pd, 
uint32_t command, uint32_t
 if (u-version = 17)
 pa_tagstruct_put_boolean(reply, FALSE); /* relative volume */
 
-if (u-version = 18) {
+if (u-version = 18)
 pa_tagstruct_put_boolean(reply, FALSE); /* passthrough stream */
 #endif
 
-- 
1.7.4.1



signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] src/modules/module-tunnel.c: remove unneeded `{`

2011-03-20 Thread Colin Guthrie
Gah, I'm an idiot!

Push a fix for this now. Thanks :)

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