View previous topic :: View next topic |
Author |
Message |
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Thu Apr 09, 2020 12:00 am Post subject: ALSA default microphone that isn't always present |
|
|
Hello all,
I am looking to completely get rid of Chromium and just stick with Firefox but one thing is keeping me from it, and that is using my webcam with WebRTC clients (like Google video chat, et cetera). With Chromium, I can select a different microphone from a dropbox, but that option isn't available in Firefox (the only selectable option is "default"). The bug that I filed for it was closed stating that they don't support ALSA. I have a USB DAC that I use for my headphones, and that is what I want to keep as my primary output. However, I want my default input to be the microphone on my webcam (which is USB, and only plugged in when I need to use it). Right now, I have a very basic ALSA configuration for my DAC:
Code: |
$ cat /etc/asound.conf
defaults.pcm.!card Ego
defaults.pcm.!device 0
defaults.ctl.!card Ego
defaults.ctl.!device 0
|
I use that basic setup so that my audio is as unadulterated as possible. When my webcam is plugged in, I see it present in the output of `arecord -L`:
Code: |
$ arecord -L
default
Default Audio Device
sysdefault
Default Audio Device
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Intel
HDA Intel, ALC892 Analog
Default Audio Device
sysdefault:CARD=Intel
HDA Intel, ALC892 Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, ALC892 Analog
Front speakers
default:CARD=C920
HD Pro Webcam C920, USB Audio
Default Audio Device
sysdefault:CARD=C920
HD Pro Webcam C920, USB Audio
Default Audio Device
front:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
Front speakers
surround21:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=C920,DEV=0
HD Pro Webcam C920, USB Audio
IEC958 (S/PDIF) Digital Audio Output
|
I have experimented briefly with setting up a "type asym" configuration for ALSA, but couldn't get it to function.
Are there any suggestions on how to achieve both the most direct sound via my USB DAC, but also set the webcam to be the default microphone (knowing that it won't always be plugged in)?
Thank you.
Cheers,
Nathan Zachary _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
mani001 Guru
Joined: 04 Dec 2004 Posts: 485 Location: Oleiros
|
Posted: Sat Aug 13, 2022 8:18 am Post subject: |
|
|
Long time...but did you get to solve this issue? I'd also like to completely get rid of Chrome, but this is a pretty big deal. |
|
Back to top |
|
|
NathanZachary Moderator
Joined: 30 Jan 2007 Posts: 2605
|
Posted: Mon Aug 15, 2022 4:11 pm Post subject: |
|
|
Unfortunately I haven't been able to solve this problem. Firefox simply doesn't allow me to select the sound input source for my webcam. _________________ “Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio--- |
|
Back to top |
|
|
dbtx Tux's lil' helper
Joined: 20 Jan 2020 Posts: 117
|
Posted: Fri Sep 02, 2022 4:09 am Post subject: |
|
|
I adapted this from a common ALSA Loopback -> JACK .asoundrc which also uses asym:
Code: | # default mixer
ctl.!default {
type hw
card "Audigy2"
}
# default device
pcm.!default {
type asym
playback.pcm {
type hw
card "Audigy2"
}
capture.pcm {
type plug
slave.pcm {
type hw
card "C615"
}
}
} |
C615 is a different USB webcam and Audigy2 has my headphones plugged into it. So when I run Code: | $ alsaloop -P default -C default | (not related to snd_aloop device-- this is a client from media-sound/alsa-utils) it records and plays so I listen to the webcam in realtime on the headphones. If the webcam is unplugged, the 'asym' device still works for playback (with e.g. mpv) but not for capture: Code: | $ alsaloop -P default -C default
ALSA lib /home/vartmp/portage/media-libs/alsa-lib-1.2.6.1/work/alsa-lib-1.2.6.1/src/confmisc.c:165:(snd_config_get_card) Cannot get card index for C615
capture default open error: No such device
Loopback initialization failure. | I first had the default device as a plug with the asym device as its slave, but you said you were using as direct a path as possible, and that would send playback through a conversion. Removing the 'plug' made alsaloop fail to open the capture device because the microphone's available samplerate/format didn't match the output (or something). But putting the 'plug' in only the capture section seems to work. I'm still the ALSA noob, so I hope this helps, but do suggest or correct at will. gl hf _________________ quasi-religious systemic wrongism pessimizes indiscriminately |
|
Back to top |
|
|
|
|
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
|
|