[LAU] Assigning devices at boot up.

Bill Purvis bill at billp.org
Tue Dec 8 17:55:35 CET 2020


On 08/12/2020 16:40, Jeremy Jongepier wrote:
> Hello,
>
> On 08-12-2020 16:44, Bill Purvis wrote:
>> On 08/12/2020 15:30, Florian Paul Schmidt wrote:
>>> Hi,
>>>
>>> if the USB device id is different for the two usb devices then you might
>>> just write a custum udev-rule that loads the snd-usb-audio module with
>>> different card index parameters..
>>>
>>> Regards,
>>> FPS
>> That's my problem, the keyboards are identical models and the only thing
>> that
>> will distinguish them is the slot they are plugged into. I haven't got
>> as far
>> as plugging both in and looking if there is a correlation between the
>> information
>> provided by lsusb and the Alsa slot id. I think I can get them on
>> separate hubs
>> which might be useful. I know very little about what goes on when
>> devices are
>> initialised. If all else fails, I'll have to plug one into an Arduino
>> and use
>> that to shift the channel number, but I had hoped to avoid going that far!
>>
>> Bill
>>
> If the keyboards are on different USB buses you can use that difference
> to distinguish between them. Like Florian said you can use Udev for
> this. Did a quick search and this might be useful:
> https://github.com/dh1tw/remoteAudio/wiki/Persistent-USB-Mapping-of-Audio-devices-(Linux)#udev-rule-based-on-usb-port
> lsusb can tell you which keyboard lives on which USB bus, bear in mind
> that different USB ports can live on the same bus. So the trick is to
> find out if there are USB ports living on different buses and connecting
> the keyboards to those specific ports.
>
> Best,
>
> Jeremy
Thanks, Jeremy, that should be sufficient for my purposes!

Great guy!

Bill

-- 
+----------------------------------------+
| Bill Purvis                            |
| email: bill at billp.org                  |
+----------------------------------------+


More information about the Linux-audio-user mailing list