You are not logged in.

#1 2020-02-19 16:01:58

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

C-Media CM10X sound cards stopped being recognized by system

Between last night and now, suddenly my two different audio devices that show up as "C-Media CM10X" (106 and 108, Tonor USB microphone and StarTech USB sound card respectively) have both disappeared from my system.

They still receive power from the USB ports and show up in lsusb:

$ lsusb
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 005: ID 09e8:0075 AKAI  Professional M.I. Corp. LPD8
Bus 007 Device 004: ID 0c45:6300 Microdia PC Microscope camera
Bus 007 Device 003: ID 04d9:a0f8 Holtek Semiconductor, Inc. USB Gaming Keyboard
Bus 007 Device 002: ID 04b4:1056 Cypress Semiconductor Corp. 
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
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 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 8087:0aa7 Intel Corp. 
Bus 001 Device 005: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller
Bus 001 Device 004: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
Bus 001 Device 003: ID 28de:1142 Valve Software Wireless Steam Controller
Bus 001 Device 002: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device
Bus 001 Device 010: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 009: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 011: ID 258a:1006 Gaming KB  Gaming KB 
Bus 001 Device 007: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

But they don't show up in aplay/arecord or /proc/asound/cards

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Juli [ESI Juli@], device 0: ICE1724 [ICE1724]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Juli [ESI Juli@], device 1: ICE1724 IEC958 [ICE1724 IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Juli [ESI Juli@], device 0: ICE1724 [ICE1724]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Juli [ESI Juli@], device 1: ICE1724 IEC958 [ICE1724 IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ cat /proc/asound/cards
 0 [Juli           ]: ICE1724 - ESI Juli@
                      ESI Juli@ at 0xb080, irq 24

They can't have *both* suddenly died at the same time, right? What is going on? Between last night and now, I have made no changes to my system--not even a package upgrade. My last upgrade was 2/17--just thunderbird--and my last working boot was 2/18.

Offline

#2 2020-02-19 16:06:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,413

Re: C-Media CM10X sound cards stopped being recognized by system

Post a

dmesg

. Are you defining any sound module indices in modprobe.d ? Make sure you define them completely e.g. if you currently have something to the effect of

options snd_hda_intel index=0

make that read

options snd_hda_intel index=0
options snd_usb_audio index=1,2

or so to cover every possible device.

Online

#3 2020-02-19 17:16:16

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: C-Media CM10X sound cards stopped being recognized by system

That did it! Thank you. I had previously forced my USB sound card to appear ahead of the ICE1724 card in /etc/modprobe.d by putting an index=0 for it after a bunch of index=-2 for snd_hda_intel, as well as many card modules that don't match any of my cards (that old alsa-base.conf copypasta floating around the net). So as far as enabled cards with non-negative-number indices, I just had:

options snd-usb-audio index=0

Changing that to incorporate all of my sound cards has solved this issue:

options snd-usb-audio index=0,1,2
options snd_ice1724 index=3

Now I'm wondering, why was this never a problem for years until suddenly just now out of nowhere, and why is this the first time I've seen your advice on the necessity of covering every device with those options?

Offline

#4 2020-02-19 20:22:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,413

Re: C-Media CM10X sound cards stopped being recognized by system

If you properly use negative indices that also should work (negative indices will provide a fallback if the "logically" selected index is not available). If it happened to work every time so far that just means you were lucky (or udev got faster and has a better chance to select the internal sound card first), at the end of the day it's a potential race condition on which device gets associated which index "first".

The index default is -1 which means, use any index available and fall back to "later" numbers if one happens to be occupied (logic for negative indices goes -(-index+1)  so use 0 if available, if not try further). That includes 0, so it can be that the ice1724 card gets 0. If you hardcoded snd_usb_audio to index=0 if it looses the race it will try 0 and say whelp I can't use anything else anymore.

To "properly" do this with negative indices you could use

#If you don't care which USB device ends up first as long as they are before the snd_ice1724 you don't need to define it. If you want to anyway:
options snd-usb-audio index=-1,-2,-3 #Defines the same ordering as above with the added caveat that should any of the logically selected not be available they can still fall  back to "later" indices
options snd_ice1724  index=-4 #-(-4+1)=3 so try at most index 3, if you don't get that try 4,5,6,7 whatever's free

This might also be changeable differently via the snd_slots module but I'm unsure as to the semantics there (and whether you'd have to specify snd_usb_audio three times to ensure all three are loaded before snd_hda_intel)

Last edited by V1del (2020-02-19 20:28:41)

Online

#5 2020-02-19 22:07:21

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: C-Media CM10X sound cards stopped being recognized by system

That was very enlightening. Thank you!

Offline

Board footer

Powered by FluxBB