: ALSA: compress: sampling rate updates
Subsystems (2)
cover : 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(-
PATCH 1/3 ALSA: compress: remove the sample rate check
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
--- sound/core/compress_offload.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
sound/core/compress_offload.c +0 -3
@@ -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 ; }
Signature · 1 line
1.7.0.4
PATCH 2/3 ALSA: compress: update comment for sample rate in snd_codec
In reply to Vinod Koul--- include/uapi/sound/compress_params.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/uapi/sound/compress_params.h +2 -1
@@ -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.
Signature · 1 line
1.7.0.4
PATCH 3/3 ALSA: compress: update struct snd_codec_desc for sample rate
In reply to Vinod KoulNow 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
--- include/uapi/sound/compress_params.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/uapi/sound/compress_params.h +2 -1
@@ -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;
Signature · 1 line
1.7.0.4
Takashi Iwai
AppliedAt Sat, 4 Jan 2014 16:59:10 +0530,
Quoted 3 lines · Vinod Koul
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_xxxcheck
Applied all three patches now. Thanks.
Takashi
Quoted 12 lines
Thanks
Vinod Koul (3):
ALSA: compress: remove the sample rate check
ALSA: compress: update comment for sample rate insnd_codec
ALSA: compress: update structsnd_codec_descfor sample rateinclude/uapi/sound/compress_params.h | 6 ++++-- sound/core/compress_offload.c | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-