valioiv
valioiv

Reputation: 423

Loading a kernel module (snd-aloop) multiple times

I want to load "snd-aloop" in order to get multiple device nodes at the end like:

/dev/snd/xxx0

/dev/snd/xxx1

...

/dev/snd/xxxN

(How)Can I do it with simple modprobe command (Ubuntu 16.04) and some helper commands if needed? Need the exact steps to do it...

If NOT, (how) can I wrap with some C code the "snd-aloop" kernel driver a bit and spawn multiple instance of it? Need exact kernel C APIs and some sample code...

Upvotes: 0

Views: 1561

Answers (1)

user2526111
user2526111

Reputation: 474

As far as I understand, you cannot load the multiple instances of the same kernel module.

You can create multiple "devices" by calling device creation APIs. For example, netdev, char_dev,.... whatever you want.

Any specific reason to do this? from single kernel module, creating multiple devices are way more simpler. If you want to create the devices on-demand, use ioctl() or proc whatever you want.

Upvotes: 1

Related Questions