USB MIC從識別到選擇的流程framework層記錄

Android9.0 USB MIC從識別到選擇的流程framework層記錄

使用的平臺是RK3399,Android9.0

主要修改應用:

通過相關係統打印得知,當Usb MIC插入系統時,會觸發
UsbAlsaManager.java裏面的
void usbDeviceAdded(String deviceAddress, UsbDevice usbDevice,UsbDescriptorParser parser)

void usbDeviceAdded(String deviceAddress, UsbDevice usbDevice,
            UsbDescriptorParser parser) {
        if (DEBUG) {
            Slog.d(TAG, "usbDeviceAdded(): " + usbDevice.getManufacturerName()
                    + " nm:" + usbDevice.getProductName());
        }

        // Scan the Alsa File Space
        mCardsParser.scan(); //對Alsa的聲卡文件掃描解析

        // Find the ALSA spec for this device address//查找此設備地址的ALSA規範
        AlsaCardsParser.AlsaCardRecord cardRec =
                mCardsParser.findC
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章