[alsa-devel] [PATCH 0/3]: ALSA: compress: sampling rate updates
Here are three patches which add more comments for sampling rate usage, fix the descriptor usage and lastly remove a check for SNDRV_PCM_RATE_xxx check
Thanks
Vinod Koul (3): ALSA: compress: remove the sample rate check ALSA: compress: update comment for sample rate in snd_codec ALSA: compress: update struct snd_codec_desc for sample rate
include/uapi/sound/compress_params.h | 6 ++++-- sound/core/compress_offload.c | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-
commit f0e9c080 - "ALSA: compress: change the way sample rates are sent to kernel" changed the way sample rates are sent. So now we don't need to check for PCM_RATE_xxx in kernel
Signed-off-by: Vinod Koul vinod.koul@intel.com --- sound/core/compress_offload.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 9d518ac..7a20897 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -501,9 +501,6 @@ static int snd_compress_check_input(struct snd_compr_params *params) if (params->codec.ch_in == 0 || params->codec.ch_out == 0) return -EINVAL;
- if (!(params->codec.sample_rate & SNDRV_PCM_RATE_8000_192000)) - return -EINVAL; - return 0; }
Signed-off-by: Vinod Koul vinod.koul@intel.com --- include/uapi/sound/compress_params.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index 1114e38..5224a06 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -364,7 +364,8 @@ struct snd_codec_desc { * @ch_out: Number of output channels. In case of contradiction between * this field and the channelMode field, the channelMode field * overrides. - * @sample_rate: Audio sample rate of input data + * @sample_rate: Audio sample rate of input data in Hz, use values like 48000 + * for this. * @bit_rate: Bitrate of encoded data. May be ignored by decoders * @rate_control: Encoding rate control. See SND_RATECONTROLMODE defines. * Encoders may rely on profiles for quality levels.
Now that we don't use SNDRV_PCM_RATE_xxx bit fields for sample rate, we need to change the description to an array for describing the sample rates supported by the sink/source
Signed-off-by: Vinod Koul vinod.koul@intel.com --- include/uapi/sound/compress_params.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/uapi/sound/compress_params.h b/include/uapi/sound/compress_params.h index 5224a06..7cb9d5f 100644 --- a/include/uapi/sound/compress_params.h +++ b/include/uapi/sound/compress_params.h @@ -57,6 +57,7 @@ #define MAX_NUM_CODECS 32 #define MAX_NUM_CODEC_DESCRIPTORS 32 #define MAX_NUM_BITRATES 32 +#define MAX_NUM_SAMPLE_RATES 32
/* Codecs are listed linearly to allow for extensibility */ #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001) @@ -346,7 +347,7 @@ union snd_codec_options {
struct snd_codec_desc { __u32 max_ch; - __u32 sample_rates; + __u32 sample_rates[MAX_NUM_SAMPLE_RATES]; __u32 bit_rate[MAX_NUM_BITRATES]; __u32 num_bitrates; __u32 rate_control;
At Sat, 4 Jan 2014 16:59:10 +0530, Vinod Koul wrote:
Here are three patches which add more comments for sampling rate usage, fix the descriptor usage and lastly remove a check for SNDRV_PCM_RATE_xxx check
Applied all three patches now. Thanks.
Takashi
Thanks
Vinod Koul (3): ALSA: compress: remove the sample rate check ALSA: compress: update comment for sample rate in snd_codec ALSA: compress: update struct snd_codec_desc for sample rate
include/uapi/sound/compress_params.h | 6 ++++-- sound/core/compress_offload.c | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-
participants (2)
-
Takashi Iwai
-
Vinod Koul