The officially official Devuan Forum!

You are not logged in.

#1 2021-06-05 16:19:47

samhain
Member
Registered: 2017-04-03
Posts: 67  

Chromium + ALSA + jitzsi: mic problem after update

I ran into this problem 2 days ago that I have still not solved: I use meet.jits.si for video calls. After the last dist-upgrade 2 days ago chromium is only able to use the analog mic on card#0 (onboard sound, analog mic).

"CinemaTM" is a usb webcam with mic. Chromium should use this as input source. Audacity can record from this and all other devices. But chromium throws these errors and can only use card#0 als input source:

[32699:32699:0605/181623.227218:ERROR:alsa_util.cc(204)] PcmOpen: plughw:CARD=MID,DEV=0,Device or resource busy
[32699:32699:0605/181623.914074:ERROR:alsa_util.cc(204)] PcmOpen: plughw:CARD=MID,DEV=2,Device or resource busy
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181624.662853:ERROR:alsa_util.cc(204)] PcmOpen: sysdefault:CARD=MID,Device or resource busy
[32699:32699:0605/181625.338318:ERROR:alsa_util.cc(204)] PcmOpen: front:CARD=MID,DEV=0,Device or resource busy
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181626.006963:ERROR:alsa_util.cc(204)] PcmOpen: dsnoop:CARD=MID,DEV=0,Device or resource busy
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181626.692565:ERROR:alsa_util.cc(204)] PcmOpen: dsnoop:CARD=MID,DEV=2,Device or resource busy
[32699:32699:0605/181627.363953:ERROR:alsa_util.cc(204)] PcmOpen: hw:CARD=Creative,DEV=0,Device or resource busy
[32699:32699:0605/181629.452046:ERROR:alsa_util.cc(204)] PcmOpen: plughw:CARD=Creative,DEV=0,Device or resource busy
ALSA lib control.c:1471:(snd_ctl_open_noupdate) Invalid CTL CARD=Creative
[32699:32699:0605/181631.507317:ERROR:alsa_util.cc(309)] MixerAttach, CARD=Creative, No such file or directory
[32699:32699:0605/181632.192573:ERROR:alsa_util.cc(204)] PcmOpen: front:CARD=Creative,DEV=0,Device or resource busy
[32699:32699:0605/181632.847111:ERROR:alsa_util.cc(204)] PcmOpen: iec958:CARD=Creative,DEV=0,Device or resource busy
ALSA lib pcm.c:8620:(snd_pcm_set_params) Sample format not available for CAPTURE: Invalid argument
[32699:32699:0605/181633.550498:ERROR:alsa_util.cc(71)] PcmHwParamsSetFormat: Invalid argument
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181634.238636:ERROR:alsa_util.cc(204)] PcmOpen: dsnoop:CARD=Creative,DEV=1,Device or resource busy
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181634.919781:ERROR:alsa_util.cc(204)] PcmOpen: dsnoop:CARD=Creative,DEV=2,Device or resource busy
ALSA lib pcm.c:8627:(snd_pcm_set_params) Channels count (2) not available for CAPTURE: Invalid argument
[32699:32699:0605/181635.595592:ERROR:alsa_util.cc(77)] PcmHwParamsSetChannels: Invalid argument
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181637.037891:ERROR:alsa_util.cc(204)] PcmOpen: sysdefault:CARD=CinemaTM,Device or resource busy
[32699:32699:0605/181637.743723:ERROR:alsa_util.cc(204)] PcmOpen: front:CARD=CinemaTM,DEV=0,Device or resource busy
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
[32699:32699:0605/181638.419383:ERROR:alsa_util.cc(204)] PcmOpen: dsnoop:CARD=CinemaTM,DEV=0,Device or resource busy

My hardware:

$ cat /proc/asound/cards 
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf3000000 irq 17
 1 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xf3120000 irq 37
 2 [Creative       ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xf3200000 irq 16
 3 [CinemaTM       ]: USB-Audio - Microsoft® LifeCam Cinema(TM)
                      Microsoft Microsoft® LifeCam Cinema(TM) at usb-0000:00:1d.

Audio sinks:

$ aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: NVidia [HDA NVidia], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 9: HDMI 3 [HDMI 3]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 10: HDMI 4 [HDMI 4]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: MID [HDA Intel MID], Gerät 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Creative [HDA Creative], Gerät 0: CA0132 Analog [CA0132 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 2: Creative [HDA Creative], Gerät 1: CA0132 Digital [CA0132 Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

Audio sources:

arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: MID [HDA Intel MID], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: MID [HDA Intel MID], device 2: ALC662 rev1 Alt Analog [ALC662 rev1 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0132 Analog [CA0132 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0132 Digital [CA0132 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 2: CA0132 What U Hear [CA0132 What U Hear]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: CinemaTM [Microsoft® LifeCam Cinema(TM)], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Any idea what I can do to persuade chromium to use the usb mic again?

Offline

#2 2021-06-06 09:31:09

Camtaf
Member
Registered: 2019-11-19
Posts: 436  

Re: Chromium + ALSA + jitzsi: mic problem after update

Have you tried changing it in alsamixer(?).

Offline

#3 2021-06-06 11:28:55

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

Aehm ... how would I do that?

Offline

#4 2021-06-06 12:57:25

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: Chromium + ALSA + jitzsi: mic problem after update

type

alsamixer

into your console/terminal

press F6 to select sound card

if you want to look up more info, type

man alsamixer

hope this helps.


pic from 1993, new guitar day.

Offline

#5 2021-06-06 13:04:36

Camtaf
Member
Registered: 2019-11-19
Posts: 436  

Re: Chromium + ALSA + jitzsi: mic problem after update

F4 or F6 maybe(?).

Or pavucontrol(?). (Input Devices)

Offline

#6 2021-06-06 13:12:48

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

No pulseaudio here.

Sorry, what do you expect alamixer to do for me in this context? It changes volume, well, bright. And now?

Offline

#7 2021-06-06 23:33:55

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: Chromium + ALSA + jitzsi: mic problem after update

also, ... check out

alsactl -h
 

the store option/command helps save your settings.

Personally, I've had similar issues although my problem was setting my usb soundcard to be boss
and not the nVidia hdmi port (no connection, useless but for laptops).

I did this through using the modprobe setting kernel modules in order and or blacklisting unwanted modules. And,

/home/(user)/.asoundrc

defaults.ctl.card 0
defaults.pcm.card 0
defaults.timer.card 0

I have onboard sound too, so that just complicates things more.

I have failed over and over in removing pulseaudio, I haven't found a setup that allows normal use for ME. But I don't give up. :-)

So check out alsactl and the .asoundrc files to set preferences.


pic from 1993, new guitar day.

Offline

#8 2021-06-07 04:54:33

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

Does not change anything.

Maybe I did not make myself clear: The problem is not changing the default sound card. The problem is, that chromium cannnot access any mic other than the ones on card#0 (see the error messages in my first posting).

Offline

#9 2021-06-07 05:42:35

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

You might try running

fuser -v /dev/snd/*

to see which if any (other) process "owns" the device.

Offline

#10 2021-06-07 06:44:52

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: Chromium + ALSA + jitzsi: mic problem after update

I'm using webbrowser, no such problems. :-) all the best.


pic from 1993, new guitar day.

Offline

#11 2021-06-07 07:08:44

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

My user is in group audio, all sound devices are accessable. Otherwise audacity would not work (see my first post):

$ ll /dev/snd/*
crw-rw----+ 1 root audio 116, 12  7. Jun 08:56 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 13  7. Jun 08:56 /dev/snd/controlC1
crw-rw----+ 1 root audio 116, 20  7. Jun 08:56 /dev/snd/controlC2
crw-rw----+ 1 root audio 116, 22  7. Jun 09:01 /dev/snd/controlC3
crw-rw----+ 1 root audio 116, 11  7. Jun 08:56 /dev/snd/hwC0D0
crw-rw----+ 1 root audio 116,  7  7. Jun 08:56 /dev/snd/hwC1D0
crw-rw----+ 1 root audio 116, 19  7. Jun 08:56 /dev/snd/hwC2D1
crw-rw----+ 1 root audio 116,  9  7. Jun 09:04 /dev/snd/pcmC0D0c
crw-rw----+ 1 root audio 116,  8  7. Jun 08:56 /dev/snd/pcmC0D0p
crw-rw----+ 1 root audio 116, 10  7. Jun 09:04 /dev/snd/pcmC0D2c
crw-rw----+ 1 root audio 116,  6  7. Jun 08:56 /dev/snd/pcmC1D10p
crw-rw----+ 1 root audio 116,  2  7. Jun 08:56 /dev/snd/pcmC1D3p
crw-rw----+ 1 root audio 116,  3  7. Jun 08:56 /dev/snd/pcmC1D7p
crw-rw----+ 1 root audio 116,  4  7. Jun 08:56 /dev/snd/pcmC1D8p
crw-rw----+ 1 root audio 116,  5  7. Jun 08:56 /dev/snd/pcmC1D9p
crw-rw----+ 1 root audio 116, 15  7. Jun 09:04 /dev/snd/pcmC2D0c
crw-rw----+ 1 root audio 116, 14  7. Jun 09:04 /dev/snd/pcmC2D0p
crw-rw----+ 1 root audio 116, 18  7. Jun 09:04 /dev/snd/pcmC2D1c
crw-rw----+ 1 root audio 116, 17  7. Jun 08:56 /dev/snd/pcmC2D1p
crw-rw----+ 1 root audio 116, 16  7. Jun 09:04 /dev/snd/pcmC2D2c
crw-rw----+ 1 root audio 116, 21  7. Jun 09:04 /dev/snd/pcmC3D0c
crw-rw----+ 1 root audio 116,  1  7. Jun 08:56 /dev/snd/seq
crw-rw----+ 1 root audio 116, 33  7. Jun 08:56 /dev/snd/timer

"kmix" uses /dev/controlC* non-exclusively. Killing kmix does not make any difference (as expected).

Last edited by samhain (2021-06-07 07:11:31)

Offline

#12 2021-06-07 07:59:35

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

You might try running

fuser -v /dev/snd/*

to see which if any (other) process "owns" the device.

Offline

#13 2021-06-07 08:05:00

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

/dev/snd/controlC0:  samhain        2217 F.... kmix
/dev/snd/controlC1:  samhain        2217 F.... kmix
/dev/snd/controlC2:  samhain        2217 F.... kmix
/dev/snd/controlC3:  samhain        2217 F.... kmix

If that were a problem, chromium could not access card#0, either. Nor could audacity, which works like expected. Killing kmix does not make any difference (well, the device is not accessed by anything then).

Last edited by samhain (2021-06-07 08:05:19)

Offline

#14 2021-06-07 08:18:51

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

Yes it appears to be fully chromium's problem... are you sure it runs with your credentials rather than some "sandbox user" ?

Offline

#15 2021-06-07 08:58:25

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

Definitly. To be more precise: a clone of users homedirectory running on a devuan that was not upgraded (Kernelpackage 5.10.0-6-amd64 and chromium 89) does not show this problem. Chromium 89 + 5.10.0-7 alsow shows this problem.

Last edited by samhain (2021-06-07 08:58:35)

Offline

#16 2021-06-07 09:13:54

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

Hmm that observation suggests it relates to the kernel version?
or is there some apparmor involved?

Offline

#17 2021-06-07 10:31:54

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

apparmor is not installed, but libapparmor1 - it's pulled in by dbus.

Any idea where I can get the older kernel and headers? I can repackage the kernel from my other machine, but I did not install the headers there (and I need them for nvidia)

Offline

#18 2021-06-07 11:25:47

GlennW
Member
From: Brisbane, Australia
Registered: 2019-07-18
Posts: 644  

Re: Chromium + ALSA + jitzsi: mic problem after update

the kernel is in the iso, extract the iso to a directory... and look up

/devuan_chimaera_4.0.alpha-20210503_amd64_netinstall/pool/DEBIAN/main/l/linux-signed-amd64/linux-image-5.10.0-6-amd64_5.10.28-1_amd64.deb


pic from 1993, new guitar day.

Offline

#19 2021-06-07 11:39:58

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

That might be right; and the corresponding linux-headers would be at least in the server and desktop isos.
Though, the chimaera alpha ISOs are rebuilt every Monday and might now hold only the 5.10.0-7 package(s).

You find linux-image-5.10.0-0 in beowulf-backports. That's kernel version 5.10.24 (as opposed to 5.10.40 that is packaged as linux-image-5.10.0-7 and kernel version 5.10.28 that was packaged into linux-image-5.10.0-6)

Links for direct download of the .deb(s) could be:
linux-image-5.10.0-0.bpo.5-amd64=5.10.24-1~bpo10+1
and
linux-headers-5.10.0-0.bpo.5-amd64=5.10.24-1~bpo10+1

Offline

#20 2021-06-07 11:59:20

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

Nop, does not work. linux-headers-5.10.0-0.bpo.5-amd64=5.10.24-1~bpo10+1 would like linux-compiler-gcc-8-x86, which is not available on chimera. Adding beowulf repositories and trying to install that kernel+header results in apt suggesting to kill my system.

Isn't there an archive where I can get the older kernel+headers?

Offline

#21 2021-06-07 13:38:07

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: Chromium + ALSA + jitzsi: mic problem after update

As @GlennW noted the kernel package is available in the alpha-20210503 ISO, which I could find from Devuan's backup, but that doesn't include the headers.

Possibly you could get them from the "orginal source" which I think would be
https://www.kernel.org/pub/linux/kernel … .28.tar.xz

.. but then there's the caveat that this might be well a "red herring"....

EDIT: Note that Debian has a couple of patches applied to header files. Though off the top they don't seem to concern graphics.

Offline

#22 2021-06-07 16:12:20

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

I prefer not to build my own kernel - the deb-src for 5.10.28 is gone, as are kernel + headers --> nvidia drivers will not be happy ... and most likely everything with alsa in its name needs to be reverted and rebuilt. Sonds like a doomsday plan to me hmm

Offline

#23 2021-06-08 13:38:18

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

Ok, not solved, but there's a workaround for that piece of crap aka chromium:

Make sure the webcam is plugged in at boottime, otherwise alsa card enumeration will assign #0 to some other card. Then make snd_usb_audio card#0 and all other cards "not the default":

# /etc/modprobe.d/alsa-base.conf
options snd_usb_audio index=0
options snd_hda_intel index=-1

Then reboot and observe:

$ cat /proc/asound/cards
 0 [CinemaTM       ]: USB-Audio - Microsoft® LifeCam Cinema(TM)
                      Microsoft Microsoft® LifeCam Cinema(TM) at usb-0000:00:1d.0-1.8, high speed
 1 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xf3120000 irq 37
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf3000000 irq 17
 3 [Creative       ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xf3200000 irq 16

Now chromium https://meet.jit.si/just-a-room]https:/ … ust-a-room can be started. The preselected mic is still the first input source of the internal soundcard, but by some miracle the usb mic is now selectable and working - at least one of the 12 virtual mics of the single usb mic, usally the second. And what a surprise: the usb mic stays #0 if it's unplugged/replugged.

Now the next question: isn't there a way to reserve #0 for snd_usb_audio, regardless if it's present or not? Assinging a fixed index to snd_hda_intel does not work, as all 3 internal cards are served by that module.

EDIT: Using options snd_hda_intel index=1,2,3 will reserve card #0 for the 4th soundcard or snd_usb_audio - whatever comes first. You might call that a mатрёшка workaround smile

Last edited by samhain (2021-06-08 13:54:53)

Offline

#24 2021-06-08 14:56:51

Geoff 42
Member
Registered: 2016-12-15
Posts: 462  

Re: Chromium + ALSA + jitzsi: mic problem after update

I had some fun with sound some time ago. The problem was with 2 outputs sharing the module snd-hda-intel. It found HDMI first, which became the default.
The solution I found was to disable HDMI with

# Disable the HDMI card which shows up first, but enable PCH
options snd-hda-intel enable=0,1

in /etc/modprobe.d/alsa-base.conf

http://forums.debian.net/viewtopic.php?t=110572#p525601

Geoff

Offline

#25 2021-06-08 15:28:04

samhain
Member
Registered: 2017-04-03
Posts: 67  

Re: Chromium + ALSA + jitzsi: mic problem after update

That makes live easier, thank you!

Now I have :

# /etc/modprobe.d/alsa-base.conf
options snd_usb_audio index=0
options snd_hda_intel index=3,2,1 enable=0,0,1

This makes the soundblaster (3rd card) the soundcard with index #1 and hides the other 2 builtin cards. I still have to assign uniq indizes to the individual cards, otherwise #0 is gone again.

# cat /proc/asound/cards
 0 [CinemaTM       ]: USB-Audio - Microsoft® LifeCam Cinema(TM)
                      Microsoft Microsoft® LifeCam Cinema(TM) at usb-0000:00:1d.0-1.7, high speed
 1 [Creative       ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xf3200000 irq 16

The fun part of that: with only 2 cards left, chromium can handle exact one input source per card correctly, be it card#0 or card#1. Oh my ... roll

Last edited by samhain (2021-06-08 15:29:19)

Offline

Board footer