[Xiaomi 11 Lite 5G NE] haha01haha01:
Hey,

I'm not getting any sound when connecting earbuds using a 3.5mm to USB adapter, even though the phone seems to recognize that headphones were attached. After the headphones are detached there is also no sound at all, even on phone speaker, until the next reboot, and logcat shows this error repeating:

08-07 00:34:28.804 851 6538 D audio_hw_primary: out_write: sound card is not active/SSR state
08-07 00:34:28.804 851 6538 D audio_hw_primary: out_standby: enter: stream (0xe932b800) usecase(0: deep-buffer-playback)
08-07 00:34:28.804 851 6538 D audio_hw_primary: out_standby: exit
0

I have a log from connection moment of the headphones adapter, it's very long, I think the culprit is here:

08-07 00:41:35.003 854 2252 D msm8974_platform: Setting audio calibration for snd_device(22) acdb_id(10)
08-07 00:41:35.012 1487 1566 D UsbDeviceManager: push notification:Charging connected device via USB
08-07 00:41:35.031 876 2405 I android.hardware.usb@1.3-service-qti: uevent received remove@/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec/port0/port0-partner
08-07 00:41:35.031 876 2405 E android.hardware.usb@1.3-service-qti: fopen failed in readFile /sys/class/typec/port0/power_operation_mode, errno=2
08-07 00:41:35.032 1395 1477 W audioadsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1637:Warning 0xffffffff: remote_get_info failed to get attribute 257 for domain 0 (errno Transport endpoint is not connected)
08-07 00:41:35.032 1395 1477 E audioadsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1191: Error 0x68: remote_handle_invoke failed for handle 0x3, method 4 on domain 0 (sc 0x4020200) (errno Transport endpoint is not connected)
08-07 00:41:35.032 1395 1477 E audioadsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1191: Error 0x72: remote_handle_invoke failed for handle 0x3, method 4 on domain 0 (sc 0x4020200) (errno Transport endpoint is not connected)
08-07 00:41:35.032 1395 1477 E audioadsprpcd: vendor/qcom/proprietary/adsprpc/src/listener_android.c:221:Error 0x72: listener response with result 0x0 for ctx 0x1463, handle 0x57efc9e8, sc 0xffffffff failed : listener thread exited (errno Transport endpoint is not connected)
08-07 00:41:35.033 876 2405 I android.hardware.usb@1.3-service-qti: Hardcode parameters for non-typec targets
08-07 00:41:35.033 876 2405 I android.hardware.usb@1.3-service-qti: uevent received remove@/devices/platform/soc/soc:qcom,pmic_glink/soc:qcom,pmic_glink:qcom,ucsi/typec/port0
08-07 00:41:35.033 876 2405 E android.hardware.usb@1.3-service-qti: fopen failed in readFile /sys/class/typec/port0/power_operation_mode, errno=2
08-07 00:41:35.033 1395 1477 E audioadsprpcd: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1213: Error 0x72: remote_handle64_invoke failed for handle 0xd84064b0, method 3 on domain 0 (sc 0x3000000) (errno Transport endpoint is not connected)

this is followed by repeated error logs from inside adsprpcd, multiple failed attempts to restart adsprpcd, and then the error I posted in the beginning with no sound on the device

Versions: PixelOS from 12/07/22 build, xiaomi fw is 13.0.4.0 Global