Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

USB Microphone

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
Fxy
Posts: 14
Joined: 2022-09-14 18:58

USB Microphone

#1 Post by Fxy »

Hi so i have been getting some problems with my mic, for some reason my studio mic does not work with linux, its detected but when i click the play back on discord for example it has no playback, is this like a driver issue or something?
Thanks - Pictures:

Image
Image

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#2 Post by FreewheelinFrank »

Is the microphone mono? The input device name suggests it is, but Alsa has two channels. Try muting one then the other channel. It's possible that one channel is out of phase with the other. (Left channel: Q up / Z down Right channel: E up / C down.)

If that doesn't work, post output of the Alsa diagnostic commands here:

https://wiki.audacityteam.org/wiki/USB_mic_on_Linux

User avatar
oswaldkelso
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1490
Joined: 2005-07-26 23:20
Location: UK
Has thanked: 1 time
Been thanked: 58 times

Re: USB Microphone

#3 Post by oswaldkelso »

FreewheelinFrank wrote: 2022-09-14 22:48 Is the microphone mono? The input device name suggests it is, but Alsa has two channels. Try muting one then the other channel. It's possible that one channel is out of phase with the other. (Left channel: Q up / Z down Right channel: E up / C down.)

If that doesn't work, post output of the Alsa diagnostic commands here:

https://wiki.audacityteam.org/wiki/USB_mic_on_Linux
bookmarked tyvm :shock:
Free Software Matters
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
My oldest used PC: 1999 imac 333Mhz 256MB PPC abandoned by Debian

scythefwd
Posts: 47
Joined: 2022-03-13 23:05
Been thanked: 2 times

Re: USB Microphone

#4 Post by scythefwd »

I had an issue where my mic and my other audio inputs weren't being played back to me and I had to enable the loopback module (pactl load module loopback-module) to allow me to hear it through my headset. I was getting sound sent, and IF I recorded via something like obs and played the video back it worked...

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#5 Post by Fxy »

is this it or am i being dumb lol im also a bit new so
Bus 002 Device 008: ID 0c76:120c JMTek, LLC. DRELANELANMIC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0c76 JMTek, LLC.
idProduct 0x120c
bcdDevice 1.00
iManufacturer 1 Solid State System Co.,Ltd.
iProduct 2 DRELANELANMIC
iSerial 3 010000000000
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0096
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 0x002e
bInCollection 1
baInterfaceNr(0) 1
AudioControl Interface Descriptor:
bLength 12
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0258 1x 600 bytes
bInterval 1
bRefresh 0
bSynchAddress 0
AudioStreaming Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 0 Undefined
wLockDelay 0x0000
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 62
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 32

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: USB Microphone

#6 Post by Segfault »

Of course your USB mic has no playback, it is an input device. For kernel this is a separate soundcard, it has mono input and that's all. No output, no stereo channels. To use it as input you need to choose it in your recording application. For playback you need to use another soundcard. This all is valid with plain ALSA. I'm not sure how to use it with Pulse as I don't use PulseAudio.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#7 Post by FreewheelinFrank »

Fxy wrote: 2022-09-15 11:35 is this it or am i being dumb lol im also a bit new so
You should give the command you issued and the output in code tags.

So (I'm guessing that the command was lsusb):

Code: Select all

$ lsusb --verbose | less

Bus 002 Device 008: ID 0c76:120c JMTek, LLC. DRELANELANMIC
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0 
etc
Nothing really useful in that output, for me anyway.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#8 Post by FreewheelinFrank »

Segfault wrote: 2022-09-15 19:12 Of course your USB mic has no playback, it is an input device. For kernel this is a separate soundcard, it has mono input and that's all. No output, no stereo channels. To use it as input you need to choose it in your recording application. For playback you need to use another soundcard. This all is valid with plain ALSA. I'm not sure how to use it with Pulse as I don't use PulseAudio.
It looks like the OP is getting no playback from the test utility in whatever application they were running (I don't recognise it).

Although it's a momo microphone, there are quirks with some microphones that lead to Alsa seeing two channels with one being out of polarity, and the user must elect one channel only. It looks like Alsa is using two channels for microphone input from the screenshot of alsamixer, which is why I suggested the OP try recording with one channel at a time to see if anything is recorded.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#9 Post by FreewheelinFrank »

Output of

Code: Select all

$ arecord --list-devices
might be useful.

Then a test with

Code: Select all

$ arecord -f [format] -D hw:card,device -d [duration]
modified as per the example in the link:

Code: Select all

$ arecord -f cd -D hw:1,0 -d 20 test.wav
Change hw:1,0 according to the real output of the first command obviously.

Then see if you get any playback.

Code: Select all

$ aplay -f cd test.wav
If you do, then, as the link says, you need to adjust the settings of your recording application. If not, then Alsa is not getting the correct input from the microphone.

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#10 Post by Fxy »

sorry for the late response

arecord --list-devices output:

Code: Select all

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC662 rev1 Alt Analog [ALC662 rev1 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: DRELANELANMIC [DRELANELANMIC], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Headset [Speedlink Quyre Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
and the recording test just returns this
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
arecord: set_params:1390: Sample format non available
Available formats:
- S24_3LE

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#11 Post by FreewheelinFrank »

Have you tried playing with the Alsa channels as per post #2?

Can you confirm please that the command you issued was

Code: Select all

$ arecord -f cd -D hw:2,0 -d 20 test.wav
?

Thanks.

Edit:

If so, try changing the format to the one asked for:

Code: Select all

$ arecord -f  S16_LE -D hw:2,0 -d 20 test.wav

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#12 Post by Fxy »

Code: Select all

Recording WAVE 'test.wav' : Signed 24 bit Little Endian in 3bytes, Rate 8000 Hz, Mono
Warning: rate is not accurate (requested = 8000Hz, got = 44100Hz)
         please, try the plug plugin
arecord: xrun:1733: read/write error, state = PREPARED

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#13 Post by FreewheelinFrank »

FreewheelinFrank wrote: 2022-09-14 22:48 Is the microphone mono? The input device name suggests it is, but Alsa has two channels. Try muting one then the other channel. It's possible that one channel is out of phase with the other. (Left channel: Q up / Z down Right channel: E up / C down.)
FreewheelinFrank wrote: 2022-09-16 05:45 Although it's a momo microphone, there are quirks with some microphones that lead to Alsa seeing two channels with one being out of polarity, and the user must elect one channel only. It looks like Alsa is using two channels for microphone input from the screenshot of alsamixer, which is why I suggested the OP try recording with one channel at a time to see if anything is recorded.
Did you try this? It is the first thing to try. I'm assuming you tried it and it didn't work, but I think we need an explicit answer before going on, just so assume doesn't make an ass of u and me.

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#14 Post by Fxy »

yep i have tried it

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#15 Post by FreewheelinFrank »

Fxy wrote: 2022-09-23 19:00 yep i have tried it
OK, thanks.

The test record and playback commands work for me in Bullseye with the webcam microphone.

The errors you are getting suggest some sort of mismatch between Alsa and the microphone.

Do you have either of these files (default is they don't exist).

Code: Select all

~/asoundrc or etc/asound.conf
?

You may need to create a .asoundrc file to configure the microphone: mono, rate, plugin etc

https://alsa.opensrc.org/Asoundrc

Setting asymmetrical (USB mic in, soundcard out) devices might be necessary.

https://wiki.audacityteam.org/wiki/USB_mic_on_Linux

https://raspberrypi.stackexchange.com/q ... -sound-out

Could be a case of hack it and see until you find what works for your mic.

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#16 Post by Fxy »

Hi, ok so i made the file etc/asound.conf and put

Code: Select all

pcm.!default {
    type asym
    playback.pcm "hw:3,0"
    capture.pcm "hw:2,0"
}
this code in and then i rebooted
but now the mic on my headset doesn't work and the mic that im trying to fix, it has no output

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#17 Post by FreewheelinFrank »

You will have to experiment with other Alsa syntax options, for example:

Code: Select all

pcm.!default {
         type asym
         playback.pcm {
                 type plug
                 slave.pcm "hw:0,0"
         }
         capture.pcm {
                 type plug
                 slave.pcm "hw:1,0"
         } 
 }
Maybe also rate and mono. The Alsa page explains what they are:

https://alsa.opensrc.org/Asoundrc

Try a test record after each change (you will probably need to restart Alsa or reboot) - the error messages should give you a clue about changes you need to make. The spec sheet for the mic might also give you a clue. Does it mention a rate in Hz?

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2082
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 225 times

Re: USB Microphone

#18 Post by FreewheelinFrank »

Is the mic plugged into a USB 3 socket? Seems that can fix the microphone sometimes.

https://bbs.archlinux.org/viewtopic.php?id=272799

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#19 Post by Fxy »

yep its usb 3

Fxy
Posts: 14
Joined: 2022-09-14 18:58

Re: USB Microphone

#20 Post by Fxy »

nevermind its usb 2

Post Reply