USB audio device must be removed and replugged before working rk3399

Hi,

I’m using a USB speaker + mic (Jabra Speak 410) with the firefly rk3399. When I initially boot the firefly, the usb speaker does not work, either as input or output. After removing the device, and reinserting it (sometimes multiple times), it works. With other android devices, it works right away. Any ideas on what might be causing this and how I might fix it?

Thanks

attach the log of kernel and system logcat will be smarter.
only that cannot figure out what s going on

Sorry for the late reply.
I have attached the dmesg output and logcat dump. I have annotated the points at which I disconnected the speaker, then reconnected it. If you need any other logs, just let me know

Thanks
logs.zip (98.1 KB)

I’ve come up with a solution of sorts. The USB hub can be reset manually using:

echo "3-0:1.0" > /sys/bus/usb/drivers/hub/unbind
echo "3-0:1.0" > /sys/bus/usb/drivers/hub/bind

where “3-0:1.0” is the USB hub in question, in this case the USB3.0. Other solutions for resetting an individual device were unsuccessful.

I’ve adapted this into an init.d script. In this script I ‘sleep’ for 30s before reseting the hub, as I’ve found a lower wait time can be unsuccessful.

Though I’d prefer to know the root cause of this issue, the solution outlined above is a suitable stop gap for anyone facing a similar issue

3spec Posted at 2/22/2018 08:24
I’ve come up with a solution of sorts. The USB hub can be reset manually using:

where “3-0:1.0” i …

try to update the firmware android7.1. make sure the firmware is the newest.
from the log , kernel just fine .
problem might be the framework usb manage.

Thanks for the advice.

The newest version of Android 7.1 does fix this issue. However, it doesn’t seem to be able to use both MIPI cameras simultaneously through the Camera1 API. The Dual Camera Example App works fine, but I believe this works through native code, whereas my project requires a library that uses the Camera1 API. When I use this with 7.1, the android camera service dies, and only one camera works.

The 6.0.1 image, on the other hand, is able to use dual cameras with the Camera1 API, so I’m stuck with this for the foreseeable future.

(Though I realise the camera issue is straying from the original topic of this thread, I’ll just clarify the versions I’ve tried. I’ve used “Firefly-RK3399_Android7.1.1_MP_170829” and “DualCam-Firefly-RK3399_Android7.1.1_MP_180122” for 7.1 and am using “Firefly-RK3399_Android6.0.1_170515” at the moment.)

3spec Posted at 2/26/2018 09:38
Thanks for the advice.

The newest version of Android 7.1 does fix this issue. However, it doesn’t …

you mean the simple camera cannot open dual camera no matter mipi and uvc ?

Actually I’ve made a mistake. I assumed that the ‘CameraExample’ (from DoubleCamTestActivity.apk) used native code to access the cameras. I see now that is not the case. Both 6.0.1 and 7.1 work with dual cameras using the CameraExample app. When using my app with Android 7.1, the cameras service died when opening the second camera, but it seems now that this is the fault of the app or the library, not the OS. I am still having a separate issue with my cameras, but I’ve opened another thread on that, so as to keep each thread on topic

It was a real eye-opener. The SSM latest test vce free test that helped me earn a promotion and salary raise is free for you today. Best of luck reaching your career goals!

I’m so thankful for your article, it was a real game-changer. Associate-Developer-Apache-Spark-3.5 test practice offers detailed and free content, aimed at assisting you with your goals.

Thank you for sharing such a motivational and uplifting article! The Reliable C-S4CCO-2506 real test content is very useful and totally free of charge.