anolog (red socket) microphone broken, but works on win

If none of the more specific forums is the right place to ask

anolog (red socket) microphone broken, but works on win

Postby MagicPoulp » 2020-07-14 06:58

first, definitions:
Code: Select all
https://superuser.com/questions/144648/how-do-alsa-and-pulseaudio-relate
ALSA is the kernel level sound mixer, it manages your sound card directly. ALSA by itself can only handle one application at a time. Of course, there is 'dmix', which was written to solve this problem. (It's an ALSA module.)

PulseAudio is a software mixer, on top of the userland (like you'd run an app). When it runs, it uses Alsa - without dmix - and manages every kind of mixing, the devices, network devices, everything by itself.


I have an anolog (red socket) microphone that is not detected on buster. But the sound can be recorded on Windows as I could test in Zoom.
Note: the sound works in firefox-esr.

I lack ideas:
https://wiki.debian.org/PulseAudio
https://wiki.archlinux.org/index.php/Pu ... o/Examples

Code: Select all
$ rm -r ~/.config/pulse /tmp/pulse-*
$ pulseaudio --kill
$ pulseaudio --start
$ sudo alsamixer
I have run this and I have run alsamixer and unmuted the 2 microphones and increased the volume.



https://linuxconfig.org/how-to-test-mic ... cture-alsa
arecord -l
does not show anything but 2 intel devices.
then the arecord command fails
arecord -f S16_LE -d 10 -r 16000 --device="hw:1,0" /tmp/test-mic.wav

https://unix.stackexchange.com/question ... -available
but this command below works, it is just that aplay on the file does not produce the expected sound
arecord -f S24_LE -c 2 -r 192000 -d 20 test.wav

here they suggest this:
https://bugzilla.redhat.com/show_bug.cgi?id=802316

Code: Select all
I am able to use the mic through Google Chat in firefox by selecting "Internal Audio" after doing the following:

1) Add "load-module module-alsa-source device=hw:1,0,0" to /etc/pulse/default.pa before the line ".ifexists module-udev-detect.so"
2) Restart system.
3) Open alsamixer, make sure Internal Mic and Capture are toggled on and that both Mic Boost and Capture have high volumes.

When I use the mic like this, there is some noise heard from the speakers. Also the "Capture" item has to toggled on manually sometimes.

However, the mic should be automatically correctly detected through pulseaudio modprobe module. The mic works correctly in Linux Mint 12 by lowering the volume right channel of mic to 0. This solution isn't working in Fedora.



It loads alsa manually instead of dynamically with udev.
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#

But why would one need to do it manually?

here there seem to be a detection:
Code: Select all
pacmd list-sources | grep -e 'index:' -e device.string -e 'name:'
    index: 0
   name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor>
      device.string = "0"
  * index: 1
   name: <alsa_input.pci-0000_00_1f.3.analog-stereo>
      device.string = "front:0"



I am looking for a way to make the arecord command use the alsa_input above:
arecord -f S24_LE -c 2 -r 192000 -d 20 test.wav
this does not work, then aplay is not hearable.

This is what I have for error:

Code: Select all
arecord -f S16_LE -d 10 -r 16000 --device="hw:0,0" /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
arecord: set_params:1347: Channels count non available


This does not show an error
Code: Select all
arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC3234 Alt Analog [ALC3234 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


arecord -f S16_LE -d 3 -r 44100 --device="hw:0,0" -c 2 /tmp/test-mic.wav
arecord -f S16_LE -d 3 -r 44100 --device="hw:0,2" -c 2 /tmp/test-mic.wav

but aplay on the file produces no sound

Note: the last commands are run on a stereo socket, not on a separate red socket.

I have tried on 2 computers, one with a stereo socket, and one one a non stereo red socket.
For the stereo, there is no microphone shown in alsamixer, for the mono, there is one shown in alsamixer.
But for stereo, they show up using F4

very strange dmic stuff here
https://wiki.archlinux.org/index.php/Ad ... hone_input

They suggest adding msi in the snd-hda-intel module.
I tried and nothing. I will try more on the mono non-stereo socket, it is simpler. I am wrong to use the stereo socket with a non-compatible microphone.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30

Re: anolog (red socket) microphone broken, but works on win

Postby MagicPoulp » 2020-07-14 16:54

Update: this is fixed now
There was a hidden rear mic in alsamixer that I missed the first time since I only saw the front mic and had to use arrow keys to see the other mic.

solution:
connect microphone before booting
sudo rm -r ~/.config/pulse /tmp/pulse-*
pulseaudio --kill
pulseaudio --start
sudo alsamixer
unmute and add volume to the rear mic

then this command here works:
arecord -f S24_LE -c 2 -r 192000 -d 3 /tmp/test-mic.wa
And I get the recorded sound with aplay.

However, the sound is of extremely bad quality with lots of noise.
But this is another problem.

Update:
WIth the mic volume to 75, and the boost to 55, the sound quality becomes quite good. Especially good since my computer's ventilator is loud and I do not hear it at all.
the idea was found here:
https://askubuntu.com/questions/588823/ ... -14-04-lts


Those 2 documentation links for archlinux and debian provide very interesting information. And lots of advanced stuff. But finally, a very basic fix made it work.
Default settings if they work are better tha nsuper advanced stuff (enabling msi, etc)

https://wiki.debian.org/PulseAudio
https://wiki.archlinux.org/index.php/Pu ... o/Examples

Long ago, I could fix MIDI sound in a custom built wine. I used the timidity software MIDI sequencer. So this microphone fix was easy in comparison.


Now I need t ofix the red mic cable to the stereo socket. No idea where to start I wil lread more the links above.
MagicPoulp
 
Posts: 383
Joined: 2018-11-05 21:30


Return to General Questions

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable