public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [Question] Can g_midi run on musb_gadget?
@ 2007-11-27  4:04 Bryan Wu
  2007-11-27  9:16 ` David Brownell
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan Wu @ 2007-11-27  4:04 UTC (permalink / raw)
  To: Ben Williamson, David Brownell, Tony Lindgren,
	linux-omap-open-source

Hi folks,

I am still testing and trying to enable some gadget drivers over
musb_gadget driver for Blackfin BF54x.

Does someone test g_midi over MUSB gadget driver?
Actually, current g_midi only supports full speed, then the MUSB gadget
will make g_midi usb_gadget_register_driver (in musb_gadget.c) function
call fail as below:
---
        if (!driver
                        || driver->speed != USB_SPEED_HIGH
                        || !driver->bind
                        || !driver->setup)
                return -EINVAL;
---

gmidi.c
---
static struct usb_gadget_driver gmidi_driver = {
        .speed          = USB_SPEED_FULL,
        .function       = (char *)longname,
        .bind           = gmidi_bind,
        .unbind         = gmidi_unbind,

        .setup          = gmidi_setup,
        .disconnect     = gmidi_disconnect,

        .suspend        = gmidi_suspend,
        .resume         = gmidi_resume,

        .driver         = {
                .name           = (char *)shortname,
                .owner          = THIS_MODULE,
        },
};
---

So I modified the musb_gadget.c to enable the g_midi.ko on my BF54x
hardware.

I got some question about the testing about the g_midi:

1. My Linux and Windows PC USB host can found the g_midi BF54x device,
for example:
---
roc@roc-laptop:~$ aplaymidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 20:0    MIDI Gadget                      MIDI Gadget MIDI 1
---

There is an ALSA AD1980 AC97 audio hardware and driver on BF54x and I am
sure it works well.
If I use "aplaymidi -p 20:0 ~/Desktop/onestop.mid" to try to play the
midi file over USB, can I heard sound from the AD1980 sound output port?
But I don't hear anything.

2. g_midi just provides an midi device, not a fully functional USB Audio
Class device, right?
Because some customer wanna enable the BF54x as USB Audio Class device
over musb_gadget driver.

3. Is there any URL or wiki about g_midi for developer as referrence?

Thanks a lot
-Bryan Wu

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Question] Can g_midi run on musb_gadget?
  2007-11-27  4:04 [Question] Can g_midi run on musb_gadget? Bryan Wu
@ 2007-11-27  9:16 ` David Brownell
  0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2007-11-27  9:16 UTC (permalink / raw)
  To: bryan.wu; +Cc: Ben Williamson, linux-omap-open-source

On Monday 26 November 2007, Bryan Wu wrote:
> Hi folks,
> 
> I am still testing and trying to enable some gadget drivers over
> musb_gadget driver for Blackfin BF54x.
> 
> Does someone test g_midi over MUSB gadget driver?

Not I.


> Actually, current g_midi only supports full speed, then the MUSB gadget
> will make g_midi usb_gadget_register_driver (in musb_gadget.c) function
> call fail as below:

Which is appropriate, it only has full speed descriptors.

Feel free to submit a patch teaching it how to do high speed...

- Dave

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-27  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-27  4:04 [Question] Can g_midi run on musb_gadget? Bryan Wu
2007-11-27  9:16 ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox