External Microphone via 3.5mm Jack (Librem 14)

nothing ready for testing yet. Still working on tweaking things so jack detection/removal works (consistently), mic detect works, and the noise floor of the external mic is low end to actually be usable

1 Like

Any sort of very rough eta on this fix?

no. The registers controlling these things are entirely undocumented

3 Likes

I did a bit more tinkering recently and found another way to get the same results as my prior “half-workaround” from earlier in this thread: set the 2nd GPIO to on, direction 1, data 1, so that it appears like this in /proc/asound/card0/codec#0

GPIO: io=3, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0

This can be done by verb’ing the 0x01 node like so:

hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04
hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04

I have no idea what this means or why it might be so, just throwing it out there in case it might be useful to anyone else.

3 Likes

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