LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   My laptops internal microphone is not shown in linux, How can I make it work? (https://www.linuxquestions.org/questions/linux-desktop-74/my-laptops-internal-microphone-is-not-shown-in-linux-how-can-i-make-it-work-4175729010/)

Zeesan 09-16-2023 09:53 AM

My laptops internal microphone is not shown in linux, How can I make it work?
 
My laptops internal microphone is not shown in linux, How can I make it work?
I installed Fedora 38 and ubuntu 23.04 on my Acer Aspire 314-24p ( ryzen 5 7520u ) with latest Kernel 6.6rc . But none of the OSes detect my laptops microphone. on the gnome sound option, it just Show something called Analog input that does nothing. How can I make things work?
output of the command 'pactl list sources | grep Name ' is pasted bellow :

Code:

alsa.card_name = "HD-Audio Generic"
alsa.driver_name = "snd_hda_intel"
alsa.long_card_name = "HD-Audio Generic at 0xc04c0000 irq 82"
alsa.name = "ALC256 Analog"
alsa.subdevice_name = "subdevice #0"
api.alsa.card.longname = "HD-Audio Generic at 0xc04c0000 irq 82"
api.alsa.card.name = "HD-Audio Generic"
device.profile.name = "analog-stereo"
factory.name = "api.alsa.pcm.source"
node.name = "alsa_input.pci-0000_03_00.6.analog-stereo"
library.name = "audioconvert/libspa-audioconvert"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_03_00.6"
device.product.name = "Family 17h/19h HD Audio Controller"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
node.name = "auto_null"
factory.name = "support.null-audio-sink"
library.name = "audioconvert/libspa-audioconvert"


DavidMcCann 09-16-2023 10:58 AM

Try the command pavucontrol to launch the PulseAudio configuration tool. If you haven't got it, install it.

Zeesan 09-16-2023 11:29 AM

Quote:

Originally Posted by DavidMcCann (Post 6454074)
Try the command pavucontrol to launch the PulseAudio configuration tool. If you haven't got it, install it.

my mic is not listed there either

DavidMcCann 09-17-2023 10:37 AM

What do you get from the command
Code:

sudo arecord -l

Zeesan 09-17-2023 11:29 PM

Quote:

Originally Posted by DavidMcCann (Post 6454287)
What do you get from the command
Code:

sudo arecord -l

This messy output :

**** List of CAPTURE Hardware Devices ****
card 1: Generic_1 [HD-Audio Generic],
device 0: ALC256 Analog [ALC256 Analog]
Subdevices: 0/1 Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 2: ALC256 Alt Analog [ALC256 Alt Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #

DavidMcCann 09-18-2023 06:27 AM

Well, at least the built-in device is actually recognised! The trick is now to get it working. I can't offer much help, since I don't have a microphone, but this site might possibly help:
https://wiki.archlinux.org/title/Adv...ing#Microphone
This discussion may also help: https://unix.stackexchange.com/quest...g-on-archlinux

Zeesan 09-19-2023 03:28 AM

Quote:

Originally Posted by DavidMcCann (Post 6454406)
Well, at least the built-in device is actually recognised! The trick is now to get it working. I can't offer much help, since I don't have a microphone, but this site might possibly help:
https://wiki.archlinux.org/title/Adv...ing#Microphone
This discussion may also help: https://unix.stackexchange.com/quest...g-on-archlinux

thanks for the resources but it seems complicated. But I came to know that realtek ALC256 codec had this problem since long ago . It should have solution by now. My bad luck.

titopoquito 12-07-2023 02:26 PM

I had the same problem, but with a similar, not the same device. In my case a "lsmod" showed me that snd_soc_acp6x_mach was used (or at least it showed acp6x at that time). If your lsmod also shows some module like this used, you could try the following procedure.

After searching many threads the solution for me was to (a) get my model number and (b) add it manually to the kernel source before (c) recompiling the kernel. You can get the model number that I am talking of with "alsa-info.sh" (as root), in my case the important line reads "Board Name: 8B2F". (It's an HP with the same CPU but a ALC236 codec). I downloaded the newest 6.6.x kernel, patched it with the patch from https://git.kernel.org/pub/scm/linux...d6f0bca0eed92a (instead of 8B2F insert your Board Model). Then recompile and install your kernel. Since Pat provides kernel configs for 6.6.x in testing, grab his config, which makes it much easier.

After that at least the microphone was shown and working. For my laptop I had to find yet another patch (so that the headphone jack and switching between it and the laptop speaker works) and luckily since 6.6.4 kernel it is working fine right now.

In case you should try it: Good luck!

EDIT: You also need the line with "Board Vendor" from alsa-info.sh. In my case it obviously says "HP" which also resembles the mentioned kernel patch. So change your board vendor too, when adjusting the patch!

windowful 03-29-2024 08:21 PM

SOLVED!
 
Quote:

Originally Posted by titopoquito (Post 6469067)
I had the same problem, but with a similar, not the same device. In my case a "lsmod" showed me that snd_soc_acp6x_mach was used (or at least it showed acp6x at that time). If your lsmod also shows some module like this used, you could try the following procedure.

THANK YOU!

I ran in to the exact same problem on an Acer Aspire 315-24PT and I'd gotten from other threads that if I was going to make it work I'd probably have to compile a custom kernel for the very first time in 19 years of running Linux. Your comment was the first that made it feel like this was something I could really approach and have it be no big deal. And it was, in fact, no big deal.

To anyone else feeling intimidated by it, I followed this guide. The only change I had to make was that on Debian 12 "Bookworm," I also needed to install the pahole package for the build to complete.

Since we're currently on 6.8.2, I edited sound/soc/amd/yc/acp6x-mach.c using the patch in the link as a guide instead of going through the effort of verifying that it's still valid several versions later. Having finished that, I'm pretty sure using the patch file would still work, but I technically can't swear to that today and I certainly don't want to promise you that will stay true in the future. But following the formatting of the file adding my board to the top of static const struct dmi_system_id yc_acp_quirk_table[] did the trick. It's worth noting that all of the entries use DMI_BOARD_VENDOR, while some use DMI_BOARD_NAME and others use DMI_PRODUCT_NAME to identify the relevant hardware. Since the ones at the top are all DMI_PRODUCT_NAME, I was concerned that maybe the file format had changed. It has not. I scrolled for awhile and eventually found other files using DMI_BOARD_NAME, so that's what I used.

It worked perfectly. My microphone works. As a bonus, the Realtek Wi-fi/BT card that I moved over from my old laptop to replace the MediaTek MT7902 that came in this thing and apparently has no Linux drivers was working fine for Wi-fi, but that could see but not pair with my bluetooth headset is now fully functional. I don't know if the new kernel did it or if that was a coincidence, but either way, I now have a fully functional computer, and you can too!

titopoquito 03-30-2024 02:39 AM

Quote:

Originally Posted by windowful (Post 6492830)
THANK YOU!

I ran in to the exact same problem on an Acer Aspire 315-24PT and I'd gotten from other threads that if I was going to make it work I'd probably have to compile a custom kernel for the very first time in 19 years of running Linux. Your comment was the first that made it feel like this was something I could really approach and have it be no big deal. And it was, in fact, no big deal.

To anyone else feeling intimidated by it, I followed this guide. The only change I had to make was that on Debian 12 "Bookworm," I also needed to install the pahole package for the build to complete.

Since we're currently on 6.8.2, I edited sound/soc/amd/yc/acp6x-mach.c using the patch in the link as a guide instead of going through the effort of verifying that it's still valid several versions later. Having finished that, I'm pretty sure using the patch file would still work, but I technically can't swear to that today and I certainly don't want to promise you that will stay true in the future. But following the formatting of the file adding my board to the top of static const struct dmi_system_id yc_acp_quirk_table[] did the trick. It's worth noting that all of the entries use DMI_BOARD_VENDOR, while some use DMI_BOARD_NAME and others use DMI_PRODUCT_NAME to identify the relevant hardware. Since the ones at the top are all DMI_PRODUCT_NAME, I was concerned that maybe the file format had changed. It has not. I scrolled for awhile and eventually found other files using DMI_BOARD_NAME, so that's what I used.

It worked perfectly. My microphone works. As a bonus, the Realtek Wi-fi/BT card that I moved over from my old laptop to replace the MediaTek MT7902 that came in this thing and apparently has no Linux drivers was working fine for Wi-fi, but that could see but not pair with my bluetooth headset is now fully functional. I don't know if the new kernel did it or if that was a coincidence, but either way, I now have a fully functional computer, and you can too!

Wonderful, glad I could help! And you compiled your first kernel, that's great too :hattip:


All times are GMT -5. The time now is 03:19 AM.