Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress mis-detection as USB Audio. #33

Open
kshoji opened this issue Mar 12, 2015 · 5 comments
Open

Suppress mis-detection as USB Audio. #33

kshoji opened this issue Mar 12, 2015 · 5 comments
Assignees
Milestone

Comments

@kshoji
Copy link
Owner

kshoji commented Mar 12, 2015

Some Android devices treat USB MIDI devices as USB Audio devices.
When such Android device attaches USB MIDI device, USB Audio will be selected as the audio output source.
As the result, sound playing will be stopped.

@kshoji kshoji self-assigned this Mar 12, 2015
@kshoji kshoji added this to the v0.1.3 milestone Mar 12, 2015
kshoji added a commit that referenced this issue Mar 12, 2015
Added USB Audio source cancelling feature.
@planethcom
Copy link

Maybe this helps some of you guys. As a workaround, I’ve added this part to the FAQs of my website:


No Sound when USB MIDI Controller/Keyboard connected

This seems to be an Android OS or driver bug on several devices (e.g. Sony XPeria Z1/Z3 running on Android 4.4). Devices with that bug think the connected USB MIDI device is actually an USB Audio interface and therefore route the audio output to the USB MIDI interface rather than the speakers/headphones (which does of course not work).

For now, the only workaround is to override the wrong audio routing in use of an app called SoundAbout, which can be downloaded from Google Play:

https://play.google.com/store/apps/details?id=com.woodslink.android.wiredheadphoneroutingfix https://play.google.com/store/apps/details?id=com.woodslink.android.wiredheadphoneroutingfix

Once installed, follow the steps below:

  1. Launch G-Stomper
  2. Plug in MIDI keyboard (and grant permission)
  3. Launch SoundAbout
  4. Select the desired media for audio in "Media audio" (headphones/speaker)
  5. Set "SoundAbout Service" to "ON" (with or without status)
  6. Go back to G-Stomper

Et voilà, audio works again.

Von: Kaoru Shoji [mailto:[email protected]]
Gesendet: Donnerstag, 12. März 2015 11:05
An: kshoji/USB-MIDI-Driver
Betreff: [USB-MIDI-Driver] Suppress mis-detection as USB Audio. (#33)

Some Android devices treat USB MIDI devices as USB Audio devices.
When such Android device attaches USB MIDI device, USB Audio will be selected as the audio output source.
As the result, sound playing will be stopped.


Reply to this email directly or view it on GitHub #33 .Das Bild wurde vom Absender entfernt.

@kshoji
Copy link
Owner Author

kshoji commented Mar 19, 2015

I've analysed the SoundAbout app, and wrote the code and document about this issue.
Please test the code on the branch.
I've tried the code with Xperia Z1(Android 4.4), it seems working well.

@planethcom
Copy link

Hi Kaoru

Thanks a million, that’s great news. I’ll analyze the code as soon as possible and test it on the Z3.

Greetings, Andreas

Von: Kaoru Shoji [mailto:[email protected]]
Gesendet: Donnerstag, 19. März 2015 11:13
An: kshoji/USB-MIDI-Driver
Cc: planethcom
Betreff: Re: [USB-MIDI-Driver] Suppress mis-detection as USB Audio. (#33)

I've analysed the SoundAbout app, and wrote the code and document about this issue.
Please test the code on the branch.
I've tried the code with Xperia Z1(Android 4.4), it seems working well.


Reply to this email directly or view it on GitHub #33 (comment) .Das Bild wurde vom Absender entfernt.

@planethcom
Copy link

Hi Kaoru

Finally our movement is done and I got back to work, and so found time to test your solution.

First of all, excellent work, the solution is simple and works out of the box.

There are 2 things that could be problematic:

  1.   The fact that you restrict it to sony, but the mis-detection appears to happen on many different devices from different manufacturers. 
    

    But as far as I see this is not an issue, since the restriction could simply be removed.

  2.   You hard link the audio output to the internal speaker/headphone jack. 
    

    But what if a user has a Bluetooth speaker system connected while connecting Midi Equipment?
    Shouldn’t there be an option to select where to route the audio output?

I’ve also tested it on the Z3 with the latest Android update (5.0.2) where the mis-detection does not happen anymore (even without the fix). I don’t know if this applies to all Android 5.0.2 builds, but I’d say no, since the manufacturers often work with their own drivers.

However, thanks a ton, as is it already works around 95% of the problems.

Greetings, Andreas

Von: Kaoru Shoji [mailto:[email protected]]
Gesendet: Donnerstag, 19. März 2015 11:13
An: kshoji/USB-MIDI-Driver
Cc: planethcom
Betreff: Re: [USB-MIDI-Driver] Suppress mis-detection as USB Audio. (#33)

I've analysed the SoundAbout app, and wrote the code and document about this issue.
Please test the code on the branch.
I've tried the code with Xperia Z1(Android 4.4), it seems working well.


Reply to this email directly or view it on GitHub #33 (comment) .Das Bild wurde vom Absender entfernt.

@sinosoidal
Copy link

Hi. I found this issue was the answer to my problems but I can't seem to make the workaround to work. I have registered the UsbAudioConnectionCanceller but I'm not having any intent being filtered. I'm currently using Android 5.1.1 on a Bq Aquaris M5. I'm trying with two distinct MIDI interfaces: Roland UM-ONE and Arturia Minilab. Has anyone here stumbled on this also?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants