From: Vinod Koul Date: Tue, 7 Jan 2014 16:25:42 +0000 (+0530) Subject: ALSA: compress: add num_sample_rates in snd_codec_desc X-Git-Tag: firefly_0821_release~4090^2~153 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c5400a9083607af9852cf2c0ac0093a128cd3c18;p=firefly-linux-kernel-4.4.55.git ALSA: compress: add num_sample_rates in snd_codec_desc this gives ability to convey the valid values of supported rates in sample_rates array Signed-off-by: Vinod Koul Signed-off-by: Takashi Iwai (cherry picked from commit 929559be6d2c494e25bb58b730da4a78c1459e7b) Signed-off-by: Yuchen Song Change-Id: Icfbb6d272a70c0a94719613c00bac18c5a0e3f87 --- diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index b62b24b7f834..165e7059de75 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -326,6 +326,7 @@ union snd_codec_options { /** struct snd_codec_desc - description of codec capabilities * @max_ch: Maximum number of audio channels * @sample_rates: Sampling rates in Hz, use values like 48000 for this + * @num_sample_rates: Number of valid values in sample_rates array * @bit_rate: Indexed array containing supported bit rates * @num_bitrates: Number of valid values in bit_rate array * @rate_control: value is specified by SND_RATECONTROLMODE defines. @@ -348,6 +349,7 @@ union snd_codec_options { struct snd_codec_desc { __u32 max_ch; __u32 sample_rates[MAX_NUM_SAMPLE_RATES]; + __u32 num_sample_rates; __u32 bit_rate[MAX_NUM_BITRATES]; __u32 num_bitrates; __u32 rate_control;