Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Microphone not working in two apps simultaneously.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Wed Jun 16, 2021 9:10 am    Post subject: Microphone not working in two apps simultaneously. Reply with quote

I am trying to use my microphone and have sound from it go to Audacity and to a webapp in Firefox. I have done this before with very similar hardware in a different Linux OS, but now I can get either Firefox or Audacity working, but not both at the same time. In the best config I have managed, when Firefox starts using the mic audio no longer sees the audio device

I have 3 Sound devices:
  • Onboard sound - Alsa calls it "Generic", a Starship/Matisse sound chip common on Ryzen board
  • HDMI - Provided by the Radeon kernel driver, I do not want to use this
  • A good mic and USB Interface - Alsa calls it "CODEC", A Behringer interface and Shure MV7 responds to default drivers.


All of these work just fine in audacity.

I got these all working in Firefox through various Alsa and PulseAudio configurations, but whenever I got the good mic working in firefox audacity could no longer detect it. I can restart the Alsa service (#rc-service alsasound restart) and get audacity to pick up the microphone again. Without the configs below Firefox attempts to use the Monitor of Starship Matisse as the microphone input, which means the webapp hears my desktop output instead of my microphone.

I don't have a ton of experience configuring Alsa, but I think I need to duplicate the microphone input, give each copy a name, then send one to PulseAudio for Firefox to pick up, and the use the other in audacity. I am not certain that this is correct.

Here are some relevant details:

My current /etc/asound.conf Just has some aliases in it, I don't know how to do much more:
Code:
# Declare Named versions of the cards I want
pcm.MatisseOutput {
    type hw
    card Generic
    device 0
}
ctl.MatisseOutput {
    type hw
    card Generic
    device 0
}

pcm.BerhingerInput {
    type hw
    card CODEC
    device 0
}
ctl.BerhingerInput {
    type hw
    card CODEC
    device 0
}


I got Firefox to see the good mic by appending this to the end of the default config:
Code:
load-module module-alsa-sink device=MatisseOutput
load-module module-alsa-source device=BerhingerInput

set-default-sink MatisseOutput
set-default-source BerhingerInput


Recording devices per arecord:
Code:
$ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
usbstream:CARD=HDMI
    HDA ATI HDMI
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    Front output / input
usbstream:CARD=Generic
    HD-Audio Generic
    USB Stream Output
sysdefault:CARD=CODEC
    USB Audio CODEC, USB Audio
    Default Audio Device
front:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    Front output / input
usbstream:CARD=CODEC
    USB Audio CODEC
    USB Stream Output



Playback devices per aplay:
Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
pulse
    PulseAudio Sound Server
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, Generic Digital
    HDMI Audio Output
usbstream:CARD=HDMI
    HDA ATI HDMI
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALCS1200A Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    2.1 Surround output to Front and Subwoofer speakers
SNIP~ cut out several other surround entries
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALCS1200A Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=Generic
    HD-Audio Generic
    USB Stream Output
sysdefault:CARD=CODEC
    USB Audio CODEC, USB Audio
    Default Audio Device
front:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    Front output / input
surround21:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
SNIP~ cut out several other surround entries
surround71:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CODEC,DEV=0
    USB Audio CODEC, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=CODEC
    USB Audio CODEC
    USB Stream Output


Last edited by Sqeaky on Tue Jun 22, 2021 3:14 pm; edited 2 times in total
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 940
Location: Belgium

PostPosted: Wed Jun 16, 2021 9:52 am    Post subject: Reply with quote

Would Firefox support JACK? If so, that would make this easier. Connect JACK to the audio device with the mic and in JACK, route the output of your mic to whatever application you want. Audacity supports Jack reasonably well over Portaudio.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Thu Jun 17, 2021 1:42 am    Post subject: Reply with quote

I see the Jack use flag: https://packages.gentoo.org/packages/www-client/firefox

I will start reading. I don't know anything about JACK configuration. That sort of puts me in a similar situation where I need to configure something I don't know anything about.
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 470

PostPosted: Thu Jun 17, 2021 1:07 pm    Post subject: Reply with quote

Jack's not hard to configure, though, for what you are trying to do I think it would be easier to run jack with a "dummy" backend, so it doesn't try to "take over" any alsa output hardware.

Make sure you install jack2, then use /usr/bin/alsa_in to create specific connections to alsa microphone hardware. Everything else should connect automatically as long as you don't set -aa on the command line when you start jack. If you find the "automatic" connection is wrong, DO set -aa on the command line, and use something like qjackctl* to patch the output client (alsa_in) to the input client (firefox, or a pulseaudio source).

*Turn off 'Replace Connections with Graph button' in Setup >>Misc, much easier to work with for simple stuff like this
Back to top
View user's profile Send private message
Fitzcarraldo
Advocate
Advocate


Joined: 30 Aug 2008
Posts: 2034
Location: United Kingdom

PostPosted: Thu Jun 17, 2021 7:58 pm    Post subject: Reply with quote

Sqeaky,

I'm curious as to why this is not working in your case. I do not have Jack installed in Gentoo Linux Stable, just ALSA and PulseAudio, yet both Audacity and an online voice recorder (https://online-voice-recorder.com/) in Firefox are able to record simultaneously from my laptop's built-in microphone (the laptop also has HDMI).

When I click on the Record buttons in both apps, PulseAudio Volume Control show two streams on its Recording tab, labelled 'Firefox: AudioCallbackDriver' and 'ALSA plug-in [audacity]: ALSA Capture'.

I'm no expert in ALSA and PulseAudio, but below are some details of my installation, including which USE flags are set, in case it is of help:

Code:
$ eix -I alsa
[I] media-libs/alsa-lib
     Available versions:  1.2.2-r1 1.2.3.2-r1 1.2.4 [M]~1.2.5 {alisp debug doc python +thread-safety ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="uclibc" PYTHON_SINGLE_TARGET="(+)python3_8 python3_9"}
     Installed versions:  1.2.4(15:26:19 02/06/21)(thread-safety -alisp -debug -doc -python ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" ELIBC="-uclibc" PYTHON_SINGLE_TARGET="python3_9 -python3_8")
     Homepage:            https://alsa-project.org/
     Description:         Advanced Linux Sound Architecture Library

[I] media-libs/alsa-topology-conf
     Available versions:  1.2.2 1.2.3 1.2.4 [M]~1.2.5
     Installed versions:  1.2.4(17:52:34 28/05/21)
     Homepage:            https://www.alsa-project.org
     Description:         ALSA topology configuration files

[I] media-libs/alsa-ucm-conf
     Available versions:  1.2.2 1.2.3 1.2.4 [M]~1.2.5
     Installed versions:  1.2.4(17:52:35 28/05/21)
     Homepage:            https://www.alsa-project.org
     Description:         ALSA ucm configuration files

[I] media-plugins/alsa-plugins
     Available versions:  1.2.2 {arcam_av debug ffmpeg jack libsamplerate +mix oss pulseaudio speex +usb_stream ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  1.2.2(16:55:43 11/10/20)(ffmpeg mix pulseaudio speex usb_stream -arcam_av -debug -jack -libsamplerate -oss ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32")
     Homepage:            http://www.alsa-project.org/
     Description:         ALSA extra plugins

[I] media-sound/alsa-utils
     Available versions:  (0.9) 1.2.2 1.2.3 1.2.4 [M]~1.2.5
       {bat doc +libsamplerate +ncurses nls selinux}
     Installed versions:  1.2.4(0.9)(20:26:51 28/05/21)(libsamplerate ncurses nls -bat -doc -selinux)
     Homepage:            https://alsa-project.org/
     Description:         Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)

[I] media-sound/alsamixergui
     Available versions:  0.9.0.1.2-r4
     Installed versions:  0.9.0.1.2-r4(02:42:23 20/06/19)
     Homepage:            https://wiki.gentoo.org/wiki/No_homepage
     Description:         FLTK based amixer Frontend

Found 6 matches

Code:
$ eix -I media-sound/pulseaudio
[I] media-sound/pulseaudio
     Available versions:  13.0-r1^t {+X +alsa +alsa-plugin +asyncns bluetooth +caps dbus doc elogind equalizer gconf +gdbm +glib gtk ipv6 jack libsamplerate lirc native-headset ofono-headset +orc oss qt5 realtime selinux sox ssl system-wide systemd tcpd test +udev +webrtc-aec zeroconf ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_ARM="neon" KERNEL="linux"}
     Installed versions:  13.0-r1^t(16:48:45 04/05/21)(X alsa alsa-plugin asyncns bluetooth caps dbus elogind gdbm glib gtk ipv6 orc qt5 ssl tcpd udev webrtc-aec zeroconf -doc -equalizer -gconf -jack -libsamplerate -lirc -native-headset -ofono-headset -oss -realtime -selinux -sox -system-wide -systemd -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" CPU_FLAGS_ARM="-neon" KERNEL="linux")
     Homepage:            https://www.freedesktop.org/wiki/Software/PulseAudio/
     Description:         A networked sound server with an advanced plugin system

Code:
$ eix -I media-sound/audacity
[I] media-sound/audacity
     Available versions:  2.4.2-r1^t {alsa doc ffmpeg +flac id3tag jack +ladspa +lv2 mad ogg oss portmidi +portmixer portsmf sbsms twolame vamp +vorbis +vst}
     Installed versions:  2.4.2-r1^t(19:26:16 11/10/20)(alsa ffmpeg flac ladspa lv2 mad ogg portmixer vorbis vst -doc -id3tag -jack -oss -portmidi -portsmf -sbsms -twolame -vamp)
     Homepage:            https://web.audacityteam.org/
     Description:         Free crossplatform audio editor

Code:
$ eix -I www-client/firefox
[I] www-client/firefox
     Available versions:  78.10.1(0/esr78) (~)78.11.0(0/esr78) (~)88.0.1(0/88) (~)89.0(0/89) {+clang dbus debug eme-free geckodriver +gmp-autoupdate hardened hwaccel jack lto +openh264 pgo pulseaudio screencast selinux sndio +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx +system-webp wayland wifi CPU_FLAGS_ARM="neon" L10N="ach af an ar ast az be bg bn br bs ca ca-valencia cak cs cy da de dsb el en-CA en-GB eo es-AR es-CL es-ES es-MX et eu fa ff fi fr fy ga gd gl gn gu he hi hr hsb hu hy ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my nb ne nl nn oc pa pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv szl ta te th tl tr trs uk ur uz vi xh zh-CN zh-TW"}
     Installed versions:  89.0(0/89)(20:45:12 03/06/21)(clang dbus gmp-autoupdate openh264 pulseaudio screencast system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland wifi -debug -eme-free -geckodriver -hardened -hwaccel -jack -lto -pgo -selinux -sndio CPU_FLAGS_ARM="-neon" L10N="en-GB es-ES pt-BR -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -dsb -el -en-CA -eo -es-AR -es-CL -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW")
     Homepage:            https://www.mozilla.com/firefox
     Description:         Firefox Web Browser

Code:
$ cat /etc/asound.conf
cat: /etc/asound.conf: No such file or directory

Code:
$ grep module-alsa-sink /etc/pulse/default.pa
#load-module module-alsa-sink

Code:
$ grep module-alsa-source /etc/pulse/default.pa
#load-module module-alsa-source device=hw:1,0

Code:
$ grep set-default-sink /etc/pulse/default.pa             
#set-default-sink output

Code:
$ grep set-default-source /etc/pulse/default.pa   
#set-default-source input

Code:
$ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
speexrate
    Rate Converter Plugin Using Speex Resampler
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
usbstream:CARD=HDMI
    HDA Intel HDMI
    USB Stream Output
sysdefault:CARD=PCH
    HDA Intel PCH, VT1802 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    Front output / input
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output

Code:
$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
speexrate
    Rate Converter Plugin Using Speex Resampler
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
hdmi:CARD=HDMI,DEV=0
    HDA Intel HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA Intel HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA Intel HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA Intel HDMI, HDMI 3
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
    HDA Intel HDMI, HDMI 4
    HDMI Audio Output
usbstream:CARD=HDMI
    HDA Intel HDMI
    USB Stream Output
sysdefault:CARD=PCH
    HDA Intel PCH, VT1802 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, VT1802 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output


I've also tried the same exercise on a desktop machine running Lubuntu 20.10. That has onboard audio, HDMI audio and a USB Webcam with a built-in microphone. I get the same result, viz. both Audacity and an online recorder in Firefox can record from the microphone simultaneously.
_________________
Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 940
Location: Belgium

PostPosted: Fri Jun 18, 2021 6:39 am    Post subject: Reply with quote

I never had to configure much with JACK (*). But it is far easier to use something like Qjackctl to work with it. Don't think for your application there is a must for Jack2, both will work fine.

Jack doesn't take over the hardware, it just sits between Alsa and the applications. It takes the inputs and outputs of Alsa and the applications and provide routing (and synchronising) between all of them. Once it is running, it becomes the only way for applications to connect to Alsa, so some applications won't be able to get audio if thay do not speak Jack or Pulseaudio. Pulseaudio is a way to get pure Alsa applications to get a Jack connection. Only problem I see is that Pulseaudio connections from Audacity are only there when Audacity is playing or recording. Stop play/rec and they disappear.

Once in Qjackctl, you can get a "connection" window where you see all your inputs and outputs of sounddevices and applications. There you can just route them the way you want. Single output of an application to multiple hardware outputs, application to application of a single hardware input to multiple applications etc. There is a possibility to save the connections as well (but I never use it).

(*) some things that you might need to configure are samplerate, buffersize and which alsa device to use.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 470

PostPosted: Fri Jun 18, 2021 4:05 pm    Post subject: Reply with quote

Sqeaky's issue seems to stem from Audacity's patchy pulseaudio support (normally caused by the portaudio backend). As he has pulse running, and successfully passing "source(s)" to firefox it's best not to disturb this interface, and concentrate on audacity. Audacity's portaudio will try and gain audio reservation over alsa hardware, if that hardware is in use by pulseaudio it will fail; if pulseaudio has stopped using that particular hardware at that time it may relinquish it to portaudio, but that would stop it re-connecting to it until audacity is either stopped or switched to a different backend.

Enter the jack solution; buy building audacity with USE="-alsa jack" it will never even probe the alsa hardware, it will however offer to connect it's input/outputs to any jack readable/writable client currently attached to the jack server. Starting jackd connected to any hardware is unnecessary, we just need it to act as a conduit between audacity and pulseaudio (which we know already connects to the "right mic").

First we need a ~/.jackdrc to tell pulseaudio how to start the jack server when it tries to load the sink and source modules. We need no hardware so -d dummy, and don't want any dummy hardware for things to connect to by default, because that doesn't lead anywhere so -P 0 -C 0. The last thing is to match the sample rate to pulseaudio so pacmd list|grep "name:\|sample spec:", use it to make -r <rate>. This gives us
~/.jackdrc:
/usr/bin/jackd -d dummy -C 0 -P 0 -r 44100
We can test this from a terminal and look for errors while we alter pulseaudio from a terminal.

Now we need to connect pulseaudio to the jack server, this section is a bit counter intuitive, but run with it...
Code:
pacmd load-module module-jack-source channels=6 connect=0
pacmd load-module module-jack-sink channels=2 connect=0
Now we need to connect the jack input/output to an actual sink/source
Code:

pacmd load-module module-loopback source=jack_in sink=MatisseOutput source_dont_move=true sink_dont_move=true
pacmd load-module module-loopback source=BerhingerInput sink=jack_out source_dont_move=true sink_dont_move=true
^^ resampling of these loopbacks is cpu intensive, which is why it's important to match the default-sample-rate with what we set in jackd. It's VERY important to include the *dont_move=true, because if you don't and jackd crashes, pulseaudio oh-so-helpfully creates a feedback loop.

Start audacity and check it's behaving as anticipated, if so update your default.pa to include the pacmd lines from above
default.pa:
load-module module-jack-sink channels=2 connect=0
load-module module-jack-source channels=6 connect=0
load-module module-loopback source=jack_in sink=MatisseOutput sink_dont_move=true source_dont_move=true
load-module module-loopback sink=jack_out source=BerhingerInput sink_dont_move=true source_dont_move=true


If you ever use any kind of sound server software, the best practice to stop hardware conflicts is to actively stop anything other than that sound server software connecting to alsa. You can disable alsa support where support for your sound-server is there, and when it isn't, make a redirect in asound.conf to your sound server
Code:
## for pulseaudio ##
pcm.!default {
        type pulse
}
ctl.!default {
        type pulse
}

## for jack ##
pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
        2 system:playback_3
        3 system:playback_4
        4 system:playback_5
        5 system:playback_6
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
    hint.show off
}
pcm.jack {
    type plug
    slave { pcm "rawjack" }
    hint {
        description "JACK Link"
    }
}
pcm.!default {
        type plug
        slave.pcm "jack"
}
ctl.!default {
        type hw
        card <card jack connects to>
}
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 940
Location: Belgium

PostPosted: Mon Jun 21, 2021 2:50 pm    Post subject: Reply with quote

I don't know enough if Ralphred's solution would work. I would just let Jack take care of everything and make the connections there. Jack connects to Alsa, sets the samplerate etc. Both applications connect to jack and you do your routing in qjackctl. You're running a desktop anyway.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 470

PostPosted: Mon Jun 21, 2021 4:02 pm    Post subject: Reply with quote

Spanik wrote:
I don't know enough if Ralphred's solution would work.

Sqeaky was lucky, I was half way through setting up alsa/jack to route some speaker outputs through an LV2 plugin to try and offset against the delay introduced by the bluetooth* speakers, so had all the relevant software laying around un-configured.

*(it didn't work, too much delay variance, long cable on order :( )
Back to top
View user's profile Send private message
Sqeaky
Tux's lil' helper
Tux's lil' helper


Joined: 31 Dec 2003
Posts: 149

PostPosted: Mon Jun 21, 2021 10:56 pm    Post subject: Reply with quote

@Spanik and @Ralphrad

I installed jack2 and cadence and tried to configure that.

@Fitzcarraldo

I do not have eix to get the same information about use flags and had changed them by the time I saw your post. I did have -jack in my global and have since removed that, maybe that was causing a problem, because it was leaving it out of firefox.

When I check out the KDE Audio settings while having both recording in the only configuration allowed for that audacity didn't show up and firefox showed "Firefox: AudioCallbackDriver". The config is the only one that will allow the devices showing audacity and with any recording in firefox the output of matisse sound card. So the load modules you highlighted are remarked out for me as well.

@Anyone looking to see what I did (Thanks for caring)

After I installed Jack and Cadence it took me a while to figure out that the settings were per user, not global, so I played with it as root for a while futilly. The I configured Jack with Cadence in my user Sqeaky, I set the output to Matisse and the input to the Behringer, both using the default ALSA.

I alsa rebuilt everything emerge --ask --changed-use --deep @world after removing -jack from my global use. I left the added load modules out of default.pa, and left only the aliases in my asound.conf, so close to but not quite a default configuration. And it worked on the first try!

I will try to setup qjackctl to see if it integrates better with KDE than Cadence, but this works now and these are just quality of life improvements. I am marking this solved.
Back to top
View user's profile Send private message
dimko
Apprentice
Apprentice


Joined: 12 Feb 2006
Posts: 194

PostPosted: Wed Aug 04, 2021 7:27 pm    Post subject: Re: Microphone not working in two apps simultaneously. Reply with quote

Sqeaky wrote:
I am trying to use my microphone and have sound from it go to Audacity and to a webapp in Firefox. I have done this before with very similar hardware in a different Linux OS, but now I can get either Firefox or Audacity working, but not both at the same time.
[/code]


I did not read too much.
But USB devices are cheap. They don't allow several streams of sound data.

This is reason why we need software DMIX alsa plugin for several apps to output to same device.
And this is why YOU need DSNOOP alsa plugin, to allow several devices to use your device for input same time.

Also, Firefox does not play nice with ALSA. Pulse and any program that use alsa will fight for same resource. At the end of day, Pulse is another Alsa program...
_________________
Just a user.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum