Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Sansa clip+ USB controller
« previous next »
  • Print
Pages: [1]

Author Topic: Sansa clip+ USB controller  (Read 2691 times)

Offline Echo

  • Member
  • *
  • Posts: 28
  • Peace And Love
Sansa clip+ USB controller
« on: September 20, 2016, 03:53:42 AM »
Hi all,
My sansa clip+ (Rockboxed obviously) has a broken headphone jack.
Since they are out of production, and clip jam/sport are not (and probably will not be) supported by Rockbox, I want to try to use USB headphones.
I know that I'll have to do some coding, but first I have to make sure the USB controller on the sansa clip+ supports OTG.
Does anyone know if it is or how can I test it?
« Last Edit: September 20, 2016, 07:37:21 AM by Echo »
Logged
Peace And Love
Raz

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Sansa clip+ USB controller
« Reply #1 on: September 20, 2016, 02:31:35 PM »
I think all USB cores made in the last decade support OTG.  The spec is 15 years old and its only slightly different than normal USB (I think the core just needs one extra pin).

Edit: Although I guess it might be pretty hacky to implement if the sense pin isn't actually wired to the connector.
« Last Edit: September 20, 2016, 02:36:31 PM by saratoga »
Logged

Offline wodz

  • Developer
  • Member
  • *
  • Posts: 390
Re: Sansa clip+ USB controller
« Reply #2 on: September 20, 2016, 03:05:30 PM »
Quote from: Echo on September 20, 2016, 03:53:42 AM
I know that I'll have to do some coding
Implementing usb host side of OTG would be HUGE coding effort really.
Logged

Offline Echo

  • Member
  • *
  • Posts: 28
  • Peace And Love
Re: Sansa clip+ USB controller
« Reply #3 on: September 21, 2016, 03:57:09 AM »
Quote from: wodz on September 20, 2016, 03:05:30 PM
Quote from: Echo on September 20, 2016, 03:53:42 AM
I know that I'll have to do some coding
Implementing USB host side of OTG would be HUGE coding effort really.
Well, that would depend on the controller interface. If I'm lucky, the send/recv interfaces are the same. If not - I'll probably have to find another way

Quote from: saratoga on September 20, 2016, 02:31:35 PM
Edit: Although I guess it might be pretty hacky to implement if the sense pin isn't actually wired to the connector.
Any idea how to check it without opening the casing of the device? After all, if I open the device, I might as well replace the headphone jack.
If it's not connected I have no idea how to implement this.

Thank you very much
Logged
Peace And Love
Raz

Offline gomezz

  • Member
  • *
  • Posts: 119
Re: Sansa clip+ USB controller
« Reply #4 on: September 21, 2016, 06:33:02 AM »
Does not the presence of Car Adaptor mode in Settings for the Clip+ indicate that this *is* supported?
« Last Edit: September 21, 2016, 06:34:34 AM by gomezz »
Logged
Sansa Clip+ Rockbox v3.14

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Sansa clip+ USB controller
« Reply #5 on: September 21, 2016, 07:21:55 AM »
Quote from: gomezz on September 21, 2016, 06:33:02 AM
Does not the presence of Car Adaptor mode in Settings for the Clip+ indicate that this *is* supported?

No, not any more than that the presence of EQ settings indicate that the rockblox plugin will work.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Sansa clip+ USB controller
« Reply #6 on: September 21, 2016, 11:16:45 AM »
Quote from: Echo on September 21, 2016, 03:57:09 AM
Quote from: wodz on September 20, 2016, 03:05:30 PM
Quote from: Echo on September 20, 2016, 03:53:42 AM
I know that I'll have to do some coding
Implementing USB host side of OTG would be HUGE coding effort really.
Well, that would depend on the controller interface. If I'm lucky, the send/recv interfaces are the same. If not - I'll probably have to find another way

You'll still have to implement the host mode USB stack right?  The actual driver level bits are probably pretty small compared to that.

Quote from: Echo on September 21, 2016, 03:57:09 AM

Quote from: saratoga on September 20, 2016, 02:31:35 PM
Edit: Although I guess it might be pretty hacky to implement if the sense pin isn't actually wired to the connector.

Any idea how to check it without opening the casing of the device? After all, if I open the device, I might as well replace the headphone jack.
If it's not connected I have no idea how to implement this.

I'd get a USBOTG cable and see if you can get the hardware to detect it.

Quote from: gomezz on September 21, 2016, 06:33:02 AM
Does not the presence of Car Adaptor mode in Settings for the Clip+ indicate that this *is* supported?

The car adaptor mode just checks to see if the device is externally powered.  It will work with a simple AC adapter, no USB required. 
« Last Edit: September 21, 2016, 01:00:04 PM by saratoga »
Logged

Offline Echo

  • Member
  • *
  • Posts: 28
  • Peace And Love
Re: Sansa clip+ USB controller
« Reply #7 on: September 21, 2016, 11:47:21 AM »
The quoting got messed up so no more of this.

As to coding effort - The USB protocol itself (token / data / handshake) is implemented by the controller.
My job would be to implement the class driver, using the controller interface, that is - setting up endpoints and sending data to them.
I hope that sending data to an endpoint is the same in both host and device mods of the controller, if so - I can use the code written for device mod.

I hope I'm not too naive, but I'm still in the POC stage - and my first order of business is to see the HW is capable of this adventure.

As for you OTG cable suggestion - How can I know if the HW detected the device? I don't have JTAG or any other HW debugging tools
I tried to connect a disc-on-key using Rockbox and original FW, nothing happened
Logged
Peace And Love
Raz

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Sansa clip+ USB controller
« Reply #8 on: September 21, 2016, 01:02:41 PM »
Quote from: Echo on September 21, 2016, 11:47:21 AM
As for you OTG cable suggestion - How can I know if the HW detected the device? I don't have JTAG or any other HW debugging tools
I tried to connect a disc-on-key using Rockbox and original FW, nothing happened

I mean, you write the driver to make this work, and then see what happens.  If you can't detect an OTG cable, there is probably no pin connected, although that can probably be worked around. 
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Sansa clip+ USB controller
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.094 seconds with 15 queries.