Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

ALSA and microphone in discord-bin

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
imbaled
n00b
n00b
Posts: 8
Joined: Thu Aug 23, 2018 4:32 pm

ALSA and microphone in discord-bin

  • Quote

Post by imbaled » Fri Sep 28, 2018 11:46 am

Hello,

my mic works in steam and discords browser version, but not in audacity or discord-bin(apulse shows defaults, but no sound).

Code: Select all

imbaled@Purgatory ~ $ apulse discord
Discord 0.0.5
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/imbaled/.config/discord/0.0.5/modules
[Modules] Module installed file path: /home/imbaled/.config/discord/0.0.5/modules/installed.json
[Modules] Module download path: /home/imbaled/.config/discord/0.0.5/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discordapp.com/api/modules/stable/versions.json
[Modules] No module updates available.
[000:000] [19820] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 0}}
[000:000] [19820] (audio_send_stream.cc:261): Failed to set up send codec state.
[000:048] [19820] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 1}}
[000:048] [19820] (audio_send_stream.cc:261): Failed to set up send codec state.
[000:048] [19820] (audio_device_generic.cc:31): BuiltInAECIsAvailable: Not supported on this platform
[000:105] [19820] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 1}}
[000:105] [19820] (audio_send_stream.cc:261): Failed to set up send codec state.
If i set input mode to Voice Activity it starts to loop

Code: Select all

[028:876] [23938] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[028:876] [23938] (channel.cc:1323): ACM::Add10MsData() failed.

Code: Select all

imbaled@Purgatory ~ $ cat .asoundrc
pcm.primary {
        type hw
        card 0
        device 0
}


pcm.capture {
        type plug
        card 2
        device 0

}

Code: Select all

imbaled@Purgatory ~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC1150 Alt Analog [ALC1150 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Snowball [Blue Snowball], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

Code: Select all

imbaled@Purgatory ~ $ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
    HDA Intel PCH, ALC1150 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC1150 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC1150 Analog
    Front speakers
default:CARD=Snowball
    Blue Snowball, USB Audio
    Default Audio Device
sysdefault:CARD=Snowball
    Blue Snowball, USB Audio
    Default Audio Device
front:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    Front speakers
surround21:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Snowball,DEV=0
    Blue Snowball, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

Code: Select all

imbaled@Purgatory ~ $ lsmod | grep snd
snd_seq_dummy          16384  0
snd_seq                81920  1 snd_seq_dummy
snd_usb_audio         221184  2
snd_usbmidi_lib        32768  1 snd_usb_audio
snd_rawmidi            36864  1 snd_usbmidi_lib
snd_seq_device         16384  2 snd_seq,snd_rawmidi
snd_hda_codec_hdmi     57344  1
snd_hda_codec_realtek   102400  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
snd_hda_intel          40960  12
snd_hda_codec         135168  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           90112  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  2 snd_usb_audio,snd_hda_codec
snd_pcm               110592  10 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_timer              36864  7 snd_seq,snd_pcm
snd                    90112  31 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,
snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,
snd_rawmidi
soundcore              16384  1 snd

Code: Select all

imbaled@Purgatory ~ $ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0424:5734 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0424:274a Standard Microsystems Corp.
Bus 001 Device 005: ID 05af:0802 Jing-Mold Enterprise Co., Ltd
Bus 001 Device 004: ID 046d:c531 Logitech, Inc. C-U0007 [Unifying Receiver]
Bus 001 Device 003: ID 0424:2734 Standard Microsystems Corp.
Bus 001 Device 008: ID 0d8c:0005 C-Media Electronics, Inc. Blue Snowball
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[Moderator edit: broke long whitespace-free lines in code tags to fix thread layout. -Hu]
Last edited by imbaled on Thu Oct 25, 2018 4:42 am, edited 1 time in total.
Top
turtles
Veteran
Veteran
User avatar
Posts: 1713
Joined: Fri Dec 31, 2004 7:30 am

  • Quote

Post by turtles » Sat Oct 20, 2018 1:58 am

What USE flags did you use for media-sound/audacity ?
Did you check your alsamixer settings and see if the mic is muted?
Donate to Gentoo
Top
Muso
Veteran
Veteran
User avatar
Posts: 1052
Joined: Tue Oct 22, 2002 7:45 am
Location: The Holy city of Honolulu
Contact:
Contact Muso
Website

  • Quote

Post by Muso » Sat Oct 20, 2018 2:10 am

turtles wrote:What USE flags did you use for media-sound/audacity ?
Did you check your alsamixer settings and see if the mic is muted?
++

The M key will mute/unmute in alsamixer.
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Top
imbaled
n00b
n00b
Posts: 8
Joined: Thu Aug 23, 2018 4:32 pm

  • Quote

Post by imbaled » Tue Oct 23, 2018 8:20 pm

turtles wrote:What USE flags did you use for media-sound/audacity ?
Did you check your alsamixer settings and see if the mic is muted?
Muso wrote:The M key will mute/unmute in alsamixer.
Thanks your for replys.

I forgot to set USE flags for audacity, it seems working now.
I mentioned mic works in steam so it's not muted, i also checked alsamixer and i can't even mute my mic.

Discord updated but failed to download discord_cloudsync(it should not effect to mic?)
Discord still won't show any audio device. Except when i run it with apulse, still no audio from mic and loops same thing when i set input mode to Voice Activity.

Code: Select all

Purgatory /etc/portage/package.use # discord
Discord 0.0.5
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /root/.config/discord/0.0.5/modules
[Modules] Module installed file path: /root/.config/discord/0.0.5/modules/installed.json
[Modules] Module download path: /root/.config/discord/0.0.5/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discordapp.com/api/modules/stable/versions.json
[Modules] No module updates available.
[000:000] [11127] (audio_device_pulse_linux.cc:1549): failed to load symbol table
[000:000] [11127] (audio_device_pulse_linux.cc:151): failed to initialize PulseAudio
[000:000] [11127] (audio_device_impl.cc:321): Audio device initialization failed.
[Modules] Starting to install discord_cloudsync...
[Modules] Fetching discord_cloudsync@0 from https://discordapp.com/api/modules/stable/discord_clo
[Modules] Streaming discord_cloudsync@0 [255 bytes] to /root/.config/discord/0.0.5/modules/pending/discord_cloudsync-0.zip
[Modules] Finished module downloads. [success: 0] [failure: 1]
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Wed Oct 24, 2018 12:06 am

I'm pretty sure discord-bin is just plain broken. On my computer it won't output sound reliably (it's scratchy and distorted), but the browser version works fine. Nothing can be done about that until upstream fixes it.
Top
imbaled
n00b
n00b
Posts: 8
Joined: Thu Aug 23, 2018 4:32 pm

  • Quote

Post by imbaled » Wed Oct 24, 2018 12:35 am

Ant P. wrote:I'm pretty sure discord-bin is just plain broken. On my computer it won't output sound reliably (it's scratchy and distorted), but the browser version works fine. Nothing can be done about that until upstream fixes it.
Yes, but without push to talk... Any idea if it works with pulseaudio? Not sure if I even want try, had so much trouble with it before
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Wed Oct 24, 2018 12:55 am

I'm using PA, so you probably wouldn't escape the bugs by switching.

But if you want push-to-talk, you could use a global (desktop) keyboard shortcut to mute/unmute the microphone. PA would make it possible to mute only the browser input while leaving the mic active for other things, if needed.
Top
imbaled
n00b
n00b
Posts: 8
Joined: Thu Aug 23, 2018 4:32 pm

  • Quote

Post by imbaled » Wed Oct 24, 2018 1:13 am

Ant P. wrote:I'm using PA, so you probably wouldn't escape the bugs by switching.

But if you want push-to-talk, you could use a global (desktop) keyboard shortcut to mute/unmute the microphone. PA would make it possible to mute only the browser input while leaving the mic active for other things, if needed.
That would be great, but i don’t know how to do it. I also can't mute my mic in alsamixer
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Wed Oct 24, 2018 6:04 am

imbaled wrote:
Ant P. wrote:I'm pretty sure discord-bin is just plain broken. On my computer it won't output sound reliably (it's scratchy and distorted), but the browser version works fine. Nothing can be done about that until upstream fixes it.
Yes, but without push to talk... Any idea if it works with pulseaudio? Not sure if I even want try, had so much trouble with it before
My discord stopped working with apulse, and pulseaudio doesn't play nicely with my sound card regarding capture.
It's not too hard to neuter pulseaudio and force it to just use specific modules/devices as source and sink, this gives the advantage of allowing pulseaudio to resample client connections.

Before you go that route though, discord needs pulseaudio to work, either fully fledged or via apulse. Apulse uses the two environment variables APULSE_CAPTURE_DEVICE and APULSE_PLAYBACK_DEVICE, which default (aptly) to "default".
You may have success with my old discord wrapper script

Code: Select all

#!/bin/bash
export APULSE_CAPTURE_DEVICE=hw:0,0
export APULSE_PLAYBACK_DEVICE=plug:speakers
/usr/bin/apulse /usr/bin/discord
if you tailor it to match your input and output devices. Technically, it still works here, but doesn't allow me to fix the underlying issues I have with alsa.

If you have no luck with it, say so and I can post what I did to tame pulseaudio, though it's a lot more involved.
Top
imbaled
n00b
n00b
Posts: 8
Joined: Thu Aug 23, 2018 4:32 pm

  • Quote

Post by imbaled » Wed Oct 24, 2018 11:08 am

Ralphred wrote:
imbaled wrote:
Ant P. wrote:I'm pretty sure discord-bin is just plain broken. On my computer it won't output sound reliably (it's scratchy and distorted), but the browser version works fine. Nothing can be done about that until upstream fixes it.
Yes, but without push to talk... Any idea if it works with pulseaudio? Not sure if I even want try, had so much trouble with it before
My discord stopped working with apulse, and pulseaudio doesn't play nicely with my sound card regarding capture.
It's not too hard to neuter pulseaudio and force it to just use specific modules/devices as source and sink, this gives the advantage of allowing pulseaudio to resample client connections.

Before you go that route though, discord needs pulseaudio to work, either fully fledged or via apulse. Apulse uses the two environment variables APULSE_CAPTURE_DEVICE and APULSE_PLAYBACK_DEVICE, which default (aptly) to "default".
You may have success with my old discord wrapper script

Code: Select all

#!/bin/bash
export APULSE_CAPTURE_DEVICE=hw:0,0
export APULSE_PLAYBACK_DEVICE=plug:speakers
/usr/bin/apulse /usr/bin/discord
if you tailor it to match your input and output devices. Technically, it still works here, but doesn't allow me to fix the underlying issues I have with alsa.

If you have no luck with it, say so and I can post what I did to tame pulseaudio, though it's a lot more involved.
Thanks for reply. I will try this soon as i get home.


Edit. It seems that my .asoundrc got wrong type changed plug:2,0 to hw:2,0(as it shows in audacity).

I tried script, but still now working and export APULSE_PLAYBACK_DEVICE=hw:0,0 stops output audio too.

Code: Select all

imbaled@Purgatory ~ $ cat discord.sh
#!/bin/bash
export APULSE_CAPTURE_DEVICE=hw:2,0
#export APULSE_PLAYBACK_DEVICE=hw:0,0

/usr/bin/apulse /usr/bin/discord
imbaled@Purgatory ~ $ ./discord.sh
Discord 0.0.5
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/imbaled/.config/discord/0.0.5/modules
[Modules] Module installed file path: /home/imbaled/.config/discord/0.0.5/modules/installed.json
[Modules] Module download path: /home/imbaled/.config/discord/0.0.5/modules/pending
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discordapp.com/api/modules/stable/versions.json
[Modules] No module updates available.
[Modules] Starting to install discord_cloudsync...
[Modules] Fetching discord_cloudsync@0 from https://discordapp.com/api/modules/stable/discord_cloudsync/0
[Modules] Streaming discord_cloudsync@0 [255 bytes] to /home/imbaled/.config/discord/0.0.5/modules/pending/discord_cloudsync-0.zip
[Modules] Finished module downloads. [success: 0] [failure: 1]
[000:000] [18766] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[000:000] [18766] (channel.cc:1323): ACM::Add10MsData() failed.
[002:572] [18769] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[002:572] [18769] (channel.cc:1323): ACM::Add10MsData() failed.
[002:582] [18769] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[002:582] [18769] (channel.cc:1323): ACM::Add10MsData() failed.
[002:592] [18769] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[002:592] [18769] (channel.cc:1323): ACM::Add10MsData() failed.
[002:603] [18769] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
[002:603] [18769] (channel.cc:1323): ACM::Add10MsData() failed.
[002:612] [18769] (audio_coding_module.cc:1210): Add10MsData failed: No send codec is registered.
This happens when I join voice channel

Code: Select all

[[963:167] [18206] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 0}}
[963:167] [18206] (audio_send_stream.cc:261): Failed to set up send codec state.
[963:252] [18206] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 1}}
[963:252] [18206] (audio_send_stream.cc:261): Failed to set up send codec state.
[963:252] [18206] (audio_device_generic.cc:31): BuiltInAECIsAvailable: Not supported on this platform
[963:334] [18206] (audio_send_stream.cc:519): Unable to create encoder for {name: opus, clockrate_hz: 48000, num_channels: 1, parameters: {stereo: 0, usedtx: 0, useinbandfec: 1}}
[963:334] [18206] (audio_send_stream.cc:261): Failed to set up send codec state.
Top
Ralphred
l33t
l33t
Posts: 822
Joined: Tue Dec 31, 2013 11:52 am

  • Quote

Post by Ralphred » Mon Nov 05, 2018 8:12 pm

So, is the general consensus that apulse doesn't work with Discord anymore?

This basically leaves you with the option of using pulseaudio proper. I have done this, and I have tamed pulseaudio to my every whim, but I use jack (for other reasons) and this seems to be key in my success in taming pulse.

If you are interested in going down that rabbit hole, say so and I'll explain what's going on here.
Also, I recently built a system for my son, who joins me on discord and plays the same games I do, so my theories about a simple jack/pulse layer do work too.
Top
TechwoIf
n00b
n00b
Posts: 40
Joined: Mon Aug 06, 2007 3:50 am

  • Quote

Post by TechwoIf » Sun Dec 16, 2018 4:54 am

Ralphred wrote:So, is the general consensus that apulse doesn't work with Discord anymore?
I use apulse with discord and its working for me. The command line I use is:

Code: Select all

APULSE_CAPTURE_DEVICE=plug:headsnooped APULSE_PLAYBACK_DEVICE=plug:dmixs51headphone apulse discord
I have separate entries in the asound.conf for the card that playback via speakers and the card that is hooked up to the headphones. I found out that telling apulse to use hw:2,0 results in my mic sounding like a chipmunk.

Note: My headphone card is a Sennheiser GTX 1000 headphone device. This is why I have the plugin configure for surround sound on the headphones.
Top
lorschy
Apprentice
Apprentice
Posts: 191
Joined: Tue Jul 16, 2002 9:47 pm

  • Quote

Post by lorschy » Fri Feb 01, 2019 10:44 pm

Hi guys,

i had the same problem - turning off noise suppression solved it for me .

Credits go to:
https://aur.archlinux.org/packages/discord/
Top
Post Reply

13 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic