Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[SOLVED] amixer capture command not working

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
vcmota
Guru
Guru
Posts: 428
Joined: Mon Jun 19, 2017 7:06 pm

[SOLVED] amixer capture command not working

  • Quote

Post by vcmota » Sun Apr 11, 2021 1:08 pm

Hy everybody. I am having issues with controlling alsamixer from command line using amixer. What I need, and I am failing to get, is a command line using amixer that allow me to toggle the capture of my headset microphone. Before 1 ou 2 years ago, I had one that worked, namelly "amixer set Headphone toggle".

A short background: I use DWM instead of a desktop environment, and I had the simplest setup for the audio, only with the alsamixer installed. It was easy to understand what was being controlled and by whom, specifically with amixer controlling everything. However, 1 or 2 years ago it became mandatory to install pulseaudio in order to have audio in firefox. Although I havent noticed at the time, I suspect that it was when everything became a mess.

I used to have Headphone as a amixer control, such that the command "amixer set Headphone toggle" worked flawlessly. Now it is not there anymore:

Code: Select all

~> amixer controls
numid=4,iface=MIXER,name='Master Playback Switch'
numid=3,iface=MIXER,name='Master Playback Volume'
numid=2,iface=MIXER,name='Capture Switch'
numid=1,iface=MIXER,name='Capture Volume'
~>
When I try instead using "Capture" as amixer control, I receive messages indicating it is woking:

Code: Select all

~> amixer set Capture toggle
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 65536
  Mono: Capture 65536 [100%] [on]
~> amixer set Capture toggle
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 65536
  Mono: Capture 65536 [100%] [off]
~>
But it aint working. I installed Cheese to test, and audio keep being captured. I also tryed with Master as amixer control, also without success:

Code: Select all

~> amixer set Master toggle
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 63056 [96%] [off]
  Front Right: Playback 63056 [96%] [off]
~> amixer set Master toggle
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 63056 [96%] [on]
  Front Right: Playback 63056 [96%] [on]
~>
Although muting master really removed all the output audio from the computer, as Cheese has shown the audio from the headset keep being captured. Another aspect of this mess shows up in the command alsamixer, which opens the equalizer. It shows three options for the sound card: default, webcam (when it is connected) and "HDA intel PCH", which I assume is the onboard sound card. Independently of whom is set as the sound card on this interface, nothing is altered by amixer, neither toggling master nor toggling capture. That was surely not the case before installation of pulseaudio. In fact I tested the amixer commands also in the alsamixer interface, and they were affected as they should.

Thank you all for your attention.
Last edited by vcmota on Wed Apr 14, 2021 3:00 am, edited 1 time in total.
Top
dbtx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Jan 20, 2020 5:31 am
Contact:
Contact dbtx
Website

Re: amixer caprture command not working

  • Quote

Post by dbtx » Mon Apr 12, 2021 12:16 pm

vcmota wrote:Independently of whom is set as the sound card on this interface, nothing is altered by amixer
I take it you're hitting F6 in alsamixer to pick the card it's showing & working on. But that's only for itself, and amixer and alsamixer don't directly affect each other. Have you tried running amixer with either -c or -D switches?
Top
vcmota
Guru
Guru
Posts: 428
Joined: Mon Jun 19, 2017 7:06 pm

  • Quote

Post by vcmota » Wed Apr 14, 2021 2:52 am

Thank you dbtx for your reply.

You are correct: I am referring to the f6 in alsamixer.

The problem however has been eliminated, although I am not sure how. In the last couple days I rebuild alsa, alsa-plugins and pulseaudio after revising whether their flags were properly set (there were some flags that I assumed that should have been set and I added them), and revised all the kernel options I have set considering what is suggested in the gentoo wiki. I found out there were some inconsistencies, more specifically some options which should be compiled with the kerrnel were set to be added as module. After all this, recompiling and reinstalling the kernel, the amixer command started to work as expected after a reboot. Now I am able to toggle via amixer in command line not only for Master but also for Capture. I may never know however which was the issue exactly.

Thank you for your attention again!
Top
Post Reply

3 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic