Re: [pulseaudio-discuss] [announce] Rust bindings!

2018-06-12 Thread Tanu Kaskinen
On Mon, 2018-05-28 at 19:37 +0100, jnq...@gmail.com wrote:
> Hi everyone!
> 
> Back in February I released 'binding' and 'sys' crates for using
> pulseaudio from Rust code. I had intended to make an announcement here
> at the time, but I failed to do so, so I'm doing it now.
> 
> fyi, the 'sys' crates provide a simple description of the C interface;
> The 'binding' crates take this further, providing a cleaner/safer Rust
> interface.
> 
> I have provided separate crates for each PA system library (per Rust
> guidelines for 'sys' crates), thus totalling six in all:
> 
> [binding crates]
>  - libpulse-binding: https://crates.io/crates/libpulse-binding
>  - libpulse-simple-binding: https://crates.io/crates/libpulse-simple-bi
> nding
>  - libpulse-mainloop-glib-binding: https://crates.io/crates/libpulse-gl
> ib-binding
> [sys crates]
>  - libpulse-sys: https://crates.io/crates/libpulse-sys
>  - libpulse-simple-sys: https://crates.io/crates/libpulse-simple-sys
>  - libpulse-mainloop-glib-sys: https://crates.io/crates/libpulse-mainlo
> op-glib-sys
> 
> The 'binding' crates include plenty of documentation (taken from the C
> API). This can be built locally of course (cargo doc), but is also
> available online at docs.rs, example: https://docs.rs/libpulse-binding/
> 
> Long term I hope that the owners of the PA project itself would like to
> take over ownership and maintenance. Even longer term hopefully we will
> see PA itself converting to Rust - fyi the PA projects has my full
> consent to use this work of mine in converting PA itself.

Cool, thanks for the bindings! I'm afraid you'll have to keep
maintaining the bindings yourself for the foreseeable future - I don't
really want to take more work for myself at this point (I can of course
only talk only for myself, but I don't expect the other maintainers to
be enthusiastically adopting the bindings either). That said,
converting PA to Rust might very well be a good idea. From what I've
heard about combining Rust with C, such conversion could be done
gradually.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [patches] constification 2/2

2018-06-12 Thread Tanu Kaskinen
On Mon, 2018-05-28 at 01:49 +0100, jnq...@gmail.com wrote:
> Constification patch set ** 2 of 2 **
> 
> Collection of 15 patches constifying pointers in various parts of the
> API.
> 
> This collection of patches have no interdependencies, they can be
> applied in any order. They do *not* depend upon the 'constification
> 1/2' set, they can be applied independently.
> 
> fyi, I have not had an opportunity to compile them, but I don't see any
> obvious issue.

Thanks! Applied.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Error using with Echo Cancellation Module with VoIP

2018-06-12 Thread Tomaž Šolc

Hi Paul,

On 11. 06. 2018 16:43, Dferop Aero wrote:

I have always the same error when i use the Echo Cancellation
Module.


I'm seeing these kinds of errors constantly with module-echo-cancel
(also running on ARM):

module-echo-cancel.c: Doing resync
module-echo-cancel.c: Playback too far ahead (22312), drop source 2
852
module-echo-cancel.c: Doing resync
module-echo-cancel.c: Playback after capture (-1309936), drop sink
167708

I don't know what their cause is, but for me they don't seem to be
causing any noticeable audio quality problems.

I do find the current state of echo cancellation in Pulseaudio unusable,
but that seems to be due to the echo cancellation algorithm not working
properly for my use case. It might be the same for you.

I've made an updated libwebrtc-audio-processing and a patched
module-echo-cancel that works significantly better for me. I've sent it
out to this list three months ago without much response.

You might want to try it if it helps with your problems. You can get the
code here (both should build with "dpkg-buildpackage" on debian-like
systems):

https://github.com/avian2/webrtc-audio-processing/tree/debian

https://github.com/avian2/pulseaudio/tree/debian

Best regards
Tomaž
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Problem to receive RTP stream from ffmpeg

2018-06-12 Thread Antoine Vacher
Hello,

Any idea? I am still not figuring out what's wrong in my setup.

Thanks,

Antoine

- Mail original -
De: "Antoine Vacher" 
À: "pulseaudio-discuss" 
Envoyé: Mercredi 6 Juin 2018 20:41:10
Objet: [pulseaudio-discuss] Problem to receive RTP stream from ffmpeg

Hello,

I struggle to perform my house audio setup. Let me explain:

I have at home a raspberry pi with a USB microphone running under raspbian. 
Pulseaudio is not (and cannot) be installed on it. I stream the microphone with 
ffmpeg with the following command:

arecord -D pcm.duplex -c2 -r 48000 -f S32_LE -t wav -V mono | avconv -i - 
-acodec libmp3lame -b 32k -f rtp rtp://225.5.5.5:1234/4

The streaming works correctly as I can listen to the audio from my laptop with 
the following command:

ffplay rtp://225.5.5.5:1234

Now I have a home server where I have a tool that needs to use "rec" to work. 
Therefore I want to create a RTP source for the RTP stream and forward it to 
"rec" as default input.

I checked with cli-visualizer script (configured for pulseaudio) and the 
following command works on the home server:

ffplay rtp://225.5.5.5:1234 -nodisp

Pulseaudio runs in system mode on the server, I tried to create a RTP source in 
/etc/pulse/system.pa by adding

load-module module-null-sink sink_name=rtp
load-module module-rtp-recv sink=rtp sap_address=225.5.5.5
set-default-source rtp.monitor

There is no speakers on the server so I cannot verify if sound is played, 
however if I run cli-visualizer then there is no activity so my guess is that 
RTP stream is not captured by pulseaudio.

Do you see what I miss?

There is a lot of tutorials to stream RTP *from* pulseaudio, but there is a lot 
less help to send a RTP stream *to* pulseaudio that is not coming from another 
pulseaudio.

Thanks!

Antoine

--
Antoine Vacher
mail/jabber: antoine.vac...@tigre-bleu.net
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Problem to receive RTP stream from ffmpeg

2018-06-12 Thread Russell Treleaven
Is ffplay sending sap advertisements?

On Tue, Jun 12, 2018, 11:12 AM Antoine Vacher 
wrote:

> Hello,
>
> Any idea? I am still not figuring out what's wrong in my setup.
>
> Thanks,
>
> Antoine
>
> - Mail original -
> De: "Antoine Vacher" 
> À: "pulseaudio-discuss" 
> Envoyé: Mercredi 6 Juin 2018 20:41:10
> Objet: [pulseaudio-discuss] Problem to receive RTP stream from ffmpeg
>
> Hello,
>
> I struggle to perform my house audio setup. Let me explain:
>
> I have at home a raspberry pi with a USB microphone running under
> raspbian. Pulseaudio is not (and cannot) be installed on it. I stream the
> microphone with ffmpeg with the following command:
>
> arecord -D pcm.duplex -c2 -r 48000 -f S32_LE -t wav -V mono | avconv -i -
> -acodec libmp3lame -b 32k -f rtp rtp://225.5.5.5:1234/4
>
> The streaming works correctly as I can listen to the audio from my laptop
> with the following command:
>
> ffplay rtp://225.5.5.5:1234
>
> Now I have a home server where I have a tool that needs to use "rec" to
> work. Therefore I want to create a RTP source for the RTP stream and
> forward it to "rec" as default input.
>
> I checked with cli-visualizer script (configured for pulseaudio) and the
> following command works on the home server:
>
> ffplay rtp://225.5.5.5:1234 -nodisp
>
> Pulseaudio runs in system mode on the server, I tried to create a RTP
> source in /etc/pulse/system.pa by adding
>
> load-module module-null-sink sink_name=rtp
> load-module module-rtp-recv sink=rtp sap_address=225.5.5.5
> set-default-source rtp.monitor
>
> There is no speakers on the server so I cannot verify if sound is played,
> however if I run cli-visualizer then there is no activity so my guess is
> that RTP stream is not captured by pulseaudio.
>
> Do you see what I miss?
>
> There is a lot of tutorials to stream RTP *from* pulseaudio, but there is
> a lot less help to send a RTP stream *to* pulseaudio that is not coming
> from another pulseaudio.
>
> Thanks!
>
> Antoine
>
> --
> Antoine Vacher
> mail/jabber: antoine.vac...@tigre-bleu.net
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] PulseAudio Crash GDB log

2018-06-12 Thread Sathish Narasimman
Hi,

I am trying to establish SCO connection between 2 latops.

Handsfree profile
Laptop 1 - Hanndsfree AG
Laptop 2 Handsfree only

In Lap 1 I am getting this error when trying to pair and connect.
During connection time the PA crashes.

NOTE: using ofono backend

Thanks,
Sathish N

On Tue, Jun 12, 2018 at 11:55 PM, Georg Chini  wrote:

> On 12.06.2018 19:31, Sathish Narasimman wrote:
>
>> Hi,
>>
>> May I please, know what is wrong in the log
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x71469664 in loopback_process_msg_cb (o=0x87428, code=1, userdata=0x0,
>> offset=0, chunk=0x0) at modules/module-loopback.c:1161
>> 1161current_latency = pa_sink_get_requested_latency(
>> u->sink_input->sink);
>> (gdb) bt
>> #0  0x71469664 in loopback_process_msg_cb (o=0x87428, code=1,
>> userdata=0x0,
>> offset=0, chunk=0x0) at modules/module-loopback.c:1161
>> #1  0x76f0f4cc in pa_asyncmsgq_dispatch (object=0x87428, code=1,
>> userdata=0x0,
>> offset=0, memchunk=0x7efff2ac) at pulsecore/asyncmsgq.c:323
>> #2  0x76f93478 in asyncmsgq_read_cb (api=0x373f4, e=0xf4ea0, fd=14,
>> events=PA_IO_EVENT_INPUT, userdata=0xf43f8) at
>> pulsecore/thread-mq.c:69
>> #3  0x76e0d8ec in dispatch_pollfds (m=0x373b0) at pulse/mainloop.c:655
>> #4  0x76e0eb4c in pa_mainloop_dispatch (m=0x373b0) at pulse/mainloop.c:898
>> #5  0x76e0ed84 in pa_mainloop_iterate (m=0x373b0, block=1,
>> retval=0x7efff4fc)
>> at pulse/mainloop.c:929
>>
>> Under which conditions does that happen? Which version of PA are you
> using?
>
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] PulseAudio Crash GDB log

2018-06-12 Thread Georg Chini

On 12.06.2018 19:31, Sathish Narasimman wrote:

Hi,

May I please, know what is wrong in the log

Program received signal SIGSEGV, Segmentation fault.
0x71469664 in loopback_process_msg_cb (o=0x87428, code=1, userdata=0x0,
    offset=0, chunk=0x0) at modules/module-loopback.c:1161
1161                current_latency = 
pa_sink_get_requested_latency(u->sink_input->sink);

(gdb) bt
#0  0x71469664 in loopback_process_msg_cb (o=0x87428, code=1, 
userdata=0x0,

    offset=0, chunk=0x0) at modules/module-loopback.c:1161
#1  0x76f0f4cc in pa_asyncmsgq_dispatch (object=0x87428, code=1, 
userdata=0x0,

    offset=0, memchunk=0x7efff2ac) at pulsecore/asyncmsgq.c:323
#2  0x76f93478 in asyncmsgq_read_cb (api=0x373f4, e=0xf4ea0, fd=14,
    events=PA_IO_EVENT_INPUT, userdata=0xf43f8) at 
pulsecore/thread-mq.c:69

#3  0x76e0d8ec in dispatch_pollfds (m=0x373b0) at pulse/mainloop.c:655
#4  0x76e0eb4c in pa_mainloop_dispatch (m=0x373b0) at pulse/mainloop.c:898
#5  0x76e0ed84 in pa_mainloop_iterate (m=0x373b0, block=1, 
retval=0x7efff4fc)

    at pulse/mainloop.c:929


Under which conditions does that happen? Which version of PA are you using?
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] PulseAudio Crash GDB log

2018-06-12 Thread Sathish Narasimman
Hi,

May I please, know what is wrong in the log

Program received signal SIGSEGV, Segmentation fault.
0x71469664 in loopback_process_msg_cb (o=0x87428, code=1, userdata=0x0,
offset=0, chunk=0x0) at modules/module-loopback.c:1161
1161current_latency =
pa_sink_get_requested_latency(u->sink_input->sink);
(gdb) bt
#0  0x71469664 in loopback_process_msg_cb (o=0x87428, code=1, userdata=0x0,
offset=0, chunk=0x0) at modules/module-loopback.c:1161
#1  0x76f0f4cc in pa_asyncmsgq_dispatch (object=0x87428, code=1,
userdata=0x0,
offset=0, memchunk=0x7efff2ac) at pulsecore/asyncmsgq.c:323
#2  0x76f93478 in asyncmsgq_read_cb (api=0x373f4, e=0xf4ea0, fd=14,
events=PA_IO_EVENT_INPUT, userdata=0xf43f8) at pulsecore/thread-mq.c:69
#3  0x76e0d8ec in dispatch_pollfds (m=0x373b0) at pulse/mainloop.c:655
#4  0x76e0eb4c in pa_mainloop_dispatch (m=0x373b0) at pulse/mainloop.c:898
#5  0x76e0ed84 in pa_mainloop_iterate (m=0x373b0, block=1,
retval=0x7efff4fc)
at pulse/mainloop.c:929


Regards,
Sathish N
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [announce] Rust bindings!

2018-06-12 Thread jnqnfe
On Tue, 2018-06-12 at 11:22 +0300, Tanu Kaskinen wrote:
> On Mon, 2018-05-28 at 19:37 +0100, jnq...@gmail.com wrote:
> > Hi everyone!
> > 
> > Back in February I released 'binding' and 'sys' crates for using
> > pulseaudio from Rust code. I had intended to make an announcement
> > here
> > at the time, but I failed to do so, so I'm doing it now.
> > 
> > fyi, the 'sys' crates provide a simple description of the C
> > interface;
> > The 'binding' crates take this further, providing a cleaner/safer
> > Rust
> > interface.
> > 
> > I have provided separate crates for each PA system library (per
> > Rust
> > guidelines for 'sys' crates), thus totalling six in all:
> > 
> > [binding crates]
> >  - libpulse-binding: https://crates.io/crates/libpulse-binding
> >  - libpulse-simple-binding: https://crates.io/crates/libpulse-simpl
> > e-bi
> > nding
> >  - libpulse-mainloop-glib-binding: https://crates.io/crates/libpuls
> > e-gl
> > ib-binding
> > [sys crates]
> >  - libpulse-sys: https://crates.io/crates/libpulse-sys
> >  - libpulse-simple-sys: https://crates.io/crates/libpulse-simple-sy
> > s
> >  - libpulse-mainloop-glib-sys: https://crates.io/crates/libpulse-ma
> > inlo
> > op-glib-sys
> > 
> > The 'binding' crates include plenty of documentation (taken from
> > the C
> > API). This can be built locally of course (cargo doc), but is also
> > available online at docs.rs, example: https://docs.rs/libpulse-bind
> > ing/
> > 
> > Long term I hope that the owners of the PA project itself would
> > like to
> > take over ownership and maintenance. Even longer term hopefully we
> > will
> > see PA itself converting to Rust - fyi the PA projects has my full
> > consent to use this work of mine in converting PA itself.
> 
> Cool, thanks for the bindings! I'm afraid you'll have to keep
> maintaining the bindings yourself for the foreseeable future - I
> don't
> really want to take more work for myself at this point (I can of
> course
> only talk only for myself, but I don't expect the other maintainers
> to
> be enthusiastically adopting the bindings either). That said,
> converting PA to Rust might very well be a good idea. From what I've
> heard about combining Rust with C, such conversion could be done
> gradually.

Ok no problem :)

I am very glad to hear that you are open to a Rust conversion. I'm very
busy at the moment, but I have given a little thought to it over the
past few days; perhaps I will try to tackle it at some point.
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] cli-command: Report error in pa_play_file.

2018-06-12 Thread Tanu Kaskinen
On Tue, 2018-05-29 at 09:22 +0200, Tomaz Solc wrote:
> Current code does not check whether pa_play_file call failed. Hence no error 
> is
> reported in the cli interface if playback failed because e.g. file isn't
> readable by the daemon.
> ---
>  src/pulsecore/cli-command.c | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
> index 44795b0d..db09e5dc 100644
> --- a/src/pulsecore/cli-command.c
> +++ b/src/pulsecore/cli-command.c
> @@ -1282,7 +1282,12 @@ static int pa_cli_command_play_file(pa_core *c, 
> pa_tokenizer *t, pa_strbuf *buf,
>  return -1;
>  }
>  
> -return pa_play_file(sink, fname, NULL);
> +if (pa_play_file(sink, fname, NULL)) {
> +pa_strbuf_puts(buf, "Failed to play sound file.\n");
> +return -1;
> +}
> +
> +return 0;
>  }
>  
>  static int pa_cli_command_list_shared_props(pa_core *c, pa_tokenizer *t, 
> pa_strbuf *buf, bool *fail) {

Thanks! Applied to the "next" branch.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] alsa-mixer: Don't move LFE in 2.1 and 4.1 modes on SB Omni Surround 5.1

2018-06-12 Thread Tanu Kaskinen
On Fri, 2018-06-01 at 13:38 +0300, Nazar Mokrynskyi wrote:
> A bit hacky approach, but it allows to preserve LFE output position
> even in reduced output modes 2.1 and 4.1.
> 
> Signed-off-by: Nazar Mokrynskyi 
> ---
>  src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf 
> b/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
> index 11985bb3..d5d1d653 100644
> --- a/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
> +++ b/src/modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf
> @@ -42,7 +42,7 @@ direction = output
>  
>  [Mapping analog-surround-21]
>  device-strings = surround51:%f
> -channel-map = front-left,front-right,lfe
> +channel-map = front-left,front-right,aux1,aux2,aux3,lfe
>  paths-output = analog-output
>  direction = output
>  
> @@ -54,7 +54,7 @@ direction = output
>  
>  [Mapping analog-surround-41]
>  device-strings = surround51:%f
> -channel-map = front-left,front-right,rear-left,rear-right,lfe
> +channel-map = front-left,front-right,rear-left,rear-right,aux1,lfe
>  paths-output = analog-output
>  direction = output
>  

Thanks! Applied to the "next" branch.

-- 
Tanu

https://liberapay.com/tanuk
https://www.patreon.com/tanuk
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss