Microphone not working(only under freebsd)

Hello comrades, my microphone on freebsd(only doesn't) work. It's probably not freebsd's fault maybe i need to configure it. i tried through graphical and non graphical.
The device works and i am 1000% sure about it because it works on my macbook,linux and openbsd. The microphone is usb NOT analog. I DON'T have an external or internal EXTRA sound card.
It's just plugged into usb. If you know any fix help me.

Thanks for your attention comrades.
 
Microphones are always analog, that's how they work. Because yours is plugged in on USB that means there's an analog to digital converter in there too. And that's exactly what a sound card does. So you DO have an 'extra' soundcard, one that's built into the microphone itself.
 
You misunderstand. You were 100% correct in the OP. its not FreeBSD, at all, it needs to be manually configured. SirDice is saying your microphone IS a sound card, or at least, is treated as one by FreeBSD. And you need to look for a driver to treat it as such. There are ways to narrow that down so we can figure it out. For example: If you turn on your FreeBSD machine with the mic plugged into its USB port and login, what is the output of dmesg()? From there we should be able to help using the handbook SirDice provided.
 
I followed the handbook, chapter 7.2 Setting Up The Sound Card, to get a regular analogue jack microphone working, but no joy.

Code:
# kldload snd_hda
kldload: can't load snd_hda: module already loaded or in kernel
# kldload snd_driver
I added snd_hda_load="YES" to /boot/loader.conf
I tried
Code:
# device sound
su: device: command not found

The pertinent output line from
Code:
# dmesg
seems to be:-
Code:
dmesg | grep pcm
pcm0: <Realtek ALC882 (Rear Digital 10ch/2.0)> at nid 20,22,21,23,30 and 31 on hdaa0
pcm1: <Realtek ALC882 (Analog 2.0/5.1)> at nid 27 and 26,28,24 on hdaa0
# cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC882 (Rear Digital 10ch/2.0)> (play/rec) default
pcm1: <Realtek ALC882 (Analog 2.0/5.1)> (play/rec)
No devices installed from userspace.

Any suggestions as to what I might try next?

[full dmesg output attached]
 

Attachments

  • dmesg.txt
    9.3 KB · Views: 147
Hi Dave;
set mixer1 as your default. Make sure you can hear audio from your speaker or headphones.
I tried the following:-
Code:
# sysctl hw.snd.default_unit=1
hw.snd.default_unit: 0 -> 1

Audacity now seems to be working - it tries to record and playback, and the monitor seems to be active - where before it didn't do anything, however, I've tried 2 different mics but no sound is being picked up.

Also tried...
Code:
# mixer -f /dev/mixer1
Mixer vol      is currently set to  78:78
Mixer pcm      is currently set to 100:100
Mixer line     is currently set to  71:71
Mixer mic      is currently set to  67:67
Mixer cd       is currently set to  50:50
Mixer rec      is currently set to  26:26
Mixer igain    is currently set to 100:100
Recording source: line, mic, cd

but still no sound being picked up. However, also, noted that now I at least have a line trace on xoscope where there was none before, but there is no waveform when I use the mic.
 
Look for a jump in the xoscope line when you plug / unplug the microphone.
No trace jump when I plug the mic in/out of the socket. I tried 2 mics, both front and back of the desktop tower.

Also, after reboot I lost the xoscope trace, so, I confirm it was the sysctl command rather than the mixer command that activates it. Any ideas where I might place that command so that it is activated on boot up?
 
1 step forward 2 steps back. Somehow got the mic partially active - it now makes a noise through the speakers - my voice will come through but the quality isn't great. Neither audacity nor xoscope are picking anything up. At least I have sound output back, I lost that for a while, sigh.
 
1 step forward 2 steps back. Somehow got the mic partially active - it now makes a noise through the speakers - my voice will come through but the quality isn't great. Neither audacity nor xoscope are picking anything up. At least I have sound output back, I lost that for a while, sigh.

Turns out, sound works on a browser, eg. youtube, but sample wav and mp3s don't don't pay through the speakers. Narrowing things down, but I'm calling it a day for tonight.
 
With pkg install sndio you get OpenBSDs command aucat. Try with it.

For example aucat -o file.wav for recording and aucat -i file.wav for playing. I get good quality (and big files).

For mp3 you do pkg install mpg123 for playing and compile audio/lame for recording.

You record with aucat -o - | lame -r - file.mpg and play with mpg123 file.mpg, but the quality is not the best.

That were my experiments.

With every VoIP softphone I have problems with audio.
 
Back
Top