[Simple] Internal Microphone on FreeBSD 13R

quakerdoomer

Member

Reaction score: 2
Messages: 86

Have a simple issue here:


The internal soundcard plays audio, how do I get the mic working?
Code:
# cat /dev/sndstat

Installed devices:
pcm0: <Realtek ALC257 (Analog)> (play/rec) default
pcm1: <Realtek ALC257 (Right Analog Headphones)> (play)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
No devices installed from userspace.
Any pointers as to what should be the next step?

P.S. mixer command shows speaker and mic levels, rec command is present. How do I enable mic?
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

I also kept these under /boot/loader.conf [ Not sure if they're deprecated now ]
Code:
snd_driver_load="YES"
snd_hda_load="YES"
 

Alain De Vos

Daemon

Reaction score: 362
Messages: 1,349

Not an immediate answer to your question but it is advisable to load sound in rc.conf and not in loader.conf.
via:
Code:
kld_list="snd_driver"
What is the output when you do
Code:
/usr/sbin/mixer
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Thanks for the response. I made the changes in rc.conf as suggested.

Here's the output from :

# /usr/sbin/mixer

Code:
Mixer vol      is currently set to  85:85
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer mic      is currently set to  98:98
Mixer rec      is currently set to  37:37
Mixer ogain    is currently set to 100:100
Recording source: mic
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Thanks SirDice. I read this later in a separate post made by you elsewhere. Any advise what I should do next?
They're not deprecated but they're not needed either. They're already loaded in the GENERIC kernel.
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Okay so I had tried that earlier but regardless, I tried again and the file is totally silent. Volume controls are fine and other wave files play just perfect. The one I recorded didn't. So, what can I try next?
 

bsduck

Active Member

Reaction score: 68
Messages: 112

By default mixer opens /dev/mixer0 but there are often other mixers available.
Try mixer -f /dev/mixer1 and so on with all the /dev/mixer* you have to see what's in there.
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Code:
# mixer -f /dev/mixer0
Mixer vol      is currently set to  85:85
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer mic      is currently set to  98:98
Mixer rec      is currently set to  37:37
Mixer ogain    is currently set to 100:100
Recording source: mic


# mixer -f /dev/mixer1
Mixer vol      is currently set to  85:85
Mixer pcm      is currently set to 100:100
Mixer ogain    is currently set to 100:100


# mixer -f /dev/mixer2
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100

????🎤 I need to know what to do if I wish to use the inbuilt microphone!
 

bsduck

Active Member

Reaction score: 68
Messages: 112

The only recording device available is on the default mixer, so the problem is elsewhere.

If you connect an external microphone, does it work?

What's the output of sysctl dev.hdaa?
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Thanks to everyone involved for your time. Really appreciate it.

The laptop has a single headphone jack (no separate inlet fora mic). I hooked an external microphone (although it's not reliable) into that headphone port and tried rec and did receive some disturbance recorded. I am not sure if that's a win.

sysctl's output can be temporarily found here :

Do let me know your analysis.
 

bsduck

Active Member

Reaction score: 68
Messages: 112

The automatic configuration seems to be wrong.

Your internal microphone is not listed as such, and I'm wondering which one of all the dev.hdaa.0.nid** it can be.

The fact there is a mixer for a microphone input jack together with a beep speaker looks like nonsense to me:
Code:
dev.hdaa.0.nid35: audio mixer
     Widget cap: 0x0020010b STEREO
    Association: 2 (0x0001)
            OSS: speaker, mic
      Input amp: 0x80000000 mute=1 step=0 size=0 offset=0 (0/0dB)
    Connections: 6
          + [DISABLED] <- nid=24 [pin: Speaker (None)] [DISABLED]
          + <- nid=25 [pin: Mic (Black Jack)]
          + [DISABLED] <- nid=26 [pin: Speaker (None)] [DISABLED]
          + [DISABLED] <- nid=27 [pin: Speaker (None)] [DISABLED]
          + <- nid=29 [beep widget]
          + [DISABLED] <- nid=18 [pin: Speaker (None)] [DISABLED]
Maybe the internal microphone is nid29, mislabeled as a beep speaker?
Do you get speaker listed as a rec device with mixer -h?
If yes then you can enable it with mixer =rec speaker.
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

Yes" mixer -f" shows the following

devices: vol, pcm, speaker, mic, rec, ogain
rec devices: speaker, mic

I issued, as advised: "mixer =rec speaker"
Then tried rec -d test.wav
No sound recorded.

Reverted back to
"mixer =rec mic"
again tested recording. No luck :(


What can we try next?

P.S.
Would it help testing rec and if we find success then maybe 'dmesg' or a relevant command from any Linux OS or Net/OpenBSD ?
 

astyle

Active Member

Reaction score: 88
Messages: 228

I have a hard time buying the idea that a headphone jack can also be used as a microphone jack... those are supposed to be two separate things. You can probably plug in a USB mic and use that. Then the FreeBSD utilities should work fine to configure that. Just plug it in, do # dmesg | grep tail -f, and start there.
 
OP
Q

quakerdoomer

Member

Reaction score: 2
Messages: 86

I do not wish to use an external (USB) mic. I am trying to solve the issue of using the internal mic since it's working fine as tested on other OSes.
 
Top