From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: oss raw midi emulation Date: Mon, 29 Nov 2004 12:24:49 +0100 Message-ID: References: <200411281214.24321.carlosjosepita@yahoo.com.ar> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from Cantor.suse.de (mail-ex.suse.de [195.135.220.2]) by alsa.alsa-project.org (ALSA's E-mail Delivery System) with ESMTP id A3AEE2B7 for ; Mon, 29 Nov 2004 12:24:49 +0100 (MET) In-Reply-To: <200411281214.24321.carlosjosepita@yahoo.com.ar> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Carlos Pita Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org 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/