Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB Audio (HyperX DuoCast) Microphone record volume is too low #308

Closed
nitin88 opened this issue Apr 26, 2023 · 4 comments
Closed

USB Audio (HyperX DuoCast) Microphone record volume is too low #308

nitin88 opened this issue Apr 26, 2023 · 4 comments

Comments

@nitin88
Copy link

nitin88 commented Apr 26, 2023

Hi,
I purchased HyperX DuoCast for office meetings and avoid through whole hoop of Motherboard specific PCIe sound card issues and support as I use pretty much latest hardware. But the sound issues around Linux is still killing me.

  1. My DuoCast hardware gain set to Max and still the record volume is too low.
  2. Alsamixer disabled Mic volume (atleast can't change anything from here)
  3. Pulse Audio Volume Control installed and has 100% volume (under Input devices)

I can record the sound clip and it's barely audible. If I set to 150% gain in Pulse Audio Volume Control, its acceptable and others can hear over meetings.
Can anyone please tell me how do I fix this? Everyone suggests using USB audio and with USB audio, it's pretty much same state.

If I use Logitech Webcam USB Audio for recording, everything works so smooth and recorded audio is on-par with expectations.

Based on 2, 3 - I don't think I have any other hardware issue than most likely Linux audio mess. Because I can increase the mic volume for Logitech in Alsamixer but not for HyperX Duocast.
I noticed following details

Control: name="PCM Playback Volume", index=0
    Info: id=8, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=-10240, max=-1536, dBmin=-4000, dBmax=-600

Alsa info:
alsa-info.txt

@perexg
Copy link
Member

perexg commented Apr 26, 2023

It seems that your hardware can do 24-bit samples:

Capture:
  Status: Stop
  Interface 1
    Altset 1
    Format: S24_3LE
    Channels: 2
    Endpoint: 0x81 (1 IN) (ASYNC)
    Rates: 44100
    Data packet interval: 1000 us
    Bits: 24
    Channel map: FL FR

.... and is without any Capture volume control:

Card: HP, Inc HyperX DuoCast at usb-0000:69:00.0-2.4, high speed
  Unit: 7
    Control: name="Mic Capture Switch", index=0
    Info: id=7, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 8
    Control: name="PCM Playback Volume", index=0
    Info: id=8, control=2, cmask=0x3, channels=2, type="S16"
    Volume: min=-10240, max=-1536, dBmin=-4000, dBmax=-600
  Unit: 8
    Control: name="PCM Playback Switch", index=0
    Info: id=8, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0
  Unit: 9
    Control: name="Extension Unit Switch", index=0
    Info: id=9, control=1, cmask=0x0, channels=1, type="BOOLEAN"
    Volume: min=0, max=1, dBmin=0, dBmax=0

so the only one solution is to use the software gain. You can set software gain above 150% using the command line (not via GUI) for the PA/PW server like:

pactl set-source-volume alsa_input.usb-C-Media_Electronics_Inc._KURZWEIL_Pro_Microphone_KM-1U-00.analog-stereo 200%

Blame your hw vendor, not the universal driver code.

@nitin88
Copy link
Author

nitin88 commented Apr 26, 2023

Blame your hw vendor, not the universal driver code.

I wish. But not sure what works in Linux unless we purchase and test each and every USB Audio card :(
I opted in for USB Audio card, hoping that I would avoid every issue with Motherboard specific/PCIe specific support.

pactl set-source-volume alsa_input.usb-C-Media_Electronics_Inc._KURZWEIL_Pro_Microphone_KM-1U-00.analog-stereo 200% -> Do this configuration persist forever or need to set is after every reboot?

I am just trying to see any way to override values https://github.com/torvalds/linux/blob/master/sound/usb/mixer.c#L1231
But consider I am very new to how this min/max or any of this configuration works. AFAIK, Windows doesn't request/report min/max DB. Would that help anyway to identify min/max values?

@perexg
Copy link
Member

perexg commented Apr 26, 2023

Blame your hw vendor, not the universal driver code.

I wish. But not sure what works in Linux unless we purchase and test each and every USB Audio card :( I opted in for USB Audio card, hoping that I would avoid every issue with Motherboard specific/PCIe specific support.

pactl set-source-volume alsa_input.usb-C-Media_Electronics_Inc._KURZWEIL_Pro_Microphone_KM-1U-00.analog-stereo 200% -> Do this configuration persist forever or need to set is after every reboot?

It persists.

I am just trying to see any way to override values https://github.com/torvalds/linux/blob/master/sound/usb/mixer.c#L1231 But consider I am very new to how this min/max or any of this configuration works. AFAIK, Windows doesn't request/report min/max DB. Would that help anyway to identify min/max values?

Again, there are no exposed capture volume controls (USB unit descriptors) from the hardware, so you cannot change the capture volume at all. There is only PCM Playback volume.

The 24-bit sample resolution is sufficient for the software volume gain. I think that the GUI tools may be revised to offer more wide gain range for such devices. Another way is to define a fixed threshold (fixed alsa-lib/UCM configuration), if the low-volume stream is not usable. But in this case, the software gain will be applied twice (alsa-lib + sound server).

@nitin88
Copy link
Author

nitin88 commented Apr 26, 2023

Thanks this worked wonderfully. To be honest, these are good quality mics. Even tested with 400% gain, I don't see any noise/distortion in sound recording.
They have hardware volume controls to control the mic volume, I wish we have better way to configure such things :)

@nitin88 nitin88 closed this as completed Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants