2

I have a logitech h340 (usb headphones) with no mute/unmute button. I was wondering if there was a command line method to mute and unmute / toggle the Mic on my headphone. I tried:

amixer set Capture nocap
amixer set Capture cap

and also tried:

amixer set Capture toggle

Alsa Mixer:

enter image description here

Tim
  • 32,274
  • 27
  • 118
  • 177
  • Did you get any error with these commands? – Tim Apr 19 '15 at 07:59
  • Nope I didn't - it seems to be toggling it: Simple mixer control 'Headphone',0 Capabilities: pvolume pswitch Playback channels: Front Left - Front Right Limits: Playback 0 - 64 Mono: Front Left: Playback 64 [100%] [0.00dB] [on] Front Right: Playback 64 [100%] [0.00dB] [on] – Patrick Sampollo Apr 19 '15 at 08:00
  • I think it's toggling the analog audio ports...but since I'm using a usb headset, i might need to toggle another device. How do i find out? – Patrick Sampollo Apr 19 '15 at 08:01
  • can you post a screenshot of the command `alsamixer`? Press Alt+PrtScrn then upload it to http://imgur.com – Tim Apr 19 '15 at 08:02
  • Thanks, Tim. It's this one: http://i.imgur.com/jQcJGj7.png – Patrick Sampollo Apr 19 '15 at 08:06
  • Hmm it's the same as mine (exactly). Can you use the arrow keys to adjust each one in turn and see if any mute it? – Tim Apr 19 '15 at 08:09
  • I tried: amixer -c 1 sset Mic toggle This seems to mute it. But it seems to be messing with my mouse. After you toggle, mouse-click seems to be stuck (i.e. when you move your mouse, cursor is stuck at the last point it was in and moving the mouse would highlight the text around it. – Patrick Sampollo Apr 19 '15 at 08:15
  • With your mouse!? Wow... How do they connect? Both USB? – Tim Apr 19 '15 at 08:16
  • USB yeah. Only when you mute (from System Settings - Sound - (under Microphone Logitech USB Headset H340) or you run that toggle command. – Patrick Sampollo Apr 19 '15 at 08:17
  • Try changing the USB ports - do you have a spare one? – Tim Apr 19 '15 at 08:17
  • Yeah let me try that. – Patrick Sampollo Apr 19 '15 at 08:18
  • Here's what I found: http://imgur.com/u8CErZ2 If I mute the first item there "Digital Input (S/PDIF) Logitech USB Headset H340, it doesn't mess with my mouse. If I mute the second item there "Microphone Logitech USB Headset H340", it messes up with my mouse. I already tried switching usb ports. – Patrick Sampollo Apr 19 '15 at 08:22
  • Does muting the first thing work then? If not try these commands `sudo apt-get install xdotool`then `xdotool click 1`. That may get it to reset the click on the mouse... – Tim Apr 19 '15 at 08:23
  • Muting the first thing works...but what's the right command line to mute that? – Patrick Sampollo Apr 19 '15 at 08:28
  • That way I can set it as a keyboard shortcut. – Patrick Sampollo Apr 19 '15 at 08:29
  • That usb mouse conflict might be related to: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1339778 – Patrick Sampollo Apr 19 '15 at 08:30
  • I don't know the command for that... :/ Does running the xdotool command after the one that broke the mouse work? – Tim Apr 19 '15 at 08:34
  • Hmmm it doesn't. :s That's ok. – Patrick Sampollo Apr 19 '15 at 08:35
  • Sorry for that... – Tim Apr 19 '15 at 08:52

0 Answers0