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
 
I have same problem. On my laptop the audio is ALC257. Speaker was detected - no problem, but internal microphone don't detected, only microphone via mini jack.

I don't understan how setting device.hints
My laptop is IdeaPad 5 14IIL05.
I don't understand why show double audio mixer and why have three spekers.
Output mixer:
Code:
pcm0:mixer: <Realtek ALC257 (Analog 2.0+HP/2.0)> on hdaa0 (play/rec) (default)
    vol       = 0.52:0.52     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 1.00:1.00     rec
    mic       = 0.94:0.94     rec src
    rec       = 0.37:0.37     pbk
    ogain     = 1.00:1.00     pbk

I try mixer mic.recsrc=add speaker.recsrc=remove, but nothing changes.
If i connect headphone with microphone - all works correct. In Audacity display 4 devices:
/dev/dsp: Spkr
/dev/dsp: Mic
/dev/dsp0: Spkr
/dev/dsp0: Mic
Regardless of what I choose, the recording will only work with the microphone on the headset.

Anybody have ideas what to do?
 

Attachments

root@Zion:~ # cat /dev/sndstat


Code:
Installed devices:
pcm0: <Realtek ALC257 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Intel Ice Lake (HDMI/DP 8ch)> (play)
No devices installed from userspace.

root@Zion:~ # sysctl dev.hdac.0.pindump=1

Code:
dev.hdac.0.pindump: 0 -> 0

root@Zion:~ # dmesg -a | grep hdaa0:
Code:
hdaa0: <Realtek ALC257 Audio Function Group> at nid 1 on hdacc0
hdaa0: hdaa_audio_as_parse: Pin 25 has wrong direction for association 1! Disabling association.
hdaa0: hdaa_audio_as_parse: Duplicate pin 15 (33) in association 1! Disabling association.
hdaa0: <Realtek ALC257 Audio Function Group> at nid 1 on hdacc0
hdaa0: hdaa_audio_as_parse: Pin 25 has wrong direction for association 1! Disabling association.
hdaa0: hdaa_audio_as_parse: Duplicate pin 15 (33) in association 1! Disabling association.
hdaa0: <Realtek ALC257 Audio Function Group> at nid 1 on hdacc0
hdaa0: Dumping AFG pins:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN
hdaa0: 19 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN
hdaa0: 20 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 25 04a1103f 3  15 Mic           Jack  1/8     Right      Black   0
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa0: 33 0421101f 1  15 Headphones    Jack  1/8     Right      Black   0
hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
 
Would you please provide dmesg | grep pcm0.

Sorry for the inconvenience, I forgot to mention this in my last post.
Yes, of сourse:
js-denton@Zion:~ $ dmesg | grep pcm0
Code:
pcm0: <Realtek ALC257 (Analog 2.0+HP/2.0)> at nid 20,33 and 25 on hdaa0
But seems is not really different from /dev/sndstat
 
But seems is not really different from /dev/sndstat
I needed the node ID's (nid 20,33 and 25), cat /dev/sndstat doesn't show them.

Try /boot/device.hints ("as" , "seq" values copied from my laptops Realtek ALC257 pindump):
Code:
hint.hdaa.0.nid25.config="as=3 seq=0"
To take effect, reboot system.
 
Thanks for help, but no effect. Can this be related to the webcam? Maybe need to set up something there? I turned on the camera on handbook and there were no problems with it.
 
js-denton In your pindump the microphone shows up as "Jack". Can you plug a headset with a microphone and see if it works?

Neblinus Can you share the output of dmesg after you run `sysctl dev.hdac.0.pindump=1`?
 
Just spent half the day troubleshooting very similar microphone issue, sound out is great, but no microphone on command line and no microphone in firefox.
figured I'd post my findings as this thread comes up in searches and will link other threads that have seemed to die to here.
will resort to using my bluetooth headset.
onboard laptop camera works good, no complains there except no one car hear me.

sh:
burg:$ mixer -a
pcm0:mixer: <Realtek ALC285 (Analog)> on hdaa0 (play/rec) (default)
    vol       = 0.75:0.75     pbk
    pcm       = 1.00:1.00     pbk
    speaker   = 1.00:1.00     rec
    mic       = 1.00:1.00     rec src
    rec       = 1.00:1.00     pbk
pcm1:mixer: <Realtek ALC285 (Left Analog Headphones)> on hdaa0 (play)
    vol       = 0.85:0.85     pbk
    pcm       = 1.00:1.00     pbk
    ogain     = 1.00:1.00     pbk
pcm2:mixer: <Intel Tiger Lake (HDMI/DP 8ch)> on hdaa1 (play)
    vol       = 1.00:1.00     pbk
    pcm       = 1.00:1.00     pbk
pcm3:mixer: <Dummy Audio Device> on nexus0 (play/rec)
    vol       = 0.75:0.75     pbk
    pcm       = 0.75:0.75     pbk
    rec       = 0.75:0.75     rec src

Turns out FreeBSD does not detect the internal microphone because there isn't a real one as I can tell, but this Array/Smart Sound:

I booted into Windows and device manager:
Code:
Audio Inputs:
  Microphone Array ("Intel Smart Sound Techology for Digital Microphones")
Sound, video and game controllers:
  "Intel Smart Sound Techology for Digital Microphones"

The ALC285 and ALC257 seems to be the same issue, FreeBSD does not see the microphone. It does however see the microphone jack [but I have no mic to plug in].

Code:
burg:$ sysctl dev.hdaa.0 | grep -i mic
            OSS: speaker, mic
          + <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=25 [pin: Mic (Black Jack)]
dev.hdaa.0.nid25_original: 0x03a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid25_config: 0x03a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0
dev.hdaa.0.nid25: pin: Mic (Black Jack)
            OSS: mic (mic)
     Pin config: 0x03a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 loc=Left color=Black misc=0

pindump only lists one mic and that is conn=jack:

Code:
burg:# sysctl dev.hdac.0.pindump=1
dmesg:
hdaa0: Dumping AFG pins:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0:     Caps: IN                 
hdaa0: 19 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN                 
hdaa0: 20 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT    EAPD      Sense: 0x00000000 (disconnected)
hdaa0: 22 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT HP           Sense: 0x00000000 (disconnected)
hdaa0: 23 90170110 1  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0:     Caps:    OUT HP           Sense: 0x00000000 (disconnected)
hdaa0: 24 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN                  Sense: 0x00000000 (disconnected)
hdaa0: 25 03a11040 4  0  Mic           Jack  1/8     Left       Black   0
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN             VREF Sense: 0x00000000 (disconnected)
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps: IN OUT    EAPD VREF Sense: 0x00000000 (disconnected)
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0:     Caps:    OUT             
hdaa0: 33 03211020 2  0  Headphones    Jack  1/8     Left       Black   0
hdaa0:     Caps:    OUT HP EAPD      Sense: 0x00000000 (disconnected)
hdaa0: NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0:  GPIO0: disabled
hdaa0:  GPIO1: disabled
hdaa0:  GPIO2: disabled
hdaa1: Dumping AFG pins:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  4 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:     Caps:    OUT              Sense: 0x00000000 (disconnected)
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
 
js-denton In your pindump the microphone shows up as "Jack". Can you plug a headset with a microphone and see if it works?

Neblinus Can you share the output of dmesg after you run `sysctl dev.hdac.0.pindump=1`?
Yes, my headset it's worked. But now E is once hard freezed and then sound after short time is crached. I will try installed MidnightBSD and see what's there.
 
Back
Top