On Fri, 02 Dec 2016 08:36:22 +0100, Clemens Ladisch wrote:
Li Xu wrote:
Add 12KHz, 24KHz, 352.8KHz and 384KHz audio sample rates
+#define SNDRV_PCM_RATE_12000 (1<<3) /* 12000Hz */ +#define SNDRV_PCM_RATE_24000 (1<<6) /* 24000Hz */ +#define SNDRV_PCM_RATE_352800 (1<<15) /* 352800Hz */ +#define SNDRV_PCM_RATE_384000 (1<<16) /* 384000Hz */
To quote http://mailman.alsa-project.org/pipermail/alsa-devel/2013-July/064461.html: You don't need such symbols to use a rate. These symbols are intended for often-used rates. As long as only one or two drivers use a rate, they can just set KNOT and install a constraint.
How many driver would actually use it?
Maybe 352.8k or 384kHz are getting popular, but yes, I'd love to see the actual users before defining such things. Don't get me wrong, I'm not against adding it; I'm just against blindly adding it.
However, while looking at these requests, I wonder whether it'd be cleaner to add an optional rate array in snd_pcm_hardware struct itself. This will reduce the total code sizes, too, I guess.
Opinion?
thanks,
Takashi