私はLinux Mintを実行しており、システムのハードウェアボリュームコントロール(ボリュームの上げ下げボタンなど)を使用するたびにalsamixerの「PCM 1」レベルを調整します。しかし、代わりに「PCM」レベルを調整したいと思います。
amixer -c 1
利用可能なコントロールを示す出力は次のとおりです。
Simple mixer control 'PCM',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 74
Mono:
Front Left: Playback 74 [100%] [0.00dB] [on]
Front Right: Playback 74 [100%] [0.00dB] [on]
Simple mixer control 'PCM',1
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 74
Mono:
Front Left: Playback 74 [100%] [0.00dB] [on]
Front Right: Playback 74 [100%] [0.00dB] [on]
Simple mixer control 'Mic',0
Capabilities: cvolume cvolume-joined cswitch cswitch-joined
Capture channels: Mono
Limits: Capture 0 - 74
Mono: Capture 74 [100%] [0.00dB] [on]
PulseAudioのdefault.pa設定を変更しようとしましたが、これによりオーディオが失われました。
カスタムスクリプトやキーバインディングを含まないソリューションを探しています。私は標準のマスターボリュームを「PCM」に直接変更することを好みます。
どんな提案や洞察力でも大変感謝します!
要求に応じて、出力は次のようになりますcat ~/.xbindkeysrc
。
## For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.7
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
# "command to start"
# associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events
# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.
#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable
# Examples of commands:
"xbindkeys_show"
control+shift + q
# set directly keycode (here control + f with my keyboard)
#"xterm"
# c:41 + m:0x4
# specify a mouse button
#"xterm"
# control + b:2
#"xterm -geom 50x20+20+20"
# Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
# alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a release event starts rxvt
#"rxvt"
# release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
# Control + b:2 + Release
##################################
# End of xbindkeys configuration #
##################################
#"xdotool type 'r'"
#Control+Alt + Right
出力pacmd list-cards
:
4 card(s) available.
index: 0
name: <alsa_card.pci-0000_01_00.1>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "2"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdc080000 irq 17"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "10f0"
device.product.name = "GP104 High Definition Audio Controller"
device.string = "2"
device.description = "GP104 High Definition Audio Controller"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI)-Ausgabe (priority 38668, available: unknown)
output:hdmi-stereo-extra1: Digital Stereo (HDMI 2)-Ausgabe (priority 38468, available: unknown)
output:hdmi-stereo-extra2: Digital Stereo (HDMI 3)-Ausgabe (priority 38468, available: unknown)
output:hdmi-stereo-extra3: Digital Stereo (HDMI 4)-Ausgabe (priority 5700, available: no)
output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4)-Ausgabe (priority 600, available: no)
output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4)-Ausgabe (priority 600, available: no)
off: Aus (priority 0, available: unknown)
active profile: <output:hdmi-stereo>
sinks:
alsa_output.pci-0000_01_00.1.hdmi-stereo/#11: GP104 High Definition Audio Controller Digital Stereo (HDMI)
sources:
alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor/#14: Monitor of GP104 High Definition Audio Controller Digital Stereo (HDMI)
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "LG HDR 4K
"
hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "27GL650F
"
hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes)
properties:
device.icon_name = "video-display"
device.product.name = "27GL650F
"
hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
index: 1
name: <alsa_card.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00>
driver: <module-alsa-card.c>
owner module: 8
properties:
alsa.card = "1"
alsa.card_name = "SteelSeries Arctis 9"
alsa.long_card_name = "SteelSeries SteelSeries Arctis 9 at usb-0000:00:14.0-3.1, full speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:14.0-usb-0:3.1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/sound/card1"
udev.id = "usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00"
device.bus = "usb"
device.vendor.id = "1038"
device.vendor.name = "SteelSeries ApS"
device.product.id = "12c4"
device.product.name = "SteelSeries Arctis 9"
device.serial = "SteelSeries_SteelSeries_Arctis_9_000000000000"
device.string = "1"
device.description = "SteelSeries Arctis 9"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
profiles:
output:stereo-game+output:stereo-chat+input:mono-chat: Spiel-Ausgabe + Chat-Ausgabe + Chat-Eingabe (priority 5100, available: unknown)
input:mono-chat: Chat-Eingabe (priority 1, available: unknown)
output:stereo-chat: Chat-Ausgabe (priority 5000, available: unknown)
output:stereo-chat+input:mono-chat: Chat-Ausgabe + Chat-Eingabe (priority 5000, available: unknown)
output:stereo-game: Spiel-Ausgabe (priority 5000, available: unknown)
output:stereo-game+input:mono-chat: Spiel-Ausgabe + Chat-Eingabe (priority 5000, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <output:stereo-game+output:stereo-chat+input:mono-chat>
sinks:
alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-game/#1: SteelSeries Arctis 9 Spiel
alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-chat/#2: SteelSeries Arctis 9 Chat
sources:
alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-game.monitor/#1: Monitor of SteelSeries Arctis 9 Spiel
alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-chat.monitor/#2: Monitor of SteelSeries Arctis 9 Chat
alsa_input.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.mono-chat/#3: SteelSeries Arctis 9 Chat
ports:
usb-gaming-headset-output-stereo: Headphones (priority 0, latency offset 0 usec, available: unknown)
properties:
usb-gaming-headset-input: Headset Microphone (priority 0, latency offset 0 usec, available: unknown)
properties:
index: 2
name: <alsa_card.usb-046d_081b_61151E20-02>
driver: <module-alsa-card.c>
owner module: 9
properties:
alsa.card = "3"
alsa.card_name = "USB Device 0x46d:0x81b"
alsa.long_card_name = "USB Device 0x46d:0x81b at usb-0000:00:14.0-6, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:14.0-usb-0:6:1.2"
sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2/sound/card3"
udev.id = "usb-046d_081b_61151E20-02"
device.bus = "usb"
device.vendor.id = "046d"
device.vendor.name = "Logitech, Inc."
device.product.id = "081b"
device.product.name = "Webcam C310"
device.serial = "046d_081b_61151E20"
device.form_factor = "webcam"
device.string = "3"
device.description = "Webcam C310"
module-udev-detect.discovered = "1"
device.icon_name = "camera-web-usb"
profiles:
input:mono-fallback: Mono-Eingabe (priority 1, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <input:mono-fallback>
sources:
alsa_input.usb-046d_081b_61151E20-02.mono-fallback/#4: Webcam C310 Mono
ports:
analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
index: 3
name: <alsa_card.pci-0000_00_1f.3>
driver: <module-alsa-card.c>
owner module: 10
properties:
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0x2ffff20000 irq 139"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:1f.3"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "a2f0"
device.product.name = "200 Series PCH HD Audio"
device.form_factor = "internal"
device.string = "0"
device.description = "Eingebautes Tongerät"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
input:analog-stereo: Analog Stereo-Eingabe (priority 32833, available: unknown)
output:analog-stereo: Analog Stereo-Ausgabe (priority 6500, available: no)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown)
output:analog-surround-21: Analog Surround 2.1-Ausgabe (priority 1300, available: no)
output:analog-surround-21+input:analog-stereo: Analog Surround 2.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown)
output:analog-surround-40: Analog Surround 4.0-Ausgabe (priority 1200, available: no)
output:analog-surround-40+input:analog-stereo: Analog Surround 4.0-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown)
output:analog-surround-41: Analog Surround 4.1-Ausgabe (priority 1300, available: no)
output:analog-surround-41+input:analog-stereo: Analog Surround 4.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown)
output:analog-surround-50: Analog Surround 5.0-Ausgabe (priority 1200, available: no)
output:analog-surround-50+input:analog-stereo: Analog Surround 5.0-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown)
output:analog-surround-51: Analog Surround 5.1-Ausgabe (priority 1300, available: no)
output:analog-surround-51+input:analog-stereo: Analog Surround 5.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown)
output:analog-surround-71: Analog Surround 7.1-Ausgabe (priority 1200, available: no)
output:analog-surround-71+input:analog-stereo: Analog Surround 7.1-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown)
output:iec958-stereo: Digital Stereo (IEC958)-Ausgabe (priority 38268, available: unknown)
output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958)-Ausgabe + Analog Stereo-Eingabe (priority 38333, available: unknown)
off: Aus (priority 0, available: unknown)
active profile: <output:iec958-stereo+input:analog-stereo>
sinks:
alsa_output.pci-0000_00_1f.3.iec958-stereo/#3: Eingebautes Tongerät Digital Stereo (IEC958)
sources:
alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor/#5: Monitor of Eingebautes Tongerät Digital Stereo (IEC958)
alsa_input.pci-0000_00_1f.3.analog-stereo/#6: Eingebautes Tongerät Analog Stereo
ports:
analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-input-microphone"
analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
properties:
analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: no)
properties:
analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
答え1
pulseaudioを更新(または再インストール)するたびに、または予備テストでこのファイルを変更しても問題ない場合は、このファイルを直接変更できます。
/usr/share/pulseaudio/alsa-mixer/paths/usb-gaming-headset-output-stereo.conf
ファイルを削除した,1
後Element PCM
。 (私の意見ではそれは必要ありません,0
。)ファイルを変更したら、次を使用してpulseaudioサーバーを再起動します。
systemctl --user restart pulseaudio
ファイルが継続的に変更されないようにするには、次のファイルをコピーする必要があります。
/usr/share/pulseaudio/alsa-mixer/paths/usb-gaming-headset-output-stereo.conf
/usr/share/pulseaudio/alsa-mixer/profile-sets/usb-gaming-headset.conf
同じ名前のすべての名前で(他の既存のファイルと競合/置換しない)それぞれたとえば、次のようになります。
/usr/share/pulseaudio/alsa-mixer/paths/usb-gaming-headset-output-stereo-0.conf
/usr/share/pulseaudio/alsa-mixer/profile-sets/usb-gaming-headset-0.conf
次に、新しいプロファイルセットファイル(usb-gaming-headset-0.conf
)からみんなはいSミキサーパスを含むファイルのコピー名usb-gaming-headset-output-stereo
(なし)。.conf
usb-gaming-headset-output-stereo-0
元のファイルに変更を適用したり元に戻したりしない場合は、,1
ミキサーパスファイル()のコピーを削除することを忘れないでください。usb-gaming-headset-output-stereo-0.conf
最後に、プレフィックスを使用してudevルールファイルを作成します91-
(override関連の効果について90-pulseaudio.rules
)。例:
/etc/udev/rules.d/91-pulse-pcm.rules
(拡張子があることを確認してください.rules
)
次の内容を含む行(値はENV{PULSE_PROFILE_SET}
プロファイルセットファイルのコピー用に選択した名前でなければなりません):
SUBSYSTEM=="sound", ACTION=="change", KERNEL=="card*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="12c4", ENV{PULSE_PROFILE_SET}="usb-gaming-headset-0.conf"
SUBSYSTEM
(andと混同しないように注意してください。をお見逃しなく。andと混同しないSUBSYSTEMS
でください。)S
ATTRS
==
=
すべての操作が完了したら、次のコマンドを実行または再起動して適用します。
sudo systemctl restart systemd-udevd
sudo systemctl restart systemd-udev-trigger
systemctl --user restart pulseaudio
PSあなたのディストリビューションは、特定のシステムアップデート/アップグレード後など、特定の時点でシステムがパイプラインワイヤを使用するように暗黙的に有効にすることができます。 Pipewireに問題があるかどうかはわかりませんが、ある日ハッキングが機能しなくなった場合は、スイッチが原因である可能性があります。 (pacmd list-sinks
これはpulseaudioが実行されておらず、pactl list sinks
「pipewire-pulse」によって提供される利用可能な受信機がリストされているというメッセージが表示されます)。