「PipeWire/サンプル」の版間の差分
Kusanaginoturugi (トーク | 投稿記録) (英語版より新規作成) |
Kusanaginoturugi (トーク | 投稿記録) (関連記事のページ名を修正) |
||
5行目: | 5行目: | ||
{{Related articles start}} |
{{Related articles start}} |
||
{{Related|PipeWire}} |
{{Related|PipeWire}} |
||
− | {{Related|PulseAudio/ |
+ | {{Related|PulseAudio/サンプル}} |
{{Related articles end}} |
{{Related articles end}} |
||
2023年4月6日 (木) 13:20時点における版
関連記事
Surround sound systems
Splitting front/rear
When using PipeWire as a PulseAudio/JACK replacement, you can set up Pipewire to replicate the Pulseaudio example for splitting front/rear. Doing this allows you to send audio streams using Pulseaudio to a separate sink for speakers or headphones.
Connect speakers to the line-out port and headphones to the rear port. In pavucontrol
set the soundcard used to Analog Surround 4.0 Output. Then using the following commands, make new sinks for the speakers and for the headphones, link the speakers to the front channels and link the headphones to the rear channels:
pactl load-module module-null-sink sink_name=speakers object.linger=1 media.class=Audio/Sink channel_map=FL,FR pactl load-module module-null-sink sink_name=headphones object.linger=1 media.class=Audio/Sink channel_map=RL,RR
object.linger=1
keeps the sinks alive after the creating client disconnects. You can name sink_name
whatever you want.
In order to unload module, you can use pw-cli destroy ID
, where ID
is output of pactl load-module
command. Unloading individual modules through pactl unload-module
is not currently supported [1]. However, you may use it to unload all module-null-sink
modules using pactl unload-module module-null-sink
.
Using jack_connect
, connect the monitors of the new sinks to the sound card's playback ports. Find out the name of the channels by running pw-link -iol
[2].
pw-link speakers:monitor_1 alsa_output.pci-0000_00_14.2.analog-surround-40:playback_FL pw-link speakers:monitor_2 alsa_output.pci-0000_00_14.2.analog-surround-40:playback_FR pw-link headphones:monitor_1 alsa_output.pci-0000_00_14.2.analog-surround-40:playback_RL pw-link headphones:monitor_2 alsa_output.pci-0000_00_14.2.analog-surround-40:playback_RR
To individually control the volumes, one option is to use alsa utilities (such as amixer) to control Front and Rear/Surround (alsa naming) channels. A script to automatically do that depending on what is your currently default pulseaudio sink can be found here.