On Mon, 29 May 2006, Takashi Iwai wrote: > What we'll get by this compression is only the reduction of ioctl > size. But, these ioctls are called not so often and no time-critical > task. Nope. I'm talking about saving code in alsa-lib. Having a special case in alsa-lib for all hints is not really good. If you can store all necessary ranges to 32-bit value (which is allocated anyway) is a win. Of course, all mechanisms as James proposed will not be changed. I see only one problem why my proposal is not acceptable - we must store also the identifier type to the 32-bit value in the kernel side. Also, having both min and max values is not necessary (it can be evaluated from step). What about this (leaving 11 bits free for future use): /* * macros defining dB hints */ /* continuous dB steps, input values are dB * 100 */ /* min value must be from -15475 .. 5000 */ /* step value must be from 0 .. 1270 */ #define SND_DB_CONT(mute, min, step) \ (((mute) ? 1 : 0) | \ (((((min) + 15475) / 5) & 0x0fff) << 12) | \ ((((step) / 5) & 0xff) << 24)) /* special dB hint */ #define SND_DB_HINT(hint) \ (0xff000000 | hint) Jaroslav ----- Jaroslav Kysela <perex@xxxxxxx> Linux Kernel Sound Maintainer ALSA Project, SUSE Labs _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel