Re: [pulseaudio-discuss] [PATCH 00/10] Enable building for win32

2011-01-06 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 06/01/11 01:39 did gyre and gimble:
 This patch series makes Pulseaudio compile for Windows using mingw.  
 Moverover,
 pacat and pactl actually work on Windows.  A running daemon is something to do
 another time. (Pierre, are you still interested in this?)
 
 It should be farily noncontroversial, as most changes should not affect
 operation on Linux.

Wow, awesome work!

I'll review and apply/comment shortly.

Many 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] Implement Fortemedia SMA processing.

2011-01-06 Thread Colin Guthrie
Hi Alban,

'Twas brillig, and Alban Browaeys at 06/01/11 00:32 did gyre and gimble:
 From 853a4d96bf2624ef30f86cf4819382949d039c87 Mon Sep 17 00:00:00 2001
 From: Alban Browaeys pra...@yahoo.com
 Date: Wed, 5 Jan 2011 17:13:04 +0100
 Subject: [PATCH] Implement Fortemedia SMA processing.
 
 Those small array microphones returns two channels of opposite
 phase thus the default remap in pulseaudio doing the sum output
 silence.


Many thanks for this patch, it's very interesting, especially as I've
been helping a couple folk with mics that appear to be 180 deg OOP
recently (although this could be an unrelated issue, see:
https://qa.mandriva.com/show_bug.cgi?id=55930 and
http://blog.moncef-mechri.com/?p=124 to see if you think this is a
similar issue)

Can you explain how to use the module and what users need to do to make
it work?

Many 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 04/10] Use pa_* instead of generic functions to improve portability

2011-01-06 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 06/01/11 01:39 did gyre and gimble:
 ---
  src/pulse/context.c |2 +-
  src/pulse/thread-mainloop.c |2 +-
  src/pulsecore/inet_ntop.c   |3 ++-
  src/pulsecore/inet_pton.c   |4 +++-
  src/tests/asyncq-test.c |2 +-
  src/tests/rtstutter.c   |3 ++-
  6 files changed, 10 insertions(+), 6 deletions(-)
 
 diff --git a/src/pulse/context.c b/src/pulse/context.c
 index ca81650..7ede8a2 100644
 --- a/src/pulse/context.c
 +++ b/src/pulse/context.c
 @@ -578,7 +578,7 @@ static char *get_old_legacy_runtime_dir(void) {
  if (!pa_get_user_name(u, sizeof(u)))
  return NULL;
  
 -p = pa_sprintf_malloc(/tmp/pulse-%s, u);
 +p = pa_sprintf_malloc(%s/pulse-%s, pa_get_temp_dir(), u);

I'm not sure this is correct. pa_get_temp_dir() might return $HOME/tmp
(it does here) so this path is not correct (it is the old legacy runtime
dir after all). There was some talk to disable this anyway so it may be
worth just dropping the code (there is a configure switch for it
already IIRC). That can be in another patch tho' (after discussion), so
possibly just remove this hunk for now.


 diff --git a/src/pulsecore/inet_ntop.c b/src/pulsecore/inet_ntop.c
 index 1948f0f..a83c177 100644
 --- a/src/pulsecore/inet_ntop.c
 +++ b/src/pulsecore/inet_ntop.c
 @@ -38,7 +39,7 @@ const char *inet_ntop(int af, const void *src, char *dst, 
 socklen_t cnt) {
  struct in6_addr *in6 = (struct in6_addr*)src;
  #endif
  
 -assert(src  dst);
 +pa_assert(src  dst);

It would make sense to make these two separate asserts so we know which
one fails if it is ever triggered but that's not directly your fault :)

 diff --git a/src/pulsecore/inet_pton.c b/src/pulsecore/inet_pton.c
 index 041902a..9f48a3a 100644
 --- a/src/pulsecore/inet_pton.c
 +++ b/src/pulsecore/inet_pton.c
 @@ -37,7 +39,7 @@ int inet_pton(int af, const char *src, void *dst) {
  struct in6_addr *in6 = (struct in6_addr*)dst;
  #endif
  
 -assert(src  dst);
 +pa_assert(src  dst);

ditto

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] USB audio devices muted at non-zero volume

2011-01-06 Thread David Henningsson

On 2011-01-06 15:31, Colin Guthrie wrote:

Hi Marius

'Twas brillig, and Marius Bjørnstad at 06/01/11 12:39 did gyre and gimble:

The devices below are muted at a volume greater than 0. This causes a
significant portion of the volume in Pulseaudio to be equal to zero (muted).

0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius
G-Talk)

0b05:1743 ASUSTek Computer, Inc. Xonar U1 Audio Station

The asus card is muted at volume 1,
the Plantronics ( C-Media ) is muted at volume 2. Both volumes are in
alsamixer.

Is there any way to fix this in Pulseaudio (some kind of quirks
database, for example)?


This isn't an uncommon thing, but it's getting better.

The problem is very likely that the device is incorrectly reporting it's
dB range and thus PA cannot control it correctly. It's possible to add
quirks in the driver to correct the range.

http://www.pulseaudio.org/wiki/BadDecibel
http://mailman.alsa-project.org/pipermail/alsa-devel/2010-February/025213.html

David Henningsson from Canonical also wrote a similar tool:
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7542

I'm not sure off hand what the latest version of that tool is or if
there is a proper webpage for it. David, can you elaborate?


No, there isn't one. Here's the latest version:

https://launchpad.net/~diwic/+archive/maverick (for Ubuntu 10.10)
https://launchpad.net/~diwic/+archive/ppa (for Ubuntu 10.04)
https://launchpad.net/~diwic/+archive/ppa/+files/alsamixertest_48.11.tar.gz 
(for other distros)


It currently tests playback only. Before it makes sense to test 
recording as well, we'll have to fix up the input mixer paths in 
PulseAudio. I'm currently working on that, and making good progress.


--
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] Implement Fortemedia SMA processing.

2011-01-06 Thread David Henningsson

On 2011-01-06 01:32, Alban Browaeys wrote:

 From 853a4d96bf2624ef30f86cf4819382949d039c87 Mon Sep 17 00:00:00 2001
From: Alban Browaeyspra...@yahoo.com
Date: Wed, 5 Jan 2011 17:13:04 +0100
Subject: [PATCH] Implement Fortemedia SMA processing.

Those small array microphones returns two channels of opposite
phase thus the default remap in pulseaudio doing the sum output
silence.


Sounds very useful, but...


+void pa_fmaudiosma_run(pa_fmaudiosma *fs, const uint8_t *rec, uint8_t *out, 
int n) {
+unsigned i;
+
+float *d, *s;
+int n_frames = n / (sizeof(float) *  2);
+memset(out, 0, n_frames * sizeof (float) * 2);
+
+d = (float *)out;
+s = (float *)rec;
+for (i = n_frames; i  0; i--, s += 2, d += 2)
+   d[0] = d[1] = s[0] - (s[0] + s[1]);


s[0] - (s[0] + s[1]) can be simplified to -s[1], unless my junior 
high math fails me completely. Are you sure you don't mean s[0] - s[1]?


--
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