1772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/****************************************************************************
2772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ****************************************************************************
3772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***
4772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   This header was automatically generated from a Linux kernel header
5772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   of the same name, to make information necessary for userspace to
6772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   call into the kernel available to libc.  It contains only constants,
7772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   structures, and macros generated from the original header, and thus,
8772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   contains no copyrightable information.
9772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***
10772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   To edit the content of this header, modify the corresponding
11772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   source file (e.g. under external/kernel-headers/original/) then
12772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   run bionic/libc/kernel/tools/update_all.py
13772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***
14772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   Any manual change here will be lost the next time this script will
15772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***   be run. You've been warned!
16772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ***
17772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ****************************************************************************
18772b7facf972926b14fe303d0348c200cb20a313Prashant Malani ****************************************************************************/
19772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#ifndef __COMPRESS_OFFLOAD_H
20772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define __COMPRESS_OFFLOAD_H
21772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#include <linux/types.h>
22772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#include <sound/asound.h>
23772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#include <sound/compress_params.h>
25772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2)
26772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compressed_buffer {
27772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 fragment_size;
28772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 fragments;
30464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
31772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_params {
32772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  struct snd_compressed_buffer buffer;
33772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  struct snd_codec codec;
35772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u8 no_wake_mode;
36464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
37772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_tstamp {
38772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 byte_offset;
40464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry  __u64 copied_total;
41772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 pcm_frames;
42772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 pcm_io_frames;
43772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 sampling_rate;
45772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  uint64_t timestamp;
46464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
47772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_avail {
48772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u64 avail;
50772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  struct snd_compr_tstamp tstamp;
51464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
52772b7facf972926b14fe303d0348c200cb20a313Prashant Malanienum snd_compr_direction {
53772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SND_COMPRESS_PLAYBACK = 0,
55772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SND_COMPRESS_CAPTURE
56772b7facf972926b14fe303d0348c200cb20a313Prashant Malani};
57772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_caps {
58772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 num_codecs;
60772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 direction;
61772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 min_fragment_size;
62772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 max_fragment_size;
63772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 min_fragments;
65772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 max_fragments;
66772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 codecs[MAX_NUM_CODECS];
67772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 reserved[11];
68772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
70772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_codec_caps {
71772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 codec;
72772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 num_descriptors;
73772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS];
75464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
76772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_audio_info {
77772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  uint32_t frame_size;
78772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  uint32_t reserved[15];
80464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
81772b7facf972926b14fe303d0348c200cb20a313Prashant Malanienum {
82772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SNDRV_COMPRESS_ENCODER_PADDING = 1,
83772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SNDRV_COMPRESS_ENCODER_DELAY = 2,
85772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SNDRV_COMPRESS_MIN_BLK_SIZE = 3,
86772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  SNDRV_COMPRESS_MAX_BLK_SIZE = 4,
87772b7facf972926b14fe303d0348c200cb20a313Prashant Malani};
88772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89772b7facf972926b14fe303d0348c200cb20a313Prashant Malanistruct snd_compr_metadata {
90772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 key;
91772b7facf972926b14fe303d0348c200cb20a313Prashant Malani  __u32 value[8];
92464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry} __attribute__((packed, aligned(4)));
93772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
95772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
96772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps)
97772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params)
98772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec)
100772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata)
101772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata)
102772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp)
103772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail)
105772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30)
106772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_RESUME _IO('C', 0x31)
107772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_START _IO('C', 0x32)
108772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_STOP _IO('C', 0x33)
110772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34)
111772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35)
112772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36)
113772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry#define SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM _IOW('C', 0x80, union snd_codec_options)
115772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_COMPR_TRIGGER_DRAIN 7
116772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_COMPR_TRIGGER_NEXT_TRACK 8
117772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9
118772b7facf972926b14fe303d0348c200cb20a313Prashant Malani/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#define SNDRV_COMPRESS_METADATA_MODE _IOW('C', 0x99, bool)
120772b7facf972926b14fe303d0348c200cb20a313Prashant Malani#endif
121464aadab995fc0ef1616362ad795e9a3ba6c4f16Tom Cherry
122