Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Loading Pulseaudio module in local.d problem [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nobby
n00b
n00b


Joined: 07 Feb 2019
Posts: 2

PostPosted: Thu Feb 07, 2019 6:36 pm    Post subject: Loading Pulseaudio module in local.d problem [SOLVED] Reply with quote

Hi having some trouble loading module for echo cancellation in local.d script.

This works on the command line:
Code:
pactl load-module module-echo-cancel aec_method=webrtc


This is the script in local.d:
Code:
#!/bin/bash
echo Starting echo cancellation
/usr/bin/pactl load-module module-echo-cancel aec_method=webrtc


And it's permissions:
Code:
-rwxr--r-- 1 root root 108 Feb  7 18:29 echoCancellation.start


The script runs ok from the command line:
Code:
/etc/local.d # ./echoCancellation.start
Starting echo cancellation
34


This is the failure when I restart the local service:
Code:
# /etc/init.d/local restart
 * Stopping local ...                                                     [ ok ]
 * Starting local ...
 *   Executing "/etc/local.d/echoCancellation.start" ...
Starting echo cancellation
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
 *   Execution of "/etc/local.d/echoCancellation.start" failed.           [ !! ]


It's clearly not permissions or anything like that as the error indicates pactl is executing.

Any ideas please?


Last edited by nobby on Wed Mar 06, 2019 11:29 am; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5593

PostPosted: Fri Feb 15, 2019 1:30 am    Post subject: Reply with quote

You'll need to inform pactl how to find the server, since it's unlikely you're also running the server as root. The easiest way to do that would be to load module-native-protocol-tcp on a loopback address and point pactl to that.

On second thought… why not just load module-echo-cancel in the server configuration file? man 5 default.pa
Back to top
View user's profile Send private message
nobby
n00b
n00b


Joined: 07 Feb 2019
Posts: 2

PostPosted: Wed Mar 06, 2019 11:29 am    Post subject: Reply with quote

Hi Ant P.

I added load-module module-echo-cancel aec_method=webrtc to the end of /etc/pulse/default.pa and no change. I tried it just before the section about auto-loading of filters (such as echo cancellation) and this fixed it:

Code:

...

### Cork music/video streams when a phone stream is active
load-module module-role-cork

# Load echo cancellation module
load-module module-echo-cancel aec_method=webrtc

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

### Make some devices default
#set-default-sink output
#set-default-source input


Thanks for your tips! I'll mark this as solved when I work out how to. :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum