UsbAlsaManager: name of USB Audio device on the Audio side is displayed abnormally
In usbhost, it is set that when the ascii of a certain character is greater than 127, it will be replaced by the character '?'. When the name of the connected USB Audio device is a non-English character, the device name is displayed as '?'(e.g. '?typec?'), which causes the name obtained on the Audio side (e.g. onSetWiredDeviceConnectionState) to be displayed incorrectly, and there are exceptions when displayed on some system UI interfaces.
Therefore, replace parsing the usb raw descriptors with getCardName. It can use the method in AlsaCardsParser to read ALSA sound card information directly from the /proc/asound/cards path (e.g. USB-Audio - NAME typec HEADSET).
Bug: 427451139
Test: TH
Flag: EXEMPT bugfix
Signed-off-by:
wanggang14 <wanggang14@xiaomi.corp-partner.google.com>
Change-Id: Id08643d7a3128b0901aeedadf11fc09ed2ce1613
Loading
Please register or sign in to comment