[alsa-devel] [RFC PATCH] ALSA: compress: Add SND_AUDIOCODEC_BESPOKE
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Oct 20 19:47:58 CEST 2015
On 10/20/15 8:39 AM, Charles Keepax wrote:
> When working with the compressed framework occasionally vendors will
> use esoteric internal audio formats. For such formats it doesn't really
> make sense to add an new define to the kernel as their use is not
> sufficiently general.
>
> This patch adds a new define SND_AUDIOCODEC_BESPOKE that vendors can use
> in such situations.
>
> Signed-off-by: Charles Keepax <ckeepax at opensource.wolfsonmicro.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 d9bd9ca..e284380 100644
> --- a/include/uapi/sound/compress_params.h
> +++ b/include/uapi/sound/compress_params.h
> @@ -73,7 +73,8 @@
> #define SND_AUDIOCODEC_IEC61937 ((__u32) 0x0000000B)
> #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
> #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
> -#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_G729
> +#define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
No real objections from me, this is better than overloading PCM for this
purpose...
Since this is clearly an escape mechanism for a non-standard codec,
maybe we should use an ID that's not in sequence, eg 0x00001000.
If you need to set parameters maybe we should also change the definition
of snd_enc_generic so that the reserved fields can be used for custom
parameters, or document that their use is permitted for this sort of ID.
> +#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_BESPOKE
>
> /*
> * Profile and modes are listed with bit masks. This allows for a
>
More information about the Alsa-devel
mailing list