[pulseaudio-discuss] On-the-fly changing of sinks or sources in combine- and loopback-modules? Sound-distortions at the beginning of module-loopback?

Lennart Poettering lennart at poettering.net
Sun Feb 21 11:56:43 PST 2010


On Thu, 18.02.10 11:31, Peter Kornatowski (pkorn at gmx.net) wrote:

> 
> At 01:23 18.02.2010, you wrote:
> >On Thu, 18.02.10 00:09, Peter Kornatowski (pkorn at gmx.net) wrote:
> >
> >> Hello,
> >>
> >> 1. Is it possible to change the sinks or sources in an already
> >> loaded module-combine or module-loopback without unloading and
> >> reloading the module?
> >
> >Unless otherwise configured module-combine will automatically add all
> >new hardware sinks to its outputs and drop those which go away. So
> >this automatism does allow sinks/sources to be added
> >dynamically/removed dynamically during runtime. However, there is no
> >user API for that to trigger that in any way but by
> >unplugging/plugging hardware.
> 
> I am using the combiner for up to 3 bluetooth-headsets. But I have
> more headsets, so I made a program that waits for bluetooth-signals
> of a headset and then loads the headset through the asynchronous
> PA-api as module-bluetooth-device. Then I am reloading the
> module-combine with a new sink-list. Do you think I can make that
> happen automatically without reloading the module-combine?

No. As mentioned m-c can auto combine all hardware devices for
you (which includes all BT devices). So you can choose to use either
that or go entirely manual, where no run-time reconfiguration API
exists for.

> >The streams module-loopback uses you can move around with pavucontrol
> >or a similar tool.
> 
> Can I move it with the asynchronous PA-api? And if yes, how?

pa_context_move_sink_input_by_name()
pa_context_move_sink_input_by_index()

> >> 2. I also have a problem with sound distortions (mostly much higher
> >> and "quicker" voice) several seconds after loading the
> >> loopback-module (source is a bluetooth-headset and sink is my
> >> soundcard). After some seconds the distortions disappear and
> >> everything is fine. I found out that reducing the adjust_time
> >> parameter of the loopback-module (I had to add adjust_time to
> >> valid_modargs in the source code) also reduces the duration of the
> >> distortions, but even at adjust_time=1 they remain for about 2
> >> seconds (and pulseaudio uses much more CPU). Setting it to 0 doesn't
> >> work at all.
> >
> >Sounds as if there is something wrong with the device speed. which
> >causes PA to compensate by resampling things.
> 
> So would it be possible to fix this? Do you need more info/some logs?

Uh. this is tricky to fix. Not sure I can tell you anything that could
fix this quickly for you. Somebody has to sit down with the hardware
and really figure out what is going on, this is not really feasible
remotely.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list