Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* virmidi, hotplug and udev
@ 2004-11-28 21:51 Carlos Pita
  2004-11-29 11:28 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Pita @ 2004-11-28 21:51 UTC (permalink / raw)
  To: alsa-devel

Hi!

I'm using kernel 2.6.8 with hotplug enabled and udev
(distro: debian sarge).

I need to use the snd-virmidi to create a virtual sound card
with its raw midi devices.

I do:
  modprobe snd-virmidi

Does this generate a hotplug event? Or at least an udev event?

I ask it because here the order is somewhat inverted. Normally
a device is cold/hot plugged and modprobe is run in
response to a subsequent hotplug event. But here the device is
added as the effect of a previous modprobe. One thing I see
is that modprobe would be retried as part of the event processing,
that's innocuous but ugly.

Finally, do you know how to write the udev rules to generate
the OSS raw midi devices. Currently, the only rules related
to ALSA in my /etc/udev/rules.d/udev.rules are:

# ALSA devices
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hw[CD0-9]*",    NAME="snd/%k"
KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL="midi[CD0-9]*",  NAME="snd/%k"
KERNEL="timer",         NAME="snd/%k"
KERNEL="seq",           NAME="snd/%k"

Most of the OSS devices are generated at boot time by
udevstart. But /dev/midi10.../dev/midi13 are missing after
modprobing snd-virmidi.

Thank you in advance.
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] 2+ messages in thread

* Re: virmidi, hotplug and udev
  2004-11-28 21:51 virmidi, hotplug and udev Carlos Pita
@ 2004-11-29 11:28 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2004-11-29 11:28 UTC (permalink / raw)
  To: Carlos Pita; +Cc: alsa-devel

At Sun, 28 Nov 2004 18:51:29 -0300,
Carlos Pita wrote:
> 
> Hi!
> 
> I'm using kernel 2.6.8 with hotplug enabled and udev
> (distro: debian sarge).
> 
> I need to use the snd-virmidi to create a virtual sound card
> with its raw midi devices.
> 
> I do:
>   modprobe snd-virmidi
> 
> Does this generate a hotplug event? Or at least an udev event?
> 
> I ask it because here the order is somewhat inverted. Normally
> a device is cold/hot plugged and modprobe is run in
> response to a subsequent hotplug event. But here the device is
> added as the effect of a previous modprobe. One thing I see
> is that modprobe would be retried as part of the event processing,
> that's innocuous but ugly.
> 
> Finally, do you know how to write the udev rules to generate
> the OSS raw midi devices. Currently, the only rules related
> to ALSA in my /etc/udev/rules.d/udev.rules are:
> 
> # ALSA devices
> KERNEL="controlC[0-9]*", NAME="snd/%k"
> KERNEL="hw[CD0-9]*",    NAME="snd/%k"
> KERNEL="pcm[CD0-9cp]*", NAME="snd/%k"
> KERNEL="midi[CD0-9]*",  NAME="snd/%k"
> KERNEL="timer",         NAME="snd/%k"
> KERNEL="seq",           NAME="snd/%k"
> 
> Most of the OSS devices are generated at boot time by
> udevstart. But /dev/midi10.../dev/midi13 are missing after
> modprobing snd-virmidi.

There are no /dev/midi1x devices on OSS.
As written in my last post, the OSS device has no concept of "card".
It just accepts the device in a serial order.

Nevertheless, OSS supports only up to 4 devices for /dev/midi0?.
(You can use more 4 devices with /dev/amidi?, too, though.)


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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-28 21:51 virmidi, hotplug and udev Carlos Pita
2004-11-29 11:28 ` Takashi Iwai

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