Takashi Iwai wrote:
At Sun, 09 Nov 2008 15:59:03 +0100, Jelle de Jong wrote:
Hello everybody,
I am trying to use udev to get fixed device names depending on the location of the device on the usb bus. The udev rules seems to be working fine, however i cant get dmix to work with the udev rules using only hw dies work. If i remove the udev rules the dmixer works fine.
Can somebody look at the attachment, and maybe do some testing, i would highly appreciate it.
Swapping the card numbers with udev might have a problem because the driver itself remembers the card index, and this number isn't swapped -- thus you get inconsistency between the device file and the internal index number.
BTW, if you just would like to keep the fixed device index for a certain usb device path, try my old patch below. It adds devpath option to snd-usb-audio, and you can specify the usb device path string ("usb-$BUSNAME-$DEVPATH").
Takashi
Thank you Takashi for thanking the time to answer the question. I don't understand. If udev created the card numbers in the first place, swapping them should not make a difference? and why does the audio work fine with only hw:x and not when using dmix:x. How is the internal index number created? Can I control this index with udev? did I forget something in my udev rules?
Custom compiling sound modules is no option, it will break maintainability of the system in every way, sorry for this not being an sustainable option.
Almost all devices can be managed with udev rules, that is where the system is designed for, there are also alsa rules in there, if they don't work what is wrong then? is it an alsa issue, or udev, what are the dependencies when alsa uses hardware. How are the /dev/snd/* devices used and what is the /proc/asound/* for ?
Would it be possible to test my udev rules that I posted, they are not difficult and don't change your system just add the file do some testing then remove the file when done...
I can also sent some usb audio devices to some developers to do some testing.
Any help is appreciated.
Best regards,
Jelle