Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Carlos Pita <carlosjosepita@yahoo.com.ar>
Cc: alsa-devel@alsa-project.org
Subject: Re: oss raw midi emulation
Date: Mon, 29 Nov 2004 12:24:49 +0100	[thread overview]
Message-ID: <s5h3bysrj7i.wl@alsa2.suse.de> (raw)
In-Reply-To: <200411281214.24321.carlosjosepita@yahoo.com.ar>

At Sun, 28 Nov 2004 12:14:24 -0300,
Carlos Pita wrote:
> 
> Hi!
> 
> What should be /dev/midi??   ?
> Symlimks to /dev/snd/midiC?D?  ?

No, it's an ALSA rawmidi device.  It accepts totally different ioctls,
etc although read/write controls are almost identical.

> Or devices with the correct major/minor numbers specified by the oss manual ?

Yes.  It should be cdev with major 14 & minor (2 + n * 16) 

> I'm asking because I need to use snd-virmidi in order to connect pd (which has no support
> for alsa midi yet) with muse or vkeybd. So I'm doing:
> 
> > modprobe snd-virmidi
> > cat /proc/asound/devices
>   [...]
>   43: [1- 3]: raw midi
>   42: [1- 2]: raw midi
>   41: [1- 1]: raw midi
>   40: [1- 0]: raw midi
> > ln -s /dev/snd/midiC1D0 /dev/midi10
> > pd -midiindev 11
> (with -midiindev N,  pd will open /dev/midiM with M=N-1, just a quirk)
> Then I aconnect muse or vkeybd to alsa client VirMIDI 1-0.
> 
> It works fine, but is this the right way to do it? For me it was
> a matter of trial and error.
> 
> Also, debian sarge predefines the following four devices:
> 
> crw-rw----  1 root audio 14,  2 2004-10-26 21:40 /dev/midi00
> crw-rw----  1 root audio 14, 18 2004-10-26 21:40 /dev/midi01
> crw-rw----  1 root audio 14, 34 2004-10-26 21:40 /dev/midi02
> crw-rw----  1 root audio 14, 50 2004-10-26 21:40 /dev/midi03
> 
> which suggests that /dev/midi?? shouldn't be symlinked as I'm
> doing with /dev/midi10.

No, definitely not.

The device assignment is different between ALSA and OSS.
ALSA assigns multiple devices per card, but OSS has basically no
concept of cards, so the currently OSS emulation assigns up to two
device per card for /dev/midi0? and /dev/amidi0?.

Instead of symlinks, the applications should be able to point
different paths for devices...


Takashi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

      parent reply	other threads:[~2004-11-29 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-28 15:14 oss raw midi emulation Carlos Pita
2004-11-28 15:22 ` Jaroslav Kysela
2004-11-28 17:34   ` Carlos Pita
2004-11-28 19:57   ` Carlos Pita
2004-11-29 11:24 ` Takashi Iwai [this message]

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=s5h3bysrj7i.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=carlosjosepita@yahoo.com.ar \
    /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