public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan Wu <bryan.wu@analog.com>
To: Ben Williamson <ben.williamson@greyinnovation.com>,
	David Brownell <david-b@pacbell.net>,
	Tony Lindgren <tony@atomide.com>,
	linux-omap-open-source@linux.omap.com
Subject: [Question] Can g_midi run on musb_gadget?
Date: Tue, 27 Nov 2007 12:04:25 +0800	[thread overview]
Message-ID: <1196136265.7177.17.camel@roc-laptop> (raw)

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

             reply	other threads:[~2007-11-27  4:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27  4:04 Bryan Wu [this message]
2007-11-27  9:16 ` [Question] Can g_midi run on musb_gadget? David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196136265.7177.17.camel@roc-laptop \
    --to=bryan.wu@analog.com \
    --cc=ben.williamson@greyinnovation.com \
    --cc=david-b@pacbell.net \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox