데비안 8에서 명령줄을 사용하여 마이크를 음소거하는 방법은 무엇입니까?

데비안 8에서 명령줄을 사용하여 마이크를 음소거하는 방법은 무엇입니까?

저는 레노버 T420을 사용하고 있습니다. 음소거 마이크 버튼이 있지만 어떤 작업에 할당하려고 하면 "Qt는 방금 누른 키를 지원하지 않습니다"라는 오류가 발생하기 때문에 어떤 작업에도 할당할 수 없습니다. ThinkVantage 버튼을 작업에 할당할 수 있는데, 마이크를 음소거하도록 할당하고 싶습니다. 명령줄을 통해 마이크를 음소거하기 위해 모든 것을 시도했지만 아무것도 작동하지 않습니다. 예를 들어, 다른 사용자에게는 가장 도움이 되었지만 나에게는 효과가 없었던 다음 명령을 시도해 보았습니다.

root@qet-PC: /home/qet# amixer sset 'Internal Mic',0 mute
No protocol specified
xcb_connection_has_error() returned true
No protocol specified
xcb_connection_has_error() returned true
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
amixer: Mixer attach default error: Connection refused

root@qet-PC: /home/qet# amixer set Capture toggle
No protocol specified
xcb_connection_has_error() returned true
No protocol specified
xcb_connection_has_error() returned true
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
amixer: Mixer attach default error: Connection refused

root@qet-PC: /home/qet# amixer -c 0 sset Mic toggle
No protocol specified
xcb_connection_has_error() returned true
amixer: Unable to find simple control 'Mic',0

결과/proc/asound/카드그리고LSPCI | 오디오를 grep:

root@qet-PC: /home/qet# cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf2520000 irq 47
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw unknown
root@qet-PC: /home/qet# lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)

명령줄을 사용하여 마이크를 음소거하고 "시스템 설정 -> 바로가기 및 제스처"에서 ThinkVantage 버튼에 할당하려면 어떻게 해야 합니까? 아니면 해당 버튼을 눌러 마이크를 음소거하는 다른 방법이 있을까요?

고쳐 쓰다:

루트로 명령을 실행하면 작동하지 않는 것으로 나타났습니다. 사용자 권한이 있으면 제대로 작동합니다. 마이크가 음소거되어 있지만 터미널에 여전히 오류가 발생합니다.

qet@qet-PC:~$ amixer set Capture toggle
Failed to create secure directory (/run/user/1000/pulse): Permission denied
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 80 [100%] [6.00dB] [off]
  Front Right: Capture 80 [100%] [6.00dB] [off]
qet@qet-PC:~$ amixer set Capture toggle
Failed to create secure directory (/run/user/1000/pulse): Operation not permitted
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 80
  Front Left: Capture 80 [100%] [6.00dB] [on]
  Front Right: Capture 80 [100%] [6.00dB] [on]

답변1

내 시스템에서 나는 얻는다.

amixer -c MID sget Capture
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 42 [91%] [25.00dB] [on]
  Front Right: Capture 42 [91%] [25.00dB] [on]

amixer -c MID sset Capture 23
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 46
  Front Left: Capture 23 [50%] [6.00dB] [on]
  Front Right: Capture 23 [50%] [6.00dB] [on]

마이크 볼륨을 제어해야 합니다. F4디지털 및 마이크 부스트와 같이 마이크 볼륨에 영향을 미치는 다른 설정은 alsamixer Capture Frontend를 확인하세요 .

출력 읽기

amixer scontrols

간단한 컨트롤에 사용되는 이름입니다. 전체 식별자를 통해 더욱 세밀한 제어가 제공됩니다.

amixer contents|grep -i cap
amixer cget numid=11,iface=MIXER,name='Capture Switch'
amixer cset numid=11,iface=MIXER,name='Capture Switch' off

마지막 것은 캡처를 완전히 비활성화합니다. 이 alsamixer명령을 사용하면 작업을 디버깅할 수 있습니다 amixer.

답변2

KDE 특정 답변, 늦었지만 기록: KDE 사용자는 qdbus를 통해 Kmix를 사용하는 것을 선호할 수 있습니다.

$ qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "mic_mute"

그러면 실제로 마이크가 전환됩니다. (원천)

관련 정보