122851890Sopenharmony_ci/**************************************************************************** 222851890Sopenharmony_ci **************************************************************************** 322851890Sopenharmony_ci *** 422851890Sopenharmony_ci *** This header was automatically generated from a Linux kernel header 522851890Sopenharmony_ci *** of the same name, to make information necessary for userspace to 622851890Sopenharmony_ci *** call into the kernel available to libc. It contains only constants, 722851890Sopenharmony_ci *** structures, and macros generated from the original header, and thus, 822851890Sopenharmony_ci *** contains no copyrightable information. 922851890Sopenharmony_ci *** 1022851890Sopenharmony_ci *** To edit the content of this header, modify the corresponding 1122851890Sopenharmony_ci *** source file (e.g. under external/kernel-headers/original/) then 1222851890Sopenharmony_ci *** run bionic/libc/kernel/tools/update_all.py 1322851890Sopenharmony_ci *** 1422851890Sopenharmony_ci *** Any manual change here will be lost the next time this script will 1522851890Sopenharmony_ci *** be run. You've been warned! 1622851890Sopenharmony_ci *** 1722851890Sopenharmony_ci **************************************************************************** 1822851890Sopenharmony_ci ****************************************************************************/ 1922851890Sopenharmony_ci#ifndef __COMPRESS_OFFLOAD_H 2022851890Sopenharmony_ci#define __COMPRESS_OFFLOAD_H 2122851890Sopenharmony_ci#include <linux/types.h> 2222851890Sopenharmony_ci#include <sound/asound.h> 2322851890Sopenharmony_ci#include <sound/compress_params.h> 2422851890Sopenharmony_ci#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 2, 0) 2522851890Sopenharmony_cistruct snd_compressed_buffer { 2622851890Sopenharmony_ci __u32 fragment_size; 2722851890Sopenharmony_ci __u32 fragments; 2822851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 2922851890Sopenharmony_cistruct snd_compr_params { 3022851890Sopenharmony_ci struct snd_compressed_buffer buffer; 3122851890Sopenharmony_ci struct snd_codec codec; 3222851890Sopenharmony_ci __u8 no_wake_mode; 3322851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 3422851890Sopenharmony_cistruct snd_compr_tstamp { 3522851890Sopenharmony_ci __u32 byte_offset; 3622851890Sopenharmony_ci __u32 copied_total; 3722851890Sopenharmony_ci __u32 pcm_frames; 3822851890Sopenharmony_ci __u32 pcm_io_frames; 3922851890Sopenharmony_ci __u32 sampling_rate; 4022851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 4122851890Sopenharmony_cistruct snd_compr_avail { 4222851890Sopenharmony_ci __u64 avail; 4322851890Sopenharmony_ci struct snd_compr_tstamp tstamp; 4422851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 4522851890Sopenharmony_cienum snd_compr_direction { 4622851890Sopenharmony_ci SND_COMPRESS_PLAYBACK = 0, 4722851890Sopenharmony_ci SND_COMPRESS_CAPTURE 4822851890Sopenharmony_ci}; 4922851890Sopenharmony_cistruct snd_compr_caps { 5022851890Sopenharmony_ci __u32 num_codecs; 5122851890Sopenharmony_ci __u32 direction; 5222851890Sopenharmony_ci __u32 min_fragment_size; 5322851890Sopenharmony_ci __u32 max_fragment_size; 5422851890Sopenharmony_ci __u32 min_fragments; 5522851890Sopenharmony_ci __u32 max_fragments; 5622851890Sopenharmony_ci __u32 codecs[MAX_NUM_CODECS]; 5722851890Sopenharmony_ci __u32 reserved[11]; 5822851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 5922851890Sopenharmony_cistruct snd_compr_codec_caps { 6022851890Sopenharmony_ci __u32 codec; 6122851890Sopenharmony_ci __u32 num_descriptors; 6222851890Sopenharmony_ci struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS]; 6322851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 6422851890Sopenharmony_cienum sndrv_compress_encoder { 6522851890Sopenharmony_ci SNDRV_COMPRESS_ENCODER_PADDING = 1, 6622851890Sopenharmony_ci SNDRV_COMPRESS_ENCODER_DELAY = 2, 6722851890Sopenharmony_ci}; 6822851890Sopenharmony_cistruct snd_compr_metadata { 6922851890Sopenharmony_ci __u32 key; 7022851890Sopenharmony_ci __u32 value[8]; 7122851890Sopenharmony_ci} __attribute__((packed, aligned(4))); 7222851890Sopenharmony_ci#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) 7322851890Sopenharmony_ci#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps) 7422851890Sopenharmony_ci#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps) 7522851890Sopenharmony_ci#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) 7622851890Sopenharmony_ci#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) 7722851890Sopenharmony_ci#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata) 7822851890Sopenharmony_ci#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata) 7922851890Sopenharmony_ci#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) 8022851890Sopenharmony_ci#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) 8122851890Sopenharmony_ci#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) 8222851890Sopenharmony_ci#define SNDRV_COMPRESS_RESUME _IO('C', 0x31) 8322851890Sopenharmony_ci#define SNDRV_COMPRESS_START _IO('C', 0x32) 8422851890Sopenharmony_ci#define SNDRV_COMPRESS_STOP _IO('C', 0x33) 8522851890Sopenharmony_ci#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) 8622851890Sopenharmony_ci#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) 8722851890Sopenharmony_ci#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) 8822851890Sopenharmony_ci#define SND_COMPR_TRIGGER_DRAIN 7 8922851890Sopenharmony_ci#define SND_COMPR_TRIGGER_NEXT_TRACK 8 9022851890Sopenharmony_ci#define SND_COMPR_TRIGGER_PARTIAL_DRAIN 9 9122851890Sopenharmony_ci#endif 92