Ping to the list: Darkice from raspbian repositories is not compiled with
pulseaudio support. I assist Joel now with self-compiling darkice with PA
support :) But I think that's not of interest for the list.
Regards,
Daniel
2017-03-21 17:25 GMT+01:00 <24@xxxxxxxxxxxxx>:
Hi Daniel,
I am not sure what you mean by "Is your darkice really compiled with
pulseaudio support?" I started with the latest Raspbian image that had
pulseaudio included in the image. I did not install pulseaudio separately.
I then installed darkice on this latest Raspbian image. I then added the
compressor and limiter to the existing pulseaudio that came with the
Raspbian.
If I did this wrong please let me know.
The thing about using device = pulseaudio, could I have had gotten the
"Unknown PCM pulseaudio" error with
the options in pavucontrol set incorrectly? I was going to try using
device = pulseaudio and paSourceName = default then play with the
configuration in pavucontrol. Also I did not have paSourceName = default
when I got the "Unknown PCM pulseaudio" error.
I will let you know what I find out.
Daniel, I really appreciate your support.
Joel Goodwin
---- Daniel Eckl <daniel.eckl@xxxxxxxxx> wrote:
After one night of sleep I thought about your darkice error messages andleast
the device configuration types you tried already. I now realised that you
already tried device=pulseaudio. I think that should have worked, at
it does for me. So I thought about other reasons why this connectionmight
fail.Alsa
One possibility is: Is your darkice really compiled with pulseaudio
support? If not, then all your tries with device=pulseaudio will fail.
has a pulse plugin where an application can connect via alsa which isthen
sent to pulseaudio. My suggestion: avoid that whenever possible. Justhave
another layer with possibilities for delays, buffer issues and weirdness.
Another possibility: If your darkice has pulseaudio support, then you
to make sure, it is allowed to connect to pulseaudio daemon. Since thisway
automatically works through cookies in $HOME/.config/pulse, the easiest
is to start pulseaudio from the same user as darkice afterwards. Then itto
should "just work". There are possibilities to use a system daemon
pulseaudio running as root, but it makes things complicated. If you need
fight with that, pulseaudio client libraries can be controlled with somehave
environment variables to tell it where it finds the pulseaudio socket and
stuff.
Regards,
Daniel
Am 20.03.2017 22:23 schrieb "Daniel Eckl" <daniel.eckl@xxxxxxxxx>:
Hi Joel,
let's see what I can come up with. First: You are right, you want to
send/receivepulseaudio to get exclusive access to your soundcard using alsa. Every
other application afterwards has to connect to pulseaudio to
youaudio. So be sure to make this work first. Your pulseaudio is working,
tab ofalready see the audio from (i guess) line-in at the "input devices"
pulseaudiopavucontrol. That's good. That "input" is called a "source" in
pulseaudio nowording.
Let's first try to make it work without compressor.
This input section in darkice.conf should connect darkice to
butmatter how your source is named. It may connect to the wrong source,
itnevermind at the beginning:
[input]
device = pulseaudio
paSourceName = default
sampleRate = 44100
bitsPerSample = 16
channel = 2
When you start darkice you now should see it in your "Recording" tab of
pavucontrol. Check if it uses the right source and if not, just switch
Thento the right one. Now you should have the status quo again, just with
pulseaudio as your center piece.
Now we take care of the compressor. First you have to have the needed
ladspa plugins installed. On Ubuntu this is the package "swh-plugins".
says, itI guess in the end you want the setup to be scripted, so we now go to
console.
Pulseaudio now has the module called "ladspa-sink". As the module
know, youis a sink, like an output device. You can play something to it. I
takeshave no player, but an input stream. We solve that later.
We now build a little audio chain, and we build it from end to start.
First I create a null sink. This is a virtual output "device" that
createausio and discards it. Simply useless, right? Well, wait :)
# pactl load-module module-null-sink sink_name=nullstream
Now we create a ladspa-sink that can receive audio, runs the compressor
over it and sends it to the null sink
# pactl load-module module-ladspa-sink sink_name=ladspa_compressor
master=nullstream plugin=dyson_compress_1403 label=dysonCompress
control=0,1,0.5,0.99
Now we want a ladspa limiter running before the compressor. So we
it toanother sink receiving audio, running the limiter over it and sending
sourcethe compressor:
# pactl load-module module-ladspa-sink sink_name=ladspa_limiter
master=ladspa_compressor plugin=fast_lookahead_limiter_1913
label=fastLookaheadLimiter control=10,0,0.8
So now we can send audio to the Limiter, this sends the audio to the
compressor and that send the audio to the null sink that discards it.
Now we want the audio from the line-in souce to be sent to the limiter.
For that we use the "loopback" module. It takes audio from a source and
sends it to a sink. But we need to be able to exactly tell it which
withhe need to use.
# pactl list sources short
For me the output looks like this (probably scrambled by email
representation):
0 alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz RUNNING
1 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz RUNNING
2 alsa_input.pci-0000_00_1b.0.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz RUNNING
The first 2 sources with their names containing "output" and ending
that".monitor" are irrelevant for you now. There you can "wiretap" sound
theis being played to this device (pulseaudio calls that "sink"). We want
"alsa_input.pci-0000_00_1b.0.real input. In my case it's the last line, this is the line-in of my
built-in soundcard. So for me the source is
1b.0.analog-stereoanalog-stereo"
So the loopback looks this way for me (you use your real source):
# pactl load-module module-loopback source=alsa_input.pci-0000_00_
nullstreamsink=ladspa_limiter
Great, the audio flows from source to limiter to compressor to
sourceand... is gone.
Now we remember the ".monitor" sources. Every sink has a ".monitor"
attachwhere we can wiretap what's being played there. And that's where we
to:darkice now, to the monitor of our nullstream. Change the input config
typos...
paSourceName = nullstream.monitor
and voila, that should do the trick. Hopefully I did no critical
or -:D
If that works, then persistence the setup by putting the pactl lines to
your config. Either you do that system-wide in /etc/pulse/default.pa
default.pa.better - only for this streaming user in $HOME/.config/pulse/
bottom ofCopy the one from /etc as a template. Add the pactl lines to the
like:that file, just delete the "pactl" at the line beginning. Something
1b.0.analog-stereo
load-module module-null-sink sink_name=nullstream
load-module module-ladspa-sink sink_name=ladspa_compressor
master=nullstream plugin=dyson_compress_1403 label=dysonCompress
control=0,1,0.5,0.99
load-module module-ladspa-sink sink_name=ladspa_limiter
master=ladspa_compressor plugin=fast_lookahead_limiter_1913
label=fastLookaheadLimiter control=10,0,0.8
load-module module-loopback source=alsa_input.pci-0000_00_
Darkice. Mysink=ladspa_limiter
Phew, thank god you have to do this only once :D
Let me know if that worked!
Regards,
Daniel
2017-03-20 19:16 GMT+01:00 <24@xxxxxxxxxxxxx>:
Hello Darkice enthuses,
Long time Darkice user trying to expand features to use with
stream. Sogoal is to add a Dyson compressor via PulseAudio to the Darkice
PulseAudiomy specific question has to do with getting Darkice to sink a
pulse.C:243:(pulse_connect)output. The errors I am getting are: ALSA lib
devicePulseAudio: Unable to connect: Connection refused and DarkIce:
Darkice.cpp:1187: can't open connector
I am starting with a system that has the darkice.cfg file using:
see= hw:1,0
and the system takes the source from the sound card I am using and
provides it to the Darkice application and the stream is working.
Next I start PulseAudio with: pulseaudio --start
I try to run darkice again and it won't run because Pulse audio took
control of the source. This is OK I think
Running pavucontrol and looking under the Input devices tab, I can
soundthe VU meter moving in sync with the audio I generate with a local
microphone. So I know PulseAudio is receiving the source from the
PulseAudiocard.
What I have tried has been different ways to express "device" in the
darkice.cfg file and adjustments using the pavucontrol for the
thisconfiguration.
Different ways I have tried to define PulseAudio as the source for
Darkice in the darkice.cfg file that have not worked.
1. device = default
2. device = pulse #On the Ubuntu manpages for
darkice.cfg, it says to use "pulseaudio" for the device.
#If you use that you will get
toerror: Unknown PCM pulseaudio
3. device = pulse
paSourceName = 4
4. device = pulse
paSourceName = default
5. device = pulse
paSourceName = bmc2835 ALSA
6. device = /dev/dsp #Then use: sudo padsp darkice
signal forstart Darkice
Another way to word my problem is: I am getting input to PulsAudio and
want to know how to get Darkice to use this available PulseAudio
Raspbian)streaming.
Any suggestions would be appreciate. Thank-you for your support!
Joel Goodwin
Hardware configuration: Cirrus Logic sound card, Raspberry Pi 3
Sofrware: Darkice-1.3 and PulseAudio(The version that came with
running on Raspbian Jessie with PIXEL 2017-03-02