Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* oss raw midi emulation
@ 2004-11-28 15:14 Carlos Pita
  2004-11-28 15:22 ` Jaroslav Kysela
  2004-11-29 11:24 ` Takashi Iwai
  0 siblings, 2 replies; 5+ messages in thread
From: Carlos Pita @ 2004-11-28 15:14 UTC (permalink / raw)
  To: alsa-devel

Hi!

What should be /dev/midi??   ?
Symlimks to /dev/snd/midiC?D?  ?
Or devices with the correct major/minor numbers specified by the oss manual ?

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.

Thank you.
Regards,
Carlos


-------------------------------------------------------
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/

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

* Re: oss raw midi emulation
  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
  1 sibling, 2 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2004-11-28 15:22 UTC (permalink / raw)
  To: Carlos Pita; +Cc: ALSA development

On Sun, 28 Nov 2004, Carlos Pita wrote:

> which suggests that /dev/midi?? shouldn't be symlinked as I'm
> doing with /dev/midi10.

No, debian or snddevices script in the driver package does right job.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs


-------------------------------------------------------
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/

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

* Re: oss raw midi emulation
  2004-11-28 15:22 ` Jaroslav Kysela
@ 2004-11-28 17:34   ` Carlos Pita
  2004-11-28 19:57   ` Carlos Pita
  1 sibling, 0 replies; 5+ messages in thread
From: Carlos Pita @ 2004-11-28 17:34 UTC (permalink / raw)
  To: alsa-devel

On Sunday 28 November 2004 12:22, you wrote:
> On Sun, 28 Nov 2004, Carlos Pita wrote:
> 
> > which suggests that /dev/midi?? shouldn't be symlinked as I'm
> > doing with /dev/midi10.
> 
> No, debian or snddevices script in the driver package does right job.

debian sarge only creates /dev/midi00, ..., /dev/midi03. I need the
/dev/midi10, ..., /dev/midi13 ones. Perhaps if I install udev they will
be created when virmidi is loaded (my kernel has hotplug enabled,
but does virmidi send a hotplug add event? I'm really short of
knowledge here).

I think that my current /dev/ fs is a "static" one, since debian udev package
is not installed and devfs fs creation is disabled at boot time. But I don't know
how to be sure. If the /dev/ fs is "static", would snddevices add the
needed /dev/midi10../dev/midi13 files?

Regards,
Carlos


-------------------------------------------------------
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/

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

* Re: oss raw midi emulation
  2004-11-28 15:22 ` Jaroslav Kysela
  2004-11-28 17:34   ` Carlos Pita
@ 2004-11-28 19:57   ` Carlos Pita
  1 sibling, 0 replies; 5+ messages in thread
From: Carlos Pita @ 2004-11-28 19:57 UTC (permalink / raw)
  To: alsa-devel

On Sunday 28 November 2004 12:22, you wrote:
> On Sun, 28 Nov 2004, Carlos Pita wrote:
> 
> > which suggests that /dev/midi?? shouldn't be symlinked as I'm
> > doing with /dev/midi10.
> 
> No, debian or snddevices script in the driver package does right job.

debian sarge only creates /dev/midi00, ..., /dev/midi03. I need the
/dev/midi10, ..., /dev/midi13 ones. Perhaps if I install udev they will
be created when virmidi is loaded (my kernel has hotplug enabled,
but does virmidi send a hotplug add event? I'm really short of
knowledge here).

I think that my current /dev/ fs is a "static" one, since debian udev package
is not installed and devfs fs creation is disabled at boot time. But I don't know
how to be sure. If the /dev/ fs is "static", would snddevices add the
needed /dev/midi10../dev/midi13 files?

Regards,
Carlos


-------------------------------------------------------
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/

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

* Re: oss raw midi emulation
  2004-11-28 15:14 oss raw midi emulation Carlos Pita
  2004-11-28 15:22 ` Jaroslav Kysela
@ 2004-11-29 11:24 ` Takashi Iwai
  1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2004-11-29 11:24 UTC (permalink / raw)
  To: Carlos Pita; +Cc: alsa-devel

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/

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

end of thread, other threads:[~2004-11-29 11:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox