[alsa-devel] question on snd minors

Vinod Koul vinod.koul at linux.intel.com
Tue Nov 15 10:25:33 CET 2011

On Tue, 2011-11-15 at 09:11 +0100, Takashi Iwai wrote:
> > For compressed path (i had posted RFC roughly two months back [1]),
> we
> > are creating new devices /dev/snd/comprCxDxp which would be
> registered
> > as SNDRV_DEV_COMPRESS. For the registration part we need to assign
> the
> > minors, right? Hence the above question
> > 
> > Or did I miss something very obvious here...
> Yes, take a look at PCM devices, for example.  They have sub-streams.
> So, you can open a single device file multiple times to assign
> multiple sub-streams.  If any specific substream with a given index is
> needed, it can be specified via ioctl before open.  Otherwise, the
> next empty substream is assigned.
> The similar implementation is found in rawmidi, too.
Okay Thanks a bunch, I wanted to avoid these kind of mistakes :)

right now we don't have PCM devices or substreams notion. The DSP driver
registers the compressed_ops (not pcm) with framework and we create the
device nodes. framework would call them based on state and file_ops

>From what I read in rawmidi and your suggestion about PCM devices, I
think you are suggesting to use a single file ops only (this a single
minor number (or two, including capture) would suffice instead of a
range, right? Any suggestion of which number to use?
(well i followed the usually convention of PCM for minor numbers,
although I cannot envision a device with multiple/large DSPs for audio


More information about the Alsa-devel mailing list