Output sound working but no input

Good afternoon!!
After many years of Linux, I have finally switched to FreeBSD 14.3-RELEASE with GENERIC kernel, amd64.

So far being a good ride, already solved some problems I had on my own (thanks Linux for the training wheels LOL), but there's one little thing:
I have set the sound card and sound output its alright, but I can't get my laptop internal microphone to work.

Here's some information from cat /dev/sndstat
Code:
Installed devices:
pcm0: <Realtek ALC272 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC272 (Left Analog Mic)> (rec)
pcm2: <Intel Ibex Peak (HDMI/DP 8ch)> (play)
No devices installed from userspace.

Information from mixer -f /dev/mixer0 (the speaker)

Code:
pcm0:mixer: <Realtek ALC272 (Analog 2.0+HP/2.0)> on hdaa0 (play/rec) (default)
    vol       = 1.00:1.00     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 1.00:1.00     rec
    mix       = 0.74:0.74     rec
    rec       = 1.00:1.00     pbk
    igain     = 1.00:1.00     pbk
    ogain     = 1.00:1.00     pbk
    monitor   = 0.67:0.67     rec src

And information from mixer -f /dev/mixer1 (the microphone)

Code:
pcm1:mixer: <Realtek ALC272 (Left Analog Mic)> on hdaa0 (rec)
    speaker   = 0.00:0.00     rec
    mic       = 1.00:1.00     rec src
    rec       = 0.91:0.91     pbk

As per indicated by the Handbook, I have snd_driver_load="YES" defined on /boot/loader.conf loaded at boot time.

I also have hw.snd.default_unit=0 defined on /etc/sysctl.conf, also indicated by the Handbook.

After some research, I was able to grasp some understanding that this line:
speaker = 0.00:0.00 rec
of mixer -f /dev/mixer1 output (for the microphone)

Code:
pcm1:mixer: <Realtek ALC272 (Left Analog Mic)> on hdaa0 (rec)
    speaker   = 0.00:0.00     rec
    mic       = 1.00:1.00     rec src
    rec       = 0.91:0.91     pbk

indicates that its volume is set to 0.

So, I tried to set it with mixer -f /dev/mixer1 speaker=1.0, but this gave me (perhaps the most insightful?) output:

Code:
mixer: speaker.volume=1.00:1.00: Device not configured
pcm1:mixer: <Realtek ALC272 (Left Analog Mic)> on hdaa0 (rec)
    speaker   = 0.00:0.00     rec
    mic       = 1.00:1.00     rec src
    rec       = 0.91:0.91     pbk

Searching on the internet gave very few results, even considering both Google and DuckDuckGo results...
Can anyone help me out?
 
As per indicated by the Handbook, I have snd_driver_load="YES" defined on /boot/loader.conf loaded at boot time.
You don't need to load snd_driver necessarily, the audio card is detected automatically in most cases.

I also have hw.snd.default_unit=0 defined on /etc/sysctl.conf
With default_unit=0, the microphone is configured on pcm0 (note "(play/rec)")
pcm0:mixer: <Realtek ALC272 (Analog 2.0+HP/2.0)> on hdaa0 (play/rec) (default)

Try to record something:
Code:
ffmpeg -f oss -i /dev/dsp3  test.mp3
If ffmpeg complains about dsp3, try another device.
 
You don't need to load snd_driver necessarily, the audio card is detected automatically in most cases.


With default_unit=0, the microphone is configured on pcm0 (note "(play/rec)")


Try to record something:
Code:
ffmpeg -f oss -i /dev/dsp3  test.mp3
If ffmpeg complains about dsp3, try another device.
Hello!!
Thanks for answering!!

You don't need to load snd_driver necessarily, the audio card is detected automatically in most cases.
In fact, the Handbook even states this, but I tried it to see if the microphone would work.
I will remove it from the conf file.

With default_unit=0, the microphone is configured on pcm0 (note "(play/rec)")
Yeah, I also realized this, but I thought if I set it to the microphone ( default_unit=1) the output device default_unit=0 would be left non-working. Guess I'm just dumb LOL.

Try to record something:
I will!!
Right now I can't, but I will be doing so in approximately 1/2 hours.
I will then come back with the results and possible the fix, if I get it.

Thank you so much for you time and help!!
 
You don't need to load snd_driver necessarily, the audio card is detected automatically in most cases.


With default_unit=0, the microphone is configured on pcm0 (note "(play/rec)")


Try to record something:
Code:
ffmpeg -f oss -i /dev/dsp3  test.mp3
If ffmpeg complains about dsp3, try another device.
Hello!!
So, I tried setting the mic as default with sysctl hw.snd.default_unit=1, and after that, executing mixer -f /dev/mixer1 speaker=1.0, but still no luck:

Code:
mixer: speaker.volume=1.00:1.00: Device not configured
pcm1:mixer: <Realtek ALC272 (Left Analog Mic)> on hdaa0 (rec) (default)
    speaker   = 0.00:0.00     rec
    mic       = 1.00:1.00     rec src
    rec       = 0.91:0.91     pbk

Try to record something:
I tried recording as you indicated (and as W.hâ/t pointed out) using ffmpeg -f oss -i /dev/dsp1 test.mp3.
The resulting file was correctly saved, but the sound...I only hear static.

In fact, if I get near the spot where sound is outputted, I can hear a little static that is constant.

I then tried using the sound output device, as according to mixer, it has also recording capabilities:

Code:
pcm0:mixer: <Realtek ALC272 (Analog 2.0+HP/2.0)> on hdaa0 (play/rec) (default)
    vol       = 1.00:1.00     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 1.00:1.00     rec
    mix       = 0.74:0.74     rec
    rec       = 1.00:1.00     pbk
    igain     = 1.00:1.00     pbk
    ogain     = 1.00:1.00     pbk
    monitor   = 0.67:0.67     rec src

I set it as the default sysctl hw.snd.default_unit=0 and then, using ffmpeg -f oss -i /dev/dsp0 test.mp3, I was able to record something and actually hear my voice on top of a very loud static.

I tested again, still using the ouput device, but this time with the microphone turned off from Xfce media controls ( xfce4-pulseaudio-plugin).

1762043756256.png


Even then, I could record, hear my voice, but still on top of a very loud static.

What's interesting is that I was able to actually join a meeting on Google Meet using this laptop, with the microphone set to the output device ( pcm0:mixer: <Realtek ALC272 (Analog 2.0+HP/2.0)> on hdaa0 (play/rec) (default) both on Meet and on Xfce plugin, and everyone could hear me perfectly, without static.


EDIT:
Even more interesting found:
Adjusting the PulseAudio plugin of the microphone icon to 0 (without turning the toggle off), with the microphone set to the output device (still at the plugin) stops the static I could hear near the laptop completely, but also makes no sound on the recording.

1762043627682.png
 
Back
Top