External Microphone via 3.5mm Jack (Librem 14)

so where did it come from?

Trial and error. I browsed through recent commits to patch_realtek.c which mention the ALC256, and also tried a few of the model name quirks.

3 Likes

Has there been any progress on getting an external microphone to work via the jack? It’s still quite inconvenient to do video calls from the laptop while traveling, as my wired headset microphone doesn’t work, nor does two other Bluetooth headsets I’ve tried (including fairly generic Pixel Buds) though I imagine this latter issue is perhaps Linux Kernel related.

At home I use an external USB microphone that seems to work well.

I’m running latest version of Manjaro w/ all updates, and just updated Coreboot to latest. Haven’t updated EC yet, but not sure if that should have any effect?

1 Like

FYI, I managed to get my Bluetooth headsets (Pixel Ear Buds, HyperX Bluetooth Headset) working using the pipewire-pulse drop-in for pulseaudio (as per https://forum.manjaro.org/t/what-is-the-correct-way-to-install-package-manjaro-pipewire/49738/7). So at least the more immediate annoyance is resolved for me.

Would be nice to get the wired microphone jack to work though…

3 Likes

Did you miss a hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04 in the code lines, or should it have read “data=0” in the file above?

@MrChromebox - hello, I am wondering if anyone is working on the fix?

6 Likes

@Kyle_Rankin - what is Jonathon Hall’s tag on this forum? I understand from “Reboot loops” post he now deals with the firmware. Please confirm.

Hi @kate.mason, sorry for the delay seeing this. There is a lot of background here to catch up on, so I want to assess where we currently are, check out any work that was in-progress, and go through the suggestions from this thread. I hope to have another update for you soon regarding where we are and what steps I think we can take next.

2 Likes

I think I’m running into this same issue with Qubes OS v4.1.1. The microphone does not produce any signal levels when plugged into the 3.5mm audio jack on the right side of the Librem 14.

The dom0 volume control panel => Input Devices => Built-in Analog Stereo => Port: Microphone shows no activity when speaking into the mic, and yes I have made sure to turn the camera/mic switch to the ON position.

When I connect a USB microphone, it does not even show up as an input device in same control panel, however I can attach it to a VM and get audio out of it.

I did some more testing and I can get the built-in microphone next to the camera working with VMs after flipping the hardware kill switch and attaching the dom0:mic device to a Qube VM.

It’s the 3.5mm stereo audio headphone jack on the right side that I’m still having issues with. Does anyone know what the name of this device should be?

1 Like

Any updates on the firmware fix? Would prefer to use my 3.5mm plug headset to conduct calls. I have the Librem-EC 1.11 fireware installed on my Librem 14 and am still struggling with this.

Found a librem ec repo issue for this problem here https://source.puri.sm/firmware/librem-ec/-/issues/10

I have raised it a long time ago…

Yes, and according to Nicole’s comment, it appears the embedded controller firmware is not the issue and functioning as it should.

If anyone finds a solution hopefully they can comment on that issue you opened and have it closed.

I was having this issue while running Qubes OS, doed it also occur under PureOS?

Unfortunately, external microphone does not work in PureOS either.

Hey all, I have been working on this and got a little bit more information, but not much, and no improvement so far unfortunately.

Setting the 0x4a coefficient to 0xe (the guessed verb that seems to enable mic input) does not work reliably for me. It does sometimes enable mic input (with hiss), but sometimes I have to run it several times before there is any change, so I do not think this change is anything we can ship in firmware. This doesn’t appear to be an ordinary register (if you read it back, the value is not constant), so as far as I can tell, it’s not a set of bit flags we can try to whittle down.

The hiss on my device is not awful, I think I could use this for a voice call, but it’s certainly not great. I expect we could wipe it out with EQ parameters. There are a few boards (not many) in coreboot using ALC256 that have EQ parameters, like this one: https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/src/mainboard/starlabs/starbook/variants/cml/hda_verb.c#88 Those params (according to comments, which could be wrong) look like they might eliminate hiss, but they had no effect for me. It’s possible that the 0x4a=0xe coefficient could be resetting them anyway, etc.

It is possible there could still be something wrong with the librem-ec jack detect, and we’re looking into it. However this will probably not affect the audio quality.

For those of you that have tried the guessed verbs and got mic input, how is the hiss? Could you use that audio for a voice call?

2 Likes

I have some good news on this! Finally made some breakthroughs, and jack detect is working. I think the audio quality is good too (the guessed verbs forcing the mic on were probably resetting other things that shouldn’t have been reset, no way to know).

This requires both BIOS and EC updates, please try these preview builds:

With these updates, the headset jack detection now works, and the mic input works. Let me know how this works for you all and how the audio quality is! If there is any problem with audio quality, a few-seconds recording would be helpful! (If you have any HDA verb hacks, please be sure to undo those.)

The jack detect takes about 1-2 seconds to respond right now, that’s just because of the way Librem-EC polls some of its low frequency tasks.

The problem was mainly in the EC - it wasn’t asserting the jack detect correctly, and figuring out what the codec wanted was mostly trial and error. The coreboot update undoes the workarounds disabling the jack detect (since it now works) and also checks the EC - it falls back to the older verbs if the EC hasn’t been updated yet.

8 Likes

This is dope as hell. Great work! Question for you - for those of us not familiar with applying these kinds of updates. Is there some documentation we can follow? I assume it would be similar to the process described here, however, not familiar with using an ISO file. For those of us who are still getting acquainted with the process, how does one update our firmware to take advantage of these discoveries?

Sure, yes there is documentation:

For the system firmware (coreboot+SeaBIOS / PureBoot) - https://source.puri.sm/firmware/utility#usage - it’s just a few steps to run the script, the script will guide you with menus. Use the preview URI above of course to get the preview firmware.

For the EC firmware - https://puri.sm/projects/librem-ec/ - this is straightforward too. Again use the preview URI above to get the preview firmware.

I had a couple of reports that only the headphone jack detect was working, the mic still wasn’t detected, so there may still be some refinement needed. Let me know how it works for you all!

3 Likes

Hi all, I’ve updated the EC firmware - we tweaked the jack sense assertion time from 1 ms to 10 ms. Some internal users reported that the first build didn’t always detect the microphone, and this tweak fixed it. (The BIOS firmware is unchanged from the first preview post.)

If anybody has a chance to test it, I’d appreciate knowing your results! I will work this into our next firmware releases.

5 Likes