hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/uapi/sound/compress_params.h
....@@ -54,33 +54,11 @@
5454
5555 #include <linux/types.h>
5656
57
-/* Maximum PCM channels */
58
-#define MAX_PCM_DECODE_CHANNELS 32
59
-
6057 /* AUDIO CODECS SUPPORTED */
6158 #define MAX_NUM_CODECS 32
6259 #define MAX_NUM_CODEC_DESCRIPTORS 32
6360 #define MAX_NUM_BITRATES 32
6461 #define MAX_NUM_SAMPLE_RATES 32
65
-
66
-/* compressed TX */
67
-#define MAX_NUM_FRAMES_PER_BUFFER 1
68
-#define COMPRESSED_META_DATA_MODE 0x10
69
-#define META_DATA_LEN_BYTES 36
70
-#define Q6_AC3_DECODER 0x00010BF6
71
-#define Q6_EAC3_DECODER 0x00010C3C
72
-#define Q6_DTS 0x00010D88
73
-#define Q6_DTS_LBR 0x00010DBB
74
-
75
-/* Timestamp flsg */
76
-/* Bit-0 - 1 : Enable Timestamp mode */
77
-/* Bit-0 - 0 : Disable Timestamp mode */
78
-#define COMPRESSED_TIMESTAMP_FLAG 0x0001
79
-
80
-/* Perf mode flag */
81
-/* Bit-1 - 1 : Enable perf mode */
82
-/* Bit-1 - 0 : Disable perf mode */
83
-#define COMPRESSED_PERF_MODE_FLAG 0x0002
8462
8563 /* Codecs are listed linearly to allow for extensibility */
8664 #define SND_AUDIOCODEC_PCM ((__u32) 0x00000001)
....@@ -97,25 +75,9 @@
9775 #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C)
9876 #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D)
9977 #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E)
100
-#define SND_AUDIOCODEC_DTS_PASS_THROUGH ((__u32) 0x0000000F)
101
-#define SND_AUDIOCODEC_DTS_LBR ((__u32) 0x00000010)
102
-#define SND_AUDIOCODEC_DTS_TRANSCODE_LOOPBACK ((__u32) 0x00000011)
103
-#define SND_AUDIOCODEC_PASS_THROUGH ((__u32) 0x00000012)
104
-#define SND_AUDIOCODEC_MP2 ((__u32) 0x00000013)
105
-#define SND_AUDIOCODEC_DTS_LBR_PASS_THROUGH ((__u32) 0x00000014)
106
-#define SND_AUDIOCODEC_AC3 ((__u32) 0x00000015)
107
-#define SND_AUDIOCODEC_AC3_PASS_THROUGH ((__u32) 0x00000016)
108
-#define SND_AUDIOCODEC_WMA_PRO ((__u32) 0x00000017)
109
-#define SND_AUDIOCODEC_DTS ((__u32) 0x00000018)
110
-#define SND_AUDIOCODEC_EAC3 ((__u32) 0x00000019)
111
-#define SND_AUDIOCODEC_ALAC ((__u32) 0x00000020)
112
-#define SND_AUDIOCODEC_APE ((__u32) 0x00000021)
113
-#define SND_AUDIOCODEC_DSD ((__u32) 0x00000022)
114
-#define SND_AUDIOCODEC_APTX ((__u32) 0x00000023)
115
-#define SND_AUDIOCODEC_TRUEHD ((__u32) 0x00000024)
116
-#define SND_AUDIOCODEC_MAT ((__u32) 0x00000025)
117
-#define SND_AUDIOCODEC_THD ((__u32) 0x00000026)
118
-#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_THD
78
+#define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F)
79
+#define SND_AUDIOCODEC_APE ((__u32) 0x00000010)
80
+#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE
11981
12082 /*
12183 * Profile and modes are listed with bit masks. This allows for a
....@@ -182,6 +144,9 @@
182144 #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002)
183145 #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004)
184146 #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008)
147
+#define SND_AUDIOPROFILE_WMA9_PRO ((__u32) 0x00000010)
148
+#define SND_AUDIOPROFILE_WMA9_LOSSLESS ((__u32) 0x00000020)
149
+#define SND_AUDIOPROFILE_WMA10_LOSSLESS ((__u32) 0x00000040)
185150
186151 #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001)
187152 #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002)
....@@ -281,15 +246,8 @@
281246
282247 struct snd_enc_wma {
283248 __u32 super_block_align; /* WMA Type-specific data */
284
- __u32 bits_per_sample;
285
- __u32 channelmask;
286
- __u32 encodeopt;
287
- __u32 encodeopt1;
288
- __u32 encodeopt2;
289
- __u32 avg_bit_rate;
290249 };
291250
292
-#define SND_ENC_WMA_EXTENTED_SUPPORT
293251
294252 /**
295253 * struct snd_enc_vorbis
....@@ -364,41 +322,31 @@
364322 __s32 reserved[15]; /* Can be used for SND_AUDIOCODEC_BESPOKE */
365323 } __attribute__((packed, aligned(4)));
366324
367
-#define SND_DEC_THD_MAX_PARAMS 8
368
-struct snd_dec_thd {
369
- __u32 params_length;
370
- __u32 params_id[SND_DEC_THD_MAX_PARAMS];
371
- __u32 params_value[SND_DEC_THD_MAX_PARAMS];
372
-} __attribute__((packed, aligned(4)));
373
-
374325 struct snd_dec_flac {
375326 __u16 sample_size;
376327 __u16 min_blk_size;
377328 __u16 max_blk_size;
378329 __u16 min_frame_size;
379330 __u16 max_frame_size;
331
+ __u16 reserved;
380332 } __attribute__((packed, aligned(4)));
381333
382
-#define SND_DEC_FLAC_SUPPORTED
383
-
384
-struct snd_dec_vorbis {
385
- __u32 bit_stream_fmt;
386
-};
334
+struct snd_dec_wma {
335
+ __u32 encoder_option;
336
+ __u32 adv_encoder_option;
337
+ __u32 adv_encoder_option2;
338
+ __u32 reserved;
339
+} __attribute__((packed, aligned(4)));
387340
388341 struct snd_dec_alac {
389342 __u32 frame_length;
390343 __u8 compatible_version;
391
- __u8 bit_depth;
392344 __u8 pb;
393345 __u8 mb;
394346 __u8 kb;
395
- __u8 num_channels;
396
- __u16 max_run;
347
+ __u32 max_run;
397348 __u32 max_frame_bytes;
398
- __u32 avg_bit_rate;
399
- __u32 sample_rate;
400
- __u32 channel_layout_tag;
401
-};
349
+} __attribute__((packed, aligned(4)));
402350
403351 struct snd_dec_ape {
404352 __u16 compatible_version;
....@@ -407,53 +355,20 @@
407355 __u32 blocks_per_frame;
408356 __u32 final_frame_blocks;
409357 __u32 total_frames;
410
- __u16 bits_per_sample;
411
- __u16 num_channels;
412
- __u32 sample_rate;
413358 __u32 seek_table_present;
414
-};
415
-
416
-struct snd_dec_aptx {
417
- __u32 lap;
418
- __u32 uap;
419
- __u32 nap;
420
-};
421
-
422
-/** struct snd_dec_dsd - codec for DSD format
423
- * @blk_size - dsd channel block size
424
- */
425
-struct snd_dec_dsd {
426
- __u32 blk_size;
427
-};
428
-
429
-/** struct snd_dec_pcm - codec options for PCM format
430
- * @num_channels: Number of channels
431
- * @ch_map: Channel map for the above corresponding channels
432
- */
433
-struct snd_dec_pcm {
434
- __u32 num_channels;
435
- __u8 ch_map[MAX_PCM_DECODE_CHANNELS];
436359 } __attribute__((packed, aligned(4)));
437360
438
-struct snd_dec_amrwb_plus {
439
- __u32 bit_stream_fmt;
440
-};
441361 union snd_codec_options {
442362 struct snd_enc_wma wma;
443363 struct snd_enc_vorbis vorbis;
444364 struct snd_enc_real real;
445365 struct snd_enc_flac flac;
446366 struct snd_enc_generic generic;
447
- struct snd_dec_flac flac_dec;
448
- struct snd_dec_vorbis vorbis_dec;
449
- struct snd_dec_alac alac;
450
- struct snd_dec_ape ape;
451
- struct snd_dec_aptx aptx_dec;
452
- struct snd_dec_thd truehd;
453
- struct snd_dec_pcm pcm_dec;
454
- struct snd_dec_amrwb_plus amrwbplus;
455
- struct snd_dec_dsd dsd_dec;
456
-};
367
+ struct snd_dec_flac flac_d;
368
+ struct snd_dec_wma wma_d;
369
+ struct snd_dec_alac alac_d;
370
+ struct snd_dec_ape ape_d;
371
+} __attribute__((packed, aligned(4)));
457372
458373 /** struct snd_codec_desc - description of codec capabilities
459374 * @max_ch: Maximum number of audio channels
....@@ -514,7 +429,6 @@
514429 * @align: Block alignment in bytes of an audio sample.
515430 * Only required for PCM or IEC formats.
516431 * @options: encoder-specific settings
517
- * @compr_passthr: compressed bitstream passthrough
518432 * @reserved: reserved for future use
519433 */
520434
....@@ -531,26 +445,7 @@
531445 __u32 format;
532446 __u32 align;
533447 union snd_codec_options options;
534
- __u32 compr_passthr;
535
- __u32 flags;
536
- __u32 reserved[1];
448
+ __u32 reserved[3];
537449 } __attribute__((packed, aligned(4)));
538
-
539
-#define SND_CODEC_COMPRESS_PASSTHROUGH
540
-
541
-/** struct snd_codec_metadata
542
- * @length: Length of the encoded buffer.
543
- * @offset: Offset from the buffer address to the first byte of the first
544
- * encoded frame. All encoded frames are consecutive starting
545
- * from this offset.
546
- * @timestamp: Session time in microseconds of the first sample in the buffer.
547
- * @reserved: Reserved for future use.
548
- */
549
-struct snd_codec_metadata {
550
- __u32 length;
551
- __u32 offset;
552
- __u64 timestamp;
553
- __u32 reserved[4];
554
-};
555450
556451 #endif