有时候,插入一个USB设备,例如camera,会导致系统无法出声音或者MIC无法使用。这是因为这些USB设备的芯片有些是带有codec的,所以在插入的时候,系统会自动注册一个声卡,后插入的USB声卡一般都是高优先级的,所以这个时候调用的就是这个USB的声卡,但实际上这个USB设备没有音频硬件,系统是不知道的。
具体修改方式就是在驱动里,禁止这个USB声卡的创建。
diff --git a/sound/usb/card.c b/sound/usb/card.c
old mode 100644
new mode 100755
index 861c0416ab73..8d677da1a666
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -659,6 +659,16 @@ static int usb_audio_probe(struct usb_interface *intf,
ifnum = get_iface_desc(alts)->bInterfaceNumber;
id = USB_ID(le16_to_cpu(dev->descriptor.idVendor),
le16_to_cpu(dev->descriptor.idProduct));
+
+ if(id == 0x32e69221)
+ return -1;
+
+ if(id == 0x1e2f9741)
+ return -1;
+
+ if(id == 0x1e2f9788)
+ return -1;
+
if (get_alias_id(dev, &id))
quirk = get_alias_quirk(dev, id);
if (quirk && quirk->ifnum >= 0 && ifnum != quirk->ifnum)
这里禁用了3个USB设备声卡。这样,一旦插入这三种USB设备,都无法使用这个USB的声卡。