#include <sound/asound.h>
#include <sound/compress_params.h>
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2)
+
struct snd_compressed_buffer {
__u32 fragment_size;
__u32 fragments;
-};
+}__attribute__((packed, aligned(4)));
struct snd_compr_params {
struct snd_compressed_buffer buffer;
struct snd_codec codec;
__u8 no_wake_mode;
-};
+}__attribute__((packed, aligned(4)));
struct snd_compr_tstamp {
__u32 byte_offset;
__u32 pcm_frames;
__u32 pcm_io_frames;
__u32 sampling_rate;
-};
+}__attribute__((packed, aligned(4)));
struct snd_compr_avail {
__u64 avail;
struct snd_compr_tstamp tstamp;
-};
+}__attribute__((packed, aligned(4)));
enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0,
__u32 max_fragments;
__u32 codecs[MAX_NUM_CODECS];
__u32 reserved[11];
-};
+}__attribute__((packed, aligned(4)));
struct snd_compr_codec_caps {
__u32 codec;
__u32 num_descriptors;
struct snd_codec_desc descriptor[MAX_NUM_CODEC_DESCRIPTORS];
-};
+}__attribute__((packed, aligned(4)));
enum {
SNDRV_COMPRESS_ENCODER_PADDING = 1,
struct snd_compr_metadata {
__u32 key;
__u32 value[8];
-};
+}__attribute__((packed, aligned(4)));
#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int)
#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps)
__u32 max_bit_rate;
__u32 min_bit_rate;
__u32 downmix;
-};
+}__attribute__((packed, aligned(4)));
struct snd_enc_real {
__u32 quant_bits;
__u32 start_region;
__u32 num_regions;
-};
+}__attribute__((packed, aligned(4)));
struct snd_enc_flac {
__u32 num;
__u32 gain;
-};
+}__attribute__((packed, aligned(4)));
struct snd_enc_generic {
__u32 bw;
__s32 reserved[15];
-};
+}__attribute__((packed, aligned(4)));
union snd_codec_options {
struct snd_enc_wma wma;
struct snd_enc_real real;
struct snd_enc_flac flac;
struct snd_enc_generic generic;
-};
+}__attribute__((packed, aligned(4)));
struct snd_codec_desc {
__u32 max_ch;
__u32 formats;
__u32 min_buffer;
__u32 reserved[15];
-};
+}__attribute__((packed, aligned(4)));
struct snd_codec {
__u32 id;
__u32 align;
union snd_codec_options options;
__u32 reserved[3];
-};
+}__attribute__((packed, aligned(4)));
#endif