---------- Forwarded message ---------- From: "Ingo Scherzinger" ingo@miamiwave.com To: "'pd-list'" pd-list@iem.at Date: Mon, 17 May 2010 09:10:27 +0200 Subject: [PD] udev & usb midi interfaces
Hi,
does anybody know the search path to get udev information about usb midi interfaces?
It should be something like “udevadm info -a -p / ??? …”. I’m not realy sure how to search for the soundcard either.
I was using “lshal” which gives me a lot of information but I can’t tell which part to use for the udev device rules.
I read Daniel Drake’s “writing udev rules” but he doesn’t mention sound at all.
Yeah, it's easy ... try
udevinfo -a -p $(udevinfo -q path -n /dev/*your device*)
and plug in the device ... this command will list all the udev attributes it sees when it makes the sysfs usb tree. I use it it see what attributes I can use for writing udev rules. Drake may not explciity list "sound" or "midi" devices, but they are covered by the tutorial as well ... just find where the device is mounted in /dev and use that node in udevinfo.
I really need to write some udev rules to straighten out my 2 usb midi interfaces and soundcard that get mixed up all the time.
Why udev rules then ...? I use the portaudio index of the soundcard to pass to pd with -audiodev on startup (I use -nogui and alsa) and another script which parses aconnect -io to determine the alsa mdii index, then calls aconnect again to connect pd with the midi device.
Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.
Hi,
On Mon, May 17, 2010 at 11:28:42AM +0200, Daniel Wilcox wrote:
Why udev rules then ...? I use the portaudio index of the soundcard to pass to pd with -audiodev on startup (I use -nogui and alsa) and another script which parses aconnect -io to determine the alsa mdii index, then calls aconnect again to connect pd with the midi device.
Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.
If your devices are different, you can use the vendor and product ids to specify the soundcard index ALSA uses: http://alsa.opensrc.org/index.php/MultipleUSBAudioDevices
If you really must use udev, maybe this helps: http://alsa.opensrc.org/index.php/Udev
Frank
Thank you Dan,
I'll check out both ways and see which one will work best.
Ingo
Subject: [PD] udev & usb midi interfaces
Hi,
does anybody know the search path to get udev information about usb midi interfaces?
It should be something like "udevadm info -a -p / ??? .". I'm not realy sure how to search for the soundcard either.
I was using "lshal" which gives me a lot of information but I can't tell which part to use for the udev device rules.
I read Daniel Drake's "writing udev rules" but he doesn't mention sound at all.
Yeah, it's easy ... try
udevinfo -a -p $(udevinfo -q path -n /dev/your device)
and plug in the device ... this command will list all the udev attributes it sees when it makes the sysfs usb tree. I use it it see what attributes I can use for writing udev rules. Drake may not explciity list "sound" or "midi" devices, but they are covered by the tutorial as well ... just find where the device is mounted in /dev and use that node in udevinfo.
I really need to write some udev rules to straighten out my 2 usb midi interfaces and soundcard that get mixed up all the time.
Why udev rules then ...? I use the portaudio index of the soundcard to pass to pd with -audiodev on startup (I use -nogui and alsa) and another script which parses aconnect -io to determine the alsa mdii index, then calls aconnect again to connect pd with the midi device.
Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.
Here's the pd start script I use (it's called at login): http://trac.robotcowboy.com/browser/robotcowboy/trunk/scripts/rc_starts_pd
http://trac.robotcowboy.com/browser/robotcowboy/trunk/scripts/rc_starts_pd... the trac is a bit empty right now as I just set it up last week.
On Mon, May 17, 2010 at 1:22 PM, Ingo Scherzinger ingo@miamiwave.comwrote:
Thank you Dan,
I’ll check out both ways and see which one will work best.
Ingo
Subject: [PD] udev & usb midi interfaces
Hi,
does anybody know the search path to get udev information about usb midi interfaces?
It should be something like “udevadm info -a -p / ??? …”. I’m not realy sure how to search for the soundcard either.
I was using “lshal” which gives me a lot of information but I can’t tell which part to use for the udev device rules.
I read Daniel Drake’s “writing udev rules” but he doesn’t mention sound at all.
Yeah, it's easy ... try
udevinfo -a -p $(udevinfo -q path -n /dev/*your device*)
and plug in the device ... this command will list all the udev attributes it sees when it makes the sysfs usb tree. I use it it see what attributes I can use for writing udev rules. Drake may not explciity list "sound" or "midi" devices, but they are covered by the tutorial as well ... just find where the device is mounted in /dev and use that node in udevinfo.
I really need to write some udev rules to straighten out my 2 usb midi interfaces and soundcard that get mixed up all the time.
Why udev rules then ...? I use the portaudio index of the soundcard to pass to pd with -audiodev on startup (I use -nogui and alsa) and another script which parses aconnect -io to determine the alsa mdii index, then calls aconnect again to connect pd with the midi device.
Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.
-- Dan Wilcox danomatika www.robotcowboy.com
I'll check this one also to see if I can change it to work with my setup.
BTW udevinfo has changed to "udevadm info" on my system (Ubuntu 10.04). I hope it still does the same thing.
Ingo
Here's the pd start script I use (it's called at login): http://trac.robotcowboy.com/browser/robotcowboy/trunk/scripts/rc_starts_pd http://trac.robotcowboy.com/browser/robotcowboy/trunk/scripts/rc_starts_pd
http://trac.robotcowboy.com/browser/robotcowboy/trunk/scripts/rc_starts_pd ... the trac is a bit empty right now as I just set it up last week.
On Mon, May 17, 2010 at 1:22 PM, Ingo Scherzinger ingo@miamiwave.com wrote:
Thank you Dan,
I'll check out both ways and see which one will work best.
Ingo
Subject: [PD] udev & usb midi interfaces
Hi,
does anybody know the search path to get udev information about usb midi interfaces?
It should be something like "udevadm info -a -p / ??? .". I'm not realy sure how to search for the soundcard either.
I was using "lshal" which gives me a lot of information but I can't tell which part to use for the udev device rules.
I read Daniel Drake's "writing udev rules" but he doesn't mention sound at all.
Yeah, it's easy ... try
udevinfo -a -p $(udevinfo -q path -n /dev/your device)
and plug in the device ... this command will list all the udev attributes it sees when it makes the sysfs usb tree. I use it it see what attributes I can use for writing udev rules. Drake may not explciity list "sound" or "midi" devices, but they are covered by the tutorial as well ... just find where the device is mounted in /dev and use that node in udevinfo.
I really need to write some udev rules to straighten out my 2 usb midi interfaces and soundcard that get mixed up all the time.
Why udev rules then ...? I use the portaudio index of the soundcard to pass to pd with -audiodev on startup (I use -nogui and alsa) and another script which parses aconnect -io to determine the alsa mdii index, then calls aconnect again to connect pd with the midi device.
Actually, perhaps you are right as it would be nice to have udev run aconnect whenever my midi device is plugged in.