[pulseaudio-discuss] WG: AW: module-sine for generating two independent sine wave signals on the left and right output of a sound device
S.C.T.N Gmbh
messagerie at sctn.de
Sat Nov 11 13:58:37 UTC 2017
Yes I can confirm that:
Pactl unload-module <index>
stops the sine output on both channels.
But in
pactl list modules short
the module<index> has disappeared while the other module-sine is still
there.
Could it be related to t he other modules that are loaded after boot? Here
is a list of all modules that are loaded in my case by default:
pi at TEST:~ $ pactl list modules short
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
5 module-udev-detect
6 module-alsa-card device_id="0" name="platform-soc_audio"
card_name="alsa_card.platform-soc_audio" namereg_fail=false tsched=yes
fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes
card_properties="module-udev-detect.discovered=1"
7 module-native-protocol-unix
8 module-default-device-restore
9 module-rescue-streams
10 module-always-sink
11 module-intended-roles
12 module-suspend-on-idle
13 module-console-kit
14 module-systemd-login
15 module-position-event-sounds
16 module-role-cork
17 module-filter-heuristics
18 module-filter-apply
Annother hitch is that it takes quite an amount of time after unloading
before module-sine can be reloaded again (roughly 10secs).
Is there any flag or indication that the unloading has completed so that the
module can be reloaded again?
Kind regards
Von: Georg Chini [mailto:georg at chini.tk]
Gesendet: Samstag, 11. November 2017 13:37
An: S.C.T.N Gmbh
Cc: General PulseAudio Discussion
Betreff: Re: AW: [pulseaudio-discuss] module-sine for generating two
independent sine wave signals on the left and right output of a sound device
On 11.11.2017 13:29, S.C.T.N Gmbh wrote:
Perfect, it works. Thank you a lot.
Only one problem remains: I don't know how to stop the two modules-sine
independently:
I use:
To define the left channel:
pactl load-module module-remap-sink sink_name=left_mono
master=alsa_output.platform-soc_audio.analog-stereo channels=1
master_channel_map=front-left channel_map=front-left remix=no
24
To define the right channel:
pactl load-module module-remap-sink sink_name=right_mono
master=alsa_output.platform-soc_audio.analog-stereo channels=1
master_channel_map=front-right channel_map=front-right remix=no
25
To start sine on the left:
pactl load-module module-sine sink=left_mono frequency=921
26
To start sine on the right:
pactl load-module module-sine sink=right_mono frequency=821
27
I dont know how to stop one of the module-sine while leaving the other one
on.
The CLI says to specify a module index or a module name. I suppose the index
ist he number that is displayed after entering the command? (In the above
example 26,27)
But when I use e.g.
Pactl unload-module
Both channels are stopped.
I added the list again. Yes, using the module index like "pactl
unload-module 26" should unload
only the single sine module. If you use the name, all instances of the
module are unloaded.
Doesn't that work for you? That would be a bug.
You can also see the module index with "pactl list modules short".
Von: Georg Chini [mailto:georg at chini.tk]
Gesendet: Samstag, 11. November 2017 12:32
An: General PulseAudio Discussion; S.C.T.N Gmbh
Betreff: Re: [pulseaudio-discuss] module-sine for generating two independent
sine wave signals on the left and right output of a sound device
On 11.11.2017 09:50, S.C.T.N Gmbh wrote:
I want to use MODULE-SINE to produce two independent sine wave signals with
different frequencies on the left and right output of a sound card:
By using :
pactl load-module module-sine frequency=1000
I get of course the same 1000Hz signal on both channels and
pactl unload-module module-sine stops both of them.
So the question is whether there is a configuration to start and stop left
and right channel independently and to run them with different frequencies?
Thank you in advance
Sporex
You can use module-remap-sink to create independent sinks for each channel.
Then you can use module-sine on the remapped sinks.
Regards
Georg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20171111/f4583f46/attachment.html>
More information about the pulseaudio-discuss
mailing list