[SOLVED] Mic not working with ALSA - in fact, it thinks it's a speaker
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mic not working with ALSA - in fact, it thinks it's a speaker
I'm trying to get the built-in mic to work on a Dell XPS15 laptop. This has a Realtek AC3266 audio device in it (apparently!). It's running void linux
The audio output has always worked with no issues at all. I've been trying to get the Mic working (primarily for skype).
At first, alsamixer displayed no 'Mic' devices at all. After some research, I added the following modprobe configuration;-
options snd-hda-intel model=laptop-amic
> arecord -l gives me...
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3266 Analog [ALC3266 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Before adding the modprobe config, arecord -l would also list some hdmi devices, but I'm gusssing that may have been an artifact of the (wrong) config? Not sure.
Anyway, the mic still doesn't work - trying the usual 'arecord -f S16_LE -d 5 -r 44100 -c 2 --device="hw:0,0" /tmp/tet.wav' (plus lots of variations on this) just hangs and then eventually gives up with an I/O error;-
If I run up alsamixer, I see something very odd (well, at least I think it's odd). In the 'playback' section, I see the following devices;-
Master, Headphone, various 'Speakers', PCM, Mic, Mic Boost, various S/PDIF, Auto-Mute Mod, Internal Mic, Internal Mic (again! Left/right?), Loopback Mixer.
In the 'capture' section, I see the following devices;-
Mic Boost, Capture, Digital, Internal Mic Boost.
My first question is, why are microphones being listed as 'playback' devices? And what do I do about it?
> amixer gives the following info for 'Mic';-
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 31 [100%] [12.00dB] [on]
Front Right: Playback 31 [100%] [12.00dB] [on]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 3 [100%] [30.00dB]
Front Right: 3 [100%] [30.00dB]
As you can see, it seems to think my Mic is a 'playback' device (as well as a 'capture' device). I'm thinking I need to fix this issue before I stand a chance of getting anywhere else with this. Or maybe I'm on the wrong lines altogether?
Welcome to LinuxQuestions.org. I assume that your laptop has a combo jack fitted. These can require the use of hdajackretask (part of alsa-tools). You might want to share your distro/version for more specific advice.
Thanks for the reply. It is the internal mic I am trying to get working; not one that is plugged in. I don't have one that I could plug in anyway, and I use the jack for headphones (which have always worked fine)
And as I said, this is on a pretty up-to-date void linux installation (I can't give you a version because void doesn't work like that)
Errr, I DID say I was using void linux in the first paragraph of my original post.
And I can't see how hdajackrestask will help because as I have said several times now, the problem is with the built-in microphone and not with one that is plugged in via the jack socket
Run the ALSA diagnostic script (alsa-info.sh) and it will upload the output to an online server. Post the URL that it provides here for others to advise further.
Errr, I DID say I was using void linux in the first paragraph of my original post.
And I can't see how hdajackrestask will help because as I have said several times now, the problem is with the built-in microphone and not with one that is plugged in via the jack socket
Thanks for your time anyway.
I know not of which he speaks, but I’m reading ferrari’s advice as saying that the presence/existence of the jacks may be affecting/impacting how the internal mic is configured/works and the tool he’s proposing may help to identify an/d/or change that.
A brief search about that tool seems to confirm my interpretation...but you should dig into the tool yourself, IMO
Thanks for straightening me out. I probably missed it because I'm not familiar with Void, but I shall be loading it up in a VM sometime this week because inquiring minds want to know.
I visited the Void website and it looks as if Void might be using Pulse Audio; at least, Pulse shows up in the package list at the website. If so, is pavucontrol (the Pulse Audio mixer) installed and what does it report about the mic?
My own experience with distros using Pulse is that pavucontrol is a useful troubleshooting tool, sometimes more useful than the ALSA tools.
Returning to the OP's first post I don't think the capture device output is unusual. Therefore, (along the lines that frankbell mentioned), I recommend using pavucontrol to set the desired audio profile and check that the appropriate input device is selected, not muted etc.
And to address some other points that have been made;-
## Just to clarify, the internal Mic does seem to be present (well, at least I THINK it's the internal Mic) - the problem seems to be that it thinks its a speaker, and not a microphone! It appears in the "playback" section of alsamixer rather than the "capture" section. As such, there is no CAPTURE toggle on it, which (from what little I know) should be present for a Mic
## Linux version
Linux version 5.4.16_1 (void-buildslave@a-hel-fi) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Wed Jan 29 20:40:56 UTC 2020
## Pulse Audio
I DID have pulse audio installed but I removed it some time ago. I DO have the "pulse wrapper" installed though (can't remember its name, but it provides a thin pulse API for applications that can't/won't talk directly to alsa)
## And for the curious, one of the main reasons I use void linux is because there's no SystemDregs in it :-) and it is generally put together in a very clean and simple way; a bit like BSD
The amixer output (part of the alsa-info.sh output) looks normal to me, but I note that the mic is currently off (muted) and the levels are low...
Code:
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 0 [0%] [-34.50dB] [off]
Front Right: Playback 0 [0%] [-34.50dB] [off]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 0 [0%] [0.00dB]
Front Right: 0 [0%] [0.00dB]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.