[alsa-devel] ASOC and 12 bit volume control

Jon Smirl jonsmirl at gmail.com
Sun Jul 20 04:18:55 CEST 2008


How do I define a volume control that is the bottom 12 bits of a 32
bit register?

#define SOC_SINGLE_VALUE(reg, shift, max, invert) ((reg) | ((shift) << 8) |\
	((shift) << 12) | ((max) << 16) | ((invert) << 24))

This looks like it only support an 8 bit max. Is there another way to do it?

-- 
Jon Smirl
jonsmirl at gmail.com


More information about the Alsa-devel mailing list