blob: 8928cbf6716bfb4ad28f1b078cd4ee2e14592775 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef __COMPRESS_OFFLOAD_H
20#define __COMPRESS_OFFLOAD_H
21#include <linux/types.h>
22#include <sound/asound.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <sound/compress_params.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070025#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2)
Ben Cheng655a7c02013-10-16 16:09:24 -070026struct snd_compressed_buffer {
Tao Baod7db5942015-01-28 10:07:51 -080027 __u32 fragment_size;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __u32 fragments;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070030} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070031struct snd_compr_params {
Tao Baod7db5942015-01-28 10:07:51 -080032 struct snd_compressed_buffer buffer;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 struct snd_codec codec;
35 __u8 no_wake_mode;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070036} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070037struct snd_compr_tstamp {
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 __u32 byte_offset;
40 __u32 copied_total;
41 __u32 pcm_frames;
42 __u32 pcm_io_frames;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 __u32 sampling_rate;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070045} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070046struct snd_compr_avail {
Tao Baod7db5942015-01-28 10:07:51 -080047 __u64 avail;
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 struct snd_compr_tstamp tstamp;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070050} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070051enum snd_compr_direction {
Tao Baod7db5942015-01-28 10:07:51 -080052 SND_COMPRESS_PLAYBACK = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 SND_COMPRESS_CAPTURE
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
56struct snd_compr_caps {
Tao Baod7db5942015-01-28 10:07:51 -080057 __u32 num_codecs;
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 direction;
60 __u32 min_fragment_size;
61 __u32 max_fragment_size;
62 __u32 min_fragments;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 __u32 max_fragments;
65 __u32 codecs[MAX_NUM_CODECS];
66 __u32 reserved[11];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070067} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69struct snd_compr_codec_caps {
Tao Baod7db5942015-01-28 10:07:51 -080070 __u32 codec;
71 __u32 num_descriptors;
72 struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS];
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070074} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070075enum {
Tao Baod7db5942015-01-28 10:07:51 -080076 SNDRV_COMPRESS_ENCODER_PADDING = 1,
77 SNDRV_COMPRESS_ENCODER_DELAY = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79};
80struct snd_compr_metadata {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u32 key;
82 __u32 value[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070084} __attribute__((packed, aligned(4)));
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
86#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
Tao Baod7db5942015-01-28 10:07:51 -080087#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps)
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
90#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
Tao Baod7db5942015-01-28 10:07:51 -080091#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata)
92#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata)
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
95#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
96#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
97#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define SNDRV_COMPRESS_START _IO('C', 0x32)
100#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
101#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
102#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
105#define SND_COMPR_TRIGGER_DRAIN 7
106#define SND_COMPR_TRIGGER_NEXT_TRACK 8
107#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#endif