Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

USB audio device must be removed and replugged before working rk3399

59

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
59

USB audio device must be removed and replugged before working rk3399

Posted at 2/14/2018 10:50:46      View:3586 | Replies:7        Print      Only Author   [Copy Link] 1#
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
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 2/16/2018 11:14:49        Only Author  2#
attach the log of kernel and system logcat will be smarter.
only that cannot figure out what s going on
Reply

Use props Report

59

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
59
Posted at 2/20/2018 07:35:57        Only Author  3#
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.07 KB, Down times: 1

System logs

Reply

Use props Report

59

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
59
Posted at 2/22/2018 08:24:18        Only Author  4#
I've come up with a solution of sorts. The USB hub can be reset manually using:
  1. echo "3-0:1.0" > /sys/bus/usb/drivers/hub/unbind
  2. echo "3-0:1.0" > /sys/bus/usb/drivers/hub/bind
Copy the code

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
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 2/23/2018 11:40:43        Only Author  5#
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.
Reply

Use props Report

59

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
59
Posted at 2/26/2018 09:38:33        Only Author  6#
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.)
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 3/1/2018 09:49:07        Only Author  7#
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 ?
Reply

Use props Report

59

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
59
Posted at 3/2/2018 08:59:35        Only Author  8#
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
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list