diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-25 19:24:38 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-25 20:35:03 +0100 |
| commit | a984eb367c032dbe2577f01238c3d1268526be70 (patch) | |
| tree | 437fef40379b2758b129ccea39df3570fa2d145e /include/arch/x86_64/sound | |
| parent | 8834571b202cf4dc9c649cfb096c213b6ecf1566 (diff) | |
Clang-tidy fixes
Diffstat (limited to 'include/arch/x86_64/sound')
| -rw-r--r-- | include/arch/x86_64/sound/asequencer.h | 208 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/asoc.h | 135 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/asound.h | 595 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/compress_offload.h | 42 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/emu10k1.h | 147 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/fcp.h | 3 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/firewire.h | 48 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/hdsp.h | 3 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/hdspm.h | 11 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/sb16_csp.h | 3 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/scarlett2.h | 8 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/sfnt_info.h | 35 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/skl-tplg-interface.h | 33 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/sof/abi.h | 17 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/sof/fw.h | 6 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/tlv.h | 37 | ||||
| -rw-r--r-- | include/arch/x86_64/sound/usb_stream.h | 3 |
17 files changed, 562 insertions, 772 deletions
diff --git a/include/arch/x86_64/sound/asequencer.h b/include/arch/x86_64/sound/asequencer.h index 61e31e42..a33bf14a 100644 --- a/include/arch/x86_64/sound/asequencer.h +++ b/include/arch/x86_64/sound/asequencer.h @@ -33,21 +33,18 @@ /** control messages (channel specific) * event data type = #snd_seq_ev_ctrl */ -#define SNDRV_SEQ_EVENT_CONTROLLER 10 -#define SNDRV_SEQ_EVENT_PGMCHANGE 11 -#define SNDRV_SEQ_EVENT_CHANPRESS 12 -#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */ -#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */ -#define SNDRV_SEQ_EVENT_NONREGPARAM \ - 15 /**< 14 bit NRPN address + 14 bit unsigned value */ -#define SNDRV_SEQ_EVENT_REGPARAM \ - 16 /**< 14 bit RPN address + 14 bit unsigned value */ +#define SNDRV_SEQ_EVENT_CONTROLLER 10 +#define SNDRV_SEQ_EVENT_PGMCHANGE 11 +#define SNDRV_SEQ_EVENT_CHANPRESS 12 +#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */ +#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */ +#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */ +#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */ /** synchronisation messages * event data type = #snd_seq_ev_ctrl */ -#define SNDRV_SEQ_EVENT_SONGPOS \ - 20 /* Song Position Pointer with LSB and MSB values */ +#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */ #define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */ #define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */ #define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */ @@ -149,8 +146,8 @@ typedef unsigned char snd_seq_event_type_t; struct snd_seq_addr { unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */ - unsigned char port; /**< Port within client: 0..255, 255 = broadcast - to all ports */ + unsigned char port; /**< Port within client: 0..255, 255 = broadcast + to all ports */ }; /** port connection */ @@ -159,12 +156,10 @@ struct snd_seq_connect { struct snd_seq_addr dest; }; -#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */ -#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS \ - 254 /* send event to all subscribed ports */ -#define SNDRV_SEQ_ADDRESS_BROADCAST \ - 255 /* send event to all queues/clients/ports/channels */ -#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */ +#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */ +#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */ +#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */ +#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */ /* event mode flag - NOTE: only 8 bits available! */ #define SNDRV_SEQ_TIME_STAMP_TICK (0 << 0) /* timestamp in clock ticks */ @@ -177,14 +172,12 @@ struct snd_seq_connect { #define SNDRV_SEQ_EVENT_LENGTH_FIXED (0 << 2) /* fixed event size */ #define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1 << 2) /* variable event size */ -#define SNDRV_SEQ_EVENT_LENGTH_VARUSR \ - (2 << 2) /* variable event size - user memory space */ -#define SNDRV_SEQ_EVENT_LENGTH_MASK (3 << 2) +#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2 << 2) /* variable event size - user memory space */ +#define SNDRV_SEQ_EVENT_LENGTH_MASK (3 << 2) #define SNDRV_SEQ_PRIORITY_NORMAL (0 << 4) /* normal priority */ -#define SNDRV_SEQ_PRIORITY_HIGH \ - (1 << 4) /* event should be processed before others */ -#define SNDRV_SEQ_PRIORITY_MASK (1 << 4) +#define SNDRV_SEQ_PRIORITY_HIGH (1 << 4) /* event should be processed before others */ +#define SNDRV_SEQ_PRIORITY_MASK (1 << 4) #define SNDRV_SEQ_EVENT_UMP (1 << 5) /* event holds a UMP packet */ @@ -358,9 +351,9 @@ typedef int __bitwise snd_seq_client_type_t; #define KERNEL_CLIENT ((snd_seq_client_type_t)2) /* event filter flags */ -#define SNDRV_SEQ_FILTER_BROADCAST (1U << 0) /* accept broadcast messages */ -#define SNDRV_SEQ_FILTER_MULTICAST (1U << 1) /* accept multicast messages */ -#define SNDRV_SEQ_FILTER_BOUNCE (1U << 2) /* accept bounce event in error */ +#define SNDRV_SEQ_FILTER_BROADCAST (1U << 0) /* accept broadcast messages */ +#define SNDRV_SEQ_FILTER_MULTICAST (1U << 1) /* accept multicast messages */ +#define SNDRV_SEQ_FILTER_BOUNCE (1U << 2) /* accept bounce event in error */ #define SNDRV_SEQ_FILTER_NO_CONVERT (1U << 30) /* don't convert UMP events */ #define SNDRV_SEQ_FILTER_USE_EVENT (1U << 31) /* use event filter */ @@ -401,18 +394,16 @@ struct snd_seq_client_pool { /* Remove events by specified criteria */ -#define SNDRV_SEQ_REMOVE_INPUT (1 << 0) /* Flush input queues */ -#define SNDRV_SEQ_REMOVE_OUTPUT (1 << 1) /* Flush output queues */ -#define SNDRV_SEQ_REMOVE_DEST \ - (1 << 2) /* Restrict by destination q:client:port */ +#define SNDRV_SEQ_REMOVE_INPUT (1 << 0) /* Flush input queues */ +#define SNDRV_SEQ_REMOVE_OUTPUT (1 << 1) /* Flush output queues */ +#define SNDRV_SEQ_REMOVE_DEST (1 << 2) /* Restrict by destination q:client:port */ #define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1 << 3) /* Restrict by channel */ #define SNDRV_SEQ_REMOVE_TIME_BEFORE (1 << 4) /* Restrict to before time */ #define SNDRV_SEQ_REMOVE_TIME_AFTER (1 << 5) /* Restrict to time or after */ #define SNDRV_SEQ_REMOVE_TIME_TICK (1 << 6) /* Time is in ticks */ #define SNDRV_SEQ_REMOVE_EVENT_TYPE (1 << 7) /* Restrict to event type */ #define SNDRV_SEQ_REMOVE_IGNORE_OFF (1 << 8) /* Do not flush off events */ -#define SNDRV_SEQ_REMOVE_TAG_MATCH \ - (1 << 9) /* Restrict to events with given tag */ +#define SNDRV_SEQ_REMOVE_TAG_MATCH (1 << 9) /* Restrict to events with given tag */ struct snd_seq_remove_events { unsigned int remove_mode; /* Flags that determine what gets removed */ @@ -442,40 +433,32 @@ struct snd_seq_remove_events { #define SNDRV_SEQ_PORT_CAP_DUPLEX (1 << 4) -#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1 << 5) /* allow read subscription */ -#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1 << 6) /* allow write subscription */ -#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1 << 7) /* routing not allowed */ -#define SNDRV_SEQ_PORT_CAP_INACTIVE (1 << 8) /* inactive port */ -#define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT \ - (1 << 9) /* MIDI 2.0 UMP Endpoint port */ +#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1 << 5) /* allow read subscription */ +#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1 << 6) /* allow write subscription */ +#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1 << 7) /* routing not allowed */ +#define SNDRV_SEQ_PORT_CAP_INACTIVE (1 << 8) /* inactive port */ +#define SNDRV_SEQ_PORT_CAP_UMP_ENDPOINT (1 << 9) /* MIDI 2.0 UMP Endpoint port */ /* port type */ #define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1 << 0) /* hardware specific */ #define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1 << 1) /* generic MIDI device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GM \ - (1 << 2) /* General MIDI compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1 << 3) /* GS compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1 << 4) /* XG compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1 << 5) /* MT-32 compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 \ - (1 << 6) /* General MIDI 2 compatible device */ -#define SNDRV_SEQ_PORT_TYPE_MIDI_UMP (1 << 7) /* UMP */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1 << 2) /* General MIDI compatible device */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1 << 3) /* GS compatible device */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1 << 4) /* XG compatible device */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1 << 5) /* MT-32 compatible device */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1 << 6) /* General MIDI 2 compatible device */ +#define SNDRV_SEQ_PORT_TYPE_MIDI_UMP (1 << 7) /* UMP */ /* other standards...*/ -#define SNDRV_SEQ_PORT_TYPE_SYNTH \ - (1 << 10) /* Synth device (no MIDI compatible - direct wavetable) */ -#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE \ - (1 << 11) /* Sampling device (support sample download) */ -#define SNDRV_SEQ_PORT_TYPE_SAMPLE \ - (1 << 12) /* Sampling device (sample can be downloaded at any time) */ +#define SNDRV_SEQ_PORT_TYPE_SYNTH (1 << 10) /* Synth device (no MIDI compatible - direct wavetable) */ +#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1 << 11) /* Sampling device (support sample download) */ +#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1 << 12) /* Sampling device (sample can be downloaded at any time) */ /*...*/ -#define SNDRV_SEQ_PORT_TYPE_HARDWARE \ - (1 << 16) /* driver for a hardware device */ +#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1 << 16) /* driver for a hardware device */ #define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1 << 17) /* implemented in software */ #define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1 << 18) /* generates sound */ #define SNDRV_SEQ_PORT_TYPE_PORT (1 << 19) /* connects to other device(s) */ -#define SNDRV_SEQ_PORT_TYPE_APPLICATION \ - (1 << 20) /* application (sequencer/editor) */ +#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1 << 20) /* application (sequencer/editor) */ /* misc. conditioning flags */ #define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1 << 0) @@ -507,9 +490,9 @@ struct snd_seq_port_info { unsigned int flags; /* misc. conditioning */ unsigned char time_queue; /* queue # for timestamping */ unsigned char direction; /* port usage direction (r/w/bidir) */ - unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group - number */ - char reserved[57]; /* for future use */ + unsigned char ump_group; /* 0 = UMP EP (no conversion), 1-16 = UMP group + number */ + char reserved[57]; /* for future use */ }; /* queue flags */ @@ -543,10 +526,10 @@ struct snd_seq_queue_status { /* queue tempo */ struct snd_seq_queue_tempo { - int queue; /* sequencer queue */ - unsigned int tempo; /* current tempo, us/tick (or different time-base - below) */ - int ppq; /* time resolution, ticks/quarter */ + int queue; /* sequencer queue */ + unsigned int tempo; /* current tempo, us/tick (or different time-base + below) */ + int ppq; /* time resolution, ticks/quarter */ unsigned int skew_value; /* queue skew */ unsigned int skew_base; /* queue skew base */ unsigned short tempo_base; /* tempo base in nsec unit; either 10 or 1000 @@ -588,11 +571,11 @@ struct snd_seq_queue_client { struct snd_seq_port_subscribe { struct snd_seq_addr sender; /* sender address */ struct snd_seq_addr dest; /* destination address */ - unsigned int voices; /* number of voices to be allocated (0 = don't - care) */ - unsigned int flags; /* modes */ - unsigned char queue; /* input time-stamp queue (optional) */ - unsigned char pad[3]; /* reserved */ + unsigned int voices; /* number of voices to be allocated (0 = don't + care) */ + unsigned int flags; /* modes */ + unsigned char queue; /* input time-stamp queue (optional) */ + unsigned char pad[3]; /* reserved */ char reserved[64]; }; @@ -604,7 +587,7 @@ struct snd_seq_query_subs { struct snd_seq_addr root; /* client/port id to be searched */ int type; /* READ or WRITE */ int index; /* 0..N-1 */ - int num_subs; /* R/O: number of subscriptions on this port */ + int num_subs; /* R/O: number of subscriptions on this port */ struct snd_seq_addr addr; /* R/O: result */ unsigned char queue; /* R/O: result */ unsigned int flags; /* R/O: result */ @@ -628,66 +611,43 @@ struct snd_seq_client_ump_info { * IOCTL commands */ -#define SNDRV_SEQ_IOCTL_PVERSION _IOR('S', 0x00, int) -#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR('S', 0x01, int) -#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info) -#define SNDRV_SEQ_IOCTL_RUNNING_MODE \ - _IOWR('S', 0x03, struct snd_seq_running_info) +#define SNDRV_SEQ_IOCTL_PVERSION _IOR('S', 0x00, int) +#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR('S', 0x01, int) +#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info) +#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info) #define SNDRV_SEQ_IOCTL_USER_PVERSION _IOW('S', 0x04, int) -#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO \ - _IOWR('S', 0x10, struct snd_seq_client_info) -#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO \ - _IOW('S', 0x11, struct snd_seq_client_info) -#define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO \ - _IOWR('S', 0x12, struct snd_seq_client_ump_info) -#define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO \ - _IOWR('S', 0x13, struct snd_seq_client_ump_info) +#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info) +#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW('S', 0x11, struct snd_seq_client_info) +#define SNDRV_SEQ_IOCTL_GET_CLIENT_UMP_INFO _IOWR('S', 0x12, struct snd_seq_client_ump_info) +#define SNDRV_SEQ_IOCTL_SET_CLIENT_UMP_INFO _IOWR('S', 0x13, struct snd_seq_client_ump_info) #define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info) #define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW('S', 0x21, struct snd_seq_port_info) #define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info) #define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW('S', 0x23, struct snd_seq_port_info) -#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT \ - _IOW('S', 0x30, struct snd_seq_port_subscribe) -#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT \ - _IOW('S', 0x31, struct snd_seq_port_subscribe) - -#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW('S', 0x33, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO \ - _IOWR('S', 0x34, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO \ - _IOWR('S', 0x35, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE \ - _IOWR('S', 0x36, struct snd_seq_queue_info) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS \ - _IOWR('S', 0x40, struct snd_seq_queue_status) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO \ - _IOWR('S', 0x41, struct snd_seq_queue_tempo) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO \ - _IOW('S', 0x42, struct snd_seq_queue_tempo) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER \ - _IOWR('S', 0x45, struct snd_seq_queue_timer) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER \ - _IOW('S', 0x46, struct snd_seq_queue_timer) -#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT \ - _IOWR('S', 0x49, struct snd_seq_queue_client) -#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT \ - _IOW('S', 0x4a, struct snd_seq_queue_client) -#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL \ - _IOWR('S', 0x4b, struct snd_seq_client_pool) -#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL \ - _IOW('S', 0x4c, struct snd_seq_client_pool) -#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS \ - _IOW('S', 0x4e, struct snd_seq_remove_events) -#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs) -#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION \ - _IOWR('S', 0x50, struct snd_seq_port_subscribe) -#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT \ - _IOWR('S', 0x51, struct snd_seq_client_info) -#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT \ - _IOWR('S', 0x52, struct snd_seq_port_info) +#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW('S', 0x30, struct snd_seq_port_subscribe) +#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW('S', 0x31, struct snd_seq_port_subscribe) + +#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info) +#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW('S', 0x33, struct snd_seq_queue_info) +#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info) +#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info) +#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info) +#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status) +#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo) +#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW('S', 0x42, struct snd_seq_queue_tempo) +#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer) +#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW('S', 0x46, struct snd_seq_queue_timer) +#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client) +#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW('S', 0x4a, struct snd_seq_queue_client) +#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool) +#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW('S', 0x4c, struct snd_seq_client_pool) +#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW('S', 0x4e, struct snd_seq_remove_events) +#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs) +#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe) +#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info) +#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info) #endif /* __SOUND_ASEQUENCER_H */ diff --git a/include/arch/x86_64/sound/asoc.h b/include/arch/x86_64/sound/asoc.h index 5a48620a..dc5da281 100644 --- a/include/arch/x86_64/sound/asoc.h +++ b/include/arch/x86_64/sound/asoc.h @@ -217,16 +217,13 @@ struct snd_soc_tplg_vendor_string_elem { } __attribute__((packed)); struct snd_soc_tplg_vendor_array { - __le32 size; /* size in bytes of the array, including all elements */ - __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ + __le32 size; /* size in bytes of the array, including all elements */ + __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ __le32 num_elems; /* number of elements in array */ union { - __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, - uuid); - __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, - value); - __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, - string); + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_uuid_elem, uuid); + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_value_elem, value); + __DECLARE_FLEX_ARRAY(struct snd_soc_tplg_vendor_string_elem, string); }; } __attribute__((packed)); @@ -319,7 +316,7 @@ struct snd_soc_tplg_stream_caps { * FE or BE Stream configuration supported by SW/FW */ struct snd_soc_tplg_stream { - __le32 size; /* in bytes of this structure */ + __le32 size; /* in bytes of this structure */ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ __le64 format; /* SNDRV_PCM_FMTBIT_* */ __le32 rate; /* SNDRV_PCM_RATE_* */ @@ -333,24 +330,24 @@ struct snd_soc_tplg_stream { * i.e. hardware audio formats. */ struct snd_soc_tplg_hw_config { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - - used to match */ - __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ - __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ - __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ - __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ - __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */ - __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */ - __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ - __le16 reserved; /* for 32bit alignment */ - __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ - __le32 bclk_rate; /* BCLK freqency in Hz */ - __le32 fsync_rate; /* frame clock in Hz */ - __le32 tdm_slots; /* number of TDM slots in use */ - __le32 tdm_slot_width; /* width in bits for each slot */ - __le32 tx_slots; /* bit mask for active Tx slots */ - __le32 rx_slots; /* bit mask for active Rx slots */ - __le32 tx_channels; /* number of Tx channels */ + __le32 size; /* in bytes of this structure */ + __le32 id; /* unique ID - - used to match */ + __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ + __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ + __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ + __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ + __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */ + __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */ + __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ + __le16 reserved; /* for 32bit alignment */ + __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ + __le32 bclk_rate; /* BCLK freqency in Hz */ + __le32 fsync_rate; /* frame clock in Hz */ + __le32 tdm_slots; /* number of TDM slots in use */ + __le32 tdm_slot_width; /* width in bits for each slot */ + __le32 tx_slots; /* bit mask for active Tx slots */ + __le32 rx_slots; /* bit mask for active Rx slots */ + __le32 tx_channels; /* number of Tx channels */ __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ __le32 rx_channels; /* number of Rx channels */ __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ @@ -421,8 +418,7 @@ struct snd_soc_tplg_enum_control { __le32 mask; __le32 count; char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / - 4]; + __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; struct snd_soc_tplg_private priv; } __attribute__((packed)); @@ -515,21 +511,20 @@ struct snd_soc_tplg_pcm { __le32 size; /* in bytes of this structure */ char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; - __le32 pcm_id; /* unique ID - used to match with DAI link */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - __le32 compress; /* 1 = compressed; 0 = PCM */ - struct snd_soc_tplg_stream - stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for - DAI - link - */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI - */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ + __le32 pcm_id; /* unique ID - used to match with DAI link */ + __le32 dai_id; /* unique ID - used to match */ + __le32 playback; /* supports playback mode */ + __le32 capture; /* supports capture mode */ + __le32 compress; /* 1 = compressed; 0 = PCM */ + struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for + DAI + link + */ + __le32 num_streams; /* number of streams */ + struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI + */ + __le32 flag_mask; /* bitmask of flags to configure */ + __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ struct snd_soc_tplg_private priv; } __attribute__((packed)); @@ -544,25 +539,23 @@ struct snd_soc_tplg_pcm { * +-----------------------------------+-----+ */ struct snd_soc_tplg_link_config { - __le32 size; /* in bytes of this structure */ - __le32 id; /* unique ID - used to match */ - char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ - char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used - to match */ - struct snd_soc_tplg_stream - stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported - configs - playback - and - captrure - */ - __le32 num_streams; /* number of streams */ - struct snd_soc_tplg_hw_config - hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ - __le32 num_hw_configs; /* number of hw configs */ - __le32 default_hw_config_id; /* default hw config ID for init */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ + __le32 size; /* in bytes of this structure */ + __le32 id; /* unique ID - used to match */ + char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ + char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used + to match */ + struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported + configs + playback + and + captrure + */ + __le32 num_streams; /* number of streams */ + struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ + __le32 num_hw_configs; /* number of hw configs */ + __le32 default_hw_config_id; /* default hw config ID for init */ + __le32 flag_mask; /* bitmask of flags to configure */ + __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ struct snd_soc_tplg_private priv; } __attribute__((packed)); @@ -578,15 +571,15 @@ struct snd_soc_tplg_link_config { * +-----------------------------------+-----+ */ struct snd_soc_tplg_dai { - __le32 size; /* in bytes of this structure */ + __le32 size; /* in bytes of this structure */ char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ - __le32 dai_id; /* unique ID - used to match */ - __le32 playback; /* supports playback mode */ - __le32 capture; /* supports capture mode */ - struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI - */ - __le32 flag_mask; /* bitmask of flags to configure */ - __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ + __le32 dai_id; /* unique ID - used to match */ + __le32 playback; /* supports playback mode */ + __le32 capture; /* supports capture mode */ + struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI + */ + __le32 flag_mask; /* bitmask of flags to configure */ + __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ struct snd_soc_tplg_private priv; } __attribute__((packed)); diff --git a/include/arch/x86_64/sound/asound.h b/include/arch/x86_64/sound/asound.h index 46a4e3fa..c9c77145 100644 --- a/include/arch/x86_64/sound/asound.h +++ b/include/arch/x86_64/sound/asound.h @@ -23,11 +23,10 @@ * protocol version */ -#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) \ - (((major) << 16) | ((minor) << 8) | (subminor)) -#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff) -#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff) -#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff) +#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major) << 16) | ((minor) << 8) | (subminor)) +#define SNDRV_PROTOCOL_MAJOR(version) (((version) >> 16) & 0xffff) +#define SNDRV_PROTOCOL_MINOR(version) (((version) >> 8) & 0xff) +#define SNDRV_PROTOCOL_MICRO(version) ((version) & 0xff) #define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \ (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \ (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \ @@ -44,9 +43,9 @@ struct snd_aes_iec958 { unsigned char status[AES_IEC958_STATUS_SIZE]; /* AES/IEC958 channel status bits */ - unsigned char subcode[147]; /* AES/IEC958 subcode bits */ - unsigned char pad; /* nothing */ - unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ + unsigned char subcode[147]; /* AES/IEC958 subcode bits */ + unsigned char pad; /* nothing */ + unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ }; /**************************************************************************** @@ -75,31 +74,31 @@ enum { SNDRV_HWDEP_IFACE_OPL2 = 0, SNDRV_HWDEP_IFACE_OPL3, SNDRV_HWDEP_IFACE_OPL4, - SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ - SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ - SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ - SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ - SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ - SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ - SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ - SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ + SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ + SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ + SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ + SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ + SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ + SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ + SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ + SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */ - SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm - */ - SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ - SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */ - SNDRV_HWDEP_IFACE_HDA, /* HD-audio */ - SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */ - SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ - SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ - SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ - SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ - SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ - SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ - SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ - SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ - SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ + SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm + */ + SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ + SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */ + SNDRV_HWDEP_IFACE_HDA, /* HD-audio */ + SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */ + SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ + SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ + SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ + SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ + SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ + SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ + SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ + SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ + SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ /* Don't forget to change the following: */ SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE @@ -116,11 +115,11 @@ struct snd_hwdep_info { /* generic DSP loader */ struct snd_hwdep_dsp_status { - unsigned int version; /* R: driver-specific version */ - unsigned char id[32]; /* R: driver-specific ID string */ - unsigned int num_dsps; /* R: number of DSP images to transfer */ - unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ - unsigned int chip_ready; /* R: 1 = initialization finished */ + unsigned int version; /* R: driver-specific version */ + unsigned char id[32]; /* R: driver-specific ID string */ + unsigned int num_dsps; /* R: number of DSP images to transfer */ + unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ + unsigned int chip_ready; /* R: 1 = initialization finished */ unsigned char reserved[16]; /* reserved for future use */ }; @@ -132,11 +131,10 @@ struct snd_hwdep_dsp_image { unsigned long driver_data; /* W: driver-specific data */ }; -#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int) -#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info) -#define SNDRV_HWDEP_IOCTL_DSP_STATUS \ - _IOR('H', 0x02, struct snd_hwdep_dsp_status) -#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) +#define SNDRV_HWDEP_IOCTL_PVERSION _IOR('H', 0x00, int) +#define SNDRV_HWDEP_IOCTL_INFO _IOR('H', 0x01, struct snd_hwdep_info) +#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) +#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) /***************************************************************************** * * @@ -174,17 +172,14 @@ enum { }; typedef int __bitwise snd_pcm_access_t; -#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED \ - ((snd_pcm_access_t)0) /* interleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED \ - ((snd_pcm_access_t)1) /* noninterleaved mmap */ -#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t)2) /* complex mmap */ -#define SNDRV_PCM_ACCESS_RW_INTERLEAVED \ - ((snd_pcm_access_t)3) /* readi/writei \ - */ -#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED \ - ((snd_pcm_access_t)4) /* readn/writen */ -#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED +#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((snd_pcm_access_t)0) /* interleaved mmap */ +#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((snd_pcm_access_t)1) /* noninterleaved mmap */ +#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((snd_pcm_access_t)2) /* complex mmap */ +#define SNDRV_PCM_ACCESS_RW_INTERLEAVED \ + ((snd_pcm_access_t)3) /* readi/writei \ + */ +#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((snd_pcm_access_t)4) /* readn/writen */ +#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED typedef int __bitwise snd_pcm_format_t; #define SNDRV_PCM_FORMAT_S8 ((snd_pcm_format_t)0) @@ -216,62 +211,49 @@ typedef int __bitwise snd_pcm_format_t; #define SNDRV_PCM_FORMAT_FLOAT64_LE \ ((snd_pcm_format_t)16) /* 8-byte float, IEEE-754 64-bit, range -1.0 \ to 1.0 */ -#define SNDRV_PCM_FORMAT_FLOAT64_BE \ - ((snd_pcm_format_t)17) /* 8-byte float, IEEE-754 64-bit, range -1.0 \ - to 1.0 */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE \ - ((snd_pcm_format_t)18) /* IEC-958 subframe, Little Endian */ -#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE \ - ((snd_pcm_format_t)19) /* IEC-958 subframe, Big Endian */ -#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t)20) -#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t)21) -#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t)22) -#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t)23) -#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t)24) -#define SNDRV_PCM_FORMAT_S20_LE \ - ((snd_pcm_format_t)25) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_S20_BE \ - ((snd_pcm_format_t)26) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_U20_LE \ - ((snd_pcm_format_t)27) /* in four bytes, LSB justified */ -#define SNDRV_PCM_FORMAT_U20_BE \ - ((snd_pcm_format_t)28) /* in four bytes, LSB justified */ +#define SNDRV_PCM_FORMAT_FLOAT64_BE \ + ((snd_pcm_format_t)17) /* 8-byte float, IEEE-754 64-bit, range -1.0 \ + to 1.0 */ +#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((snd_pcm_format_t)18) /* IEC-958 subframe, Little Endian */ +#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((snd_pcm_format_t)19) /* IEC-958 subframe, Big Endian */ +#define SNDRV_PCM_FORMAT_MU_LAW ((snd_pcm_format_t)20) +#define SNDRV_PCM_FORMAT_A_LAW ((snd_pcm_format_t)21) +#define SNDRV_PCM_FORMAT_IMA_ADPCM ((snd_pcm_format_t)22) +#define SNDRV_PCM_FORMAT_MPEG ((snd_pcm_format_t)23) +#define SNDRV_PCM_FORMAT_GSM ((snd_pcm_format_t)24) +#define SNDRV_PCM_FORMAT_S20_LE ((snd_pcm_format_t)25) /* in four bytes, LSB justified */ +#define SNDRV_PCM_FORMAT_S20_BE ((snd_pcm_format_t)26) /* in four bytes, LSB justified */ +#define SNDRV_PCM_FORMAT_U20_LE ((snd_pcm_format_t)27) /* in four bytes, LSB justified */ +#define SNDRV_PCM_FORMAT_U20_BE ((snd_pcm_format_t)28) /* in four bytes, LSB justified */ /* gap in the numbering for a future standard linear format */ -#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t)31) -#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t)32) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t)33) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t)34) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t)35) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t)36) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t)37) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t)38) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t)39) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t)40) /* in three bytes */ -#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t)41) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t)42) /* in three bytes */ -#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t)43) /* in three bytes */ -#define SNDRV_PCM_FORMAT_G723_24 \ - ((snd_pcm_format_t)44) /* 8 samples in 3 bytes */ -#define SNDRV_PCM_FORMAT_G723_24_1B \ - ((snd_pcm_format_t)45) /* 1 sample in 1 byte */ -#define SNDRV_PCM_FORMAT_G723_40 \ - ((snd_pcm_format_t)46) /* 8 Samples in 5 bytes */ -#define SNDRV_PCM_FORMAT_G723_40_1B \ - ((snd_pcm_format_t)47) /* 1 sample in 1 byte */ -#define SNDRV_PCM_FORMAT_DSD_U8 \ - ((snd_pcm_format_t)48) /* DSD, 1-byte samples DSD (x8) */ +#define SNDRV_PCM_FORMAT_SPECIAL ((snd_pcm_format_t)31) +#define SNDRV_PCM_FORMAT_S24_3LE ((snd_pcm_format_t)32) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S24_3BE ((snd_pcm_format_t)33) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U24_3LE ((snd_pcm_format_t)34) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U24_3BE ((snd_pcm_format_t)35) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S20_3LE ((snd_pcm_format_t)36) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S20_3BE ((snd_pcm_format_t)37) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U20_3LE ((snd_pcm_format_t)38) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U20_3BE ((snd_pcm_format_t)39) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S18_3LE ((snd_pcm_format_t)40) /* in three bytes */ +#define SNDRV_PCM_FORMAT_S18_3BE ((snd_pcm_format_t)41) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U18_3LE ((snd_pcm_format_t)42) /* in three bytes */ +#define SNDRV_PCM_FORMAT_U18_3BE ((snd_pcm_format_t)43) /* in three bytes */ +#define SNDRV_PCM_FORMAT_G723_24 ((snd_pcm_format_t)44) /* 8 samples in 3 bytes */ +#define SNDRV_PCM_FORMAT_G723_24_1B ((snd_pcm_format_t)45) /* 1 sample in 1 byte */ +#define SNDRV_PCM_FORMAT_G723_40 ((snd_pcm_format_t)46) /* 8 Samples in 5 bytes */ +#define SNDRV_PCM_FORMAT_G723_40_1B ((snd_pcm_format_t)47) /* 1 sample in 1 byte */ +#define SNDRV_PCM_FORMAT_DSD_U8 ((snd_pcm_format_t)48) /* DSD, 1-byte samples DSD (x8) */ #define SNDRV_PCM_FORMAT_DSD_U16_LE \ ((snd_pcm_format_t)49) /* DSD, 2-byte samples DSD (x16), little endian \ */ -#define SNDRV_PCM_FORMAT_DSD_U32_LE \ - ((snd_pcm_format_t)50) /* DSD, 4-byte samples DSD (x32), little endian \ - */ -#define SNDRV_PCM_FORMAT_DSD_U16_BE \ - ((snd_pcm_format_t)51) /* DSD, 2-byte samples DSD (x16), big endian */ -#define SNDRV_PCM_FORMAT_DSD_U32_BE \ - ((snd_pcm_format_t)52) /* DSD, 4-byte samples DSD (x32), big endian */ -#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE -#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 +#define SNDRV_PCM_FORMAT_DSD_U32_LE \ + ((snd_pcm_format_t)50) /* DSD, 4-byte samples DSD (x32), little endian \ + */ +#define SNDRV_PCM_FORMAT_DSD_U16_BE ((snd_pcm_format_t)51) /* DSD, 2-byte samples DSD (x16), big endian */ +#define SNDRV_PCM_FORMAT_DSD_U32_BE ((snd_pcm_format_t)52) /* DSD, 4-byte samples DSD (x32), big endian */ +#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE +#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 #ifdef SNDRV_LITTLE_ENDIAN #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE @@ -307,75 +289,54 @@ typedef int __bitwise snd_pcm_subformat_t; #define SNDRV_PCM_SUBFORMAT_MSBITS_24 ((snd_pcm_subformat_t)3) #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24 -#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ -#define SNDRV_PCM_INFO_MMAP_VALID \ - 0x00000002 /* period data are valid during transfer */ -#define SNDRV_PCM_INFO_DOUBLE \ - 0x00000004 /* Double buffering needed for PCM start/stop */ -#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ -#define SNDRV_PCM_INFO_SYNC_APPLPTR \ - 0x00000020 /* need the explicit sync of appl_ptr update */ -#define SNDRV_PCM_INFO_PERFECT_DRAIN \ - 0x00000040 /* silencing at the end of stream is not required */ -#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ -#define SNDRV_PCM_INFO_NONINTERLEAVED \ - 0x00000200 /* channels are not interleaved */ -#define SNDRV_PCM_INFO_COMPLEX \ - 0x00000400 /* complex frame organization (mmap only) */ -#define SNDRV_PCM_INFO_BLOCK_TRANSFER \ - 0x00010000 /* hardware transfer block of samples */ -#define SNDRV_PCM_INFO_OVERRANGE \ - 0x00020000 /* hardware supports ADC (capture) overrange detection */ -#define SNDRV_PCM_INFO_RESUME \ - 0x00040000 /* hardware supports stream resume after suspend */ -#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ -#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ -#define SNDRV_PCM_INFO_JOINT_DUPLEX \ - 0x00200000 /* playback and capture stream are somewhat correlated */ -#define SNDRV_PCM_INFO_SYNC_START \ - 0x00400000 /* pcm support some kind of sync go */ -#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP \ - 0x00800000 /* period wakeup can be disabled */ -#define SNDRV_PCM_INFO_HAS_WALL_CLOCK \ - 0x01000000 /* (Deprecated)has audio wall clock for audio/system time \ - sync */ -#define SNDRV_PCM_INFO_HAS_LINK_ATIME \ - 0x01000000 /* report hardware link audio time, reset on startup */ +#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ +#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ +#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ +#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ +#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */ +#define SNDRV_PCM_INFO_PERFECT_DRAIN 0x00000040 /* silencing at the end of stream is not required */ +#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ +#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ +#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ +#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */ +#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */ +#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */ +#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ +#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ +#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ +#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ +#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */ +#define SNDRV_PCM_INFO_HAS_WALL_CLOCK \ + 0x01000000 /* (Deprecated)has audio wall clock for audio/system time \ + sync */ +#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */ #define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME \ 0x02000000 /* report absolute hardware link audio time, not reset on \ startup */ -#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME \ - 0x04000000 /* report estimated link audio time */ -#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME \ - 0x08000000 /* report synchronized audio/system time */ -#define SNDRV_PCM_INFO_EXPLICIT_SYNC \ - 0x10000000 /* needs explicit sync of pointers and data */ -#define SNDRV_PCM_INFO_NO_REWINDS \ - 0x20000000 /* hardware can only support monotonic changes of appl_ptr \ - */ -#define SNDRV_PCM_INFO_DRAIN_TRIGGER \ - 0x40000000 /* internal kernel flag - trigger in drain */ -#define SNDRV_PCM_INFO_FIFO_IN_FRAMES \ - 0x80000000 /* internal kernel flag - FIFO size is in frames */ +#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */ +#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */ +#define SNDRV_PCM_INFO_EXPLICIT_SYNC 0x10000000 /* needs explicit sync of pointers and data */ +#define SNDRV_PCM_INFO_NO_REWINDS \ + 0x20000000 /* hardware can only support monotonic changes of appl_ptr \ + */ +#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ +#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ #if (__BITS_PER_LONG == 32 && defined(__USE_TIME_BITS64)) || defined __KERNEL__ #define __SND_STRUCT_TIME64 #endif typedef int __bitwise snd_pcm_state_t; -#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t)0) /* stream is open */ -#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t)1) /* stream has a setup */ -#define SNDRV_PCM_STATE_PREPARED \ - ((snd_pcm_state_t)2) /* stream is ready to start */ -#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t)3) /* stream is running */ -#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t)4) /* stream reached an xrun */ -#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t)5) /* stream is draining */ -#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t)6) /* stream is paused */ -#define SNDRV_PCM_STATE_SUSPENDED \ - ((snd_pcm_state_t)7) /* hardware is suspended */ -#define SNDRV_PCM_STATE_DISCONNECTED \ - ((snd_pcm_state_t)8) /* hardware is disconnected */ -#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED +#define SNDRV_PCM_STATE_OPEN ((snd_pcm_state_t)0) /* stream is open */ +#define SNDRV_PCM_STATE_SETUP ((snd_pcm_state_t)1) /* stream has a setup */ +#define SNDRV_PCM_STATE_PREPARED ((snd_pcm_state_t)2) /* stream is ready to start */ +#define SNDRV_PCM_STATE_RUNNING ((snd_pcm_state_t)3) /* stream is running */ +#define SNDRV_PCM_STATE_XRUN ((snd_pcm_state_t)4) /* stream reached an xrun */ +#define SNDRV_PCM_STATE_DRAINING ((snd_pcm_state_t)5) /* stream is draining */ +#define SNDRV_PCM_STATE_PAUSED ((snd_pcm_state_t)6) /* stream is paused */ +#define SNDRV_PCM_STATE_SUSPENDED ((snd_pcm_state_t)7) /* hardware is suspended */ +#define SNDRV_PCM_STATE_DISCONNECTED ((snd_pcm_state_t)8) /* hardware is disconnected */ +#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED enum { SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, @@ -451,10 +412,9 @@ typedef int snd_pcm_hw_param_t; #define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS #define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME -#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0) /* avoid rate resampling */ -#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1) /* export buffer */ -#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP \ - (1 << 2) /* disable period wakeups */ +#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1 << 0) /* avoid rate resampling */ +#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1 << 1) /* export buffer */ +#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1 << 2) /* disable period wakeups */ #define SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE \ (1 << 3) /* suppress drain with the filling \ * of the silence samples \ @@ -473,11 +433,9 @@ struct snd_mask { struct snd_pcm_hw_params { unsigned int flags; - struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; + struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; struct snd_mask mres[5]; /* reserved masks */ - struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; + struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; struct snd_interval ires[9]; /* reserved intervals */ unsigned int rmask; /* W: requested masks */ unsigned int cmask; /* R: changed masks */ @@ -487,9 +445,9 @@ struct snd_pcm_hw_params { unsigned int rate_num; /* R: rate numerator */ unsigned int rate_den; /* R: rate denominator */ snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */ - unsigned char sync[16]; /* R: synchronization ID (perfect sync - one - clock source) */ - unsigned char reserved[48]; /* reserved for future */ + unsigned char sync[16]; /* R: synchronization ID (perfect sync - one + clock source) */ + unsigned char reserved[48]; /* reserved for future */ }; enum { @@ -515,13 +473,13 @@ struct snd_pcm_sw_params { snd_pcm_uframes_t stop_threshold; /* - stop playback */ snd_pcm_uframes_t silence_threshold; /* - pre-fill buffer with silence */ - snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= - * boundary, fill played area with - * silence immediately */ - snd_pcm_uframes_t boundary; /* pointers wrap point */ - unsigned int proto; /* protocol version */ - unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ - unsigned char reserved[56]; /* reserved for future */ + snd_pcm_uframes_t silence_size; /* max size of silence pre-fill; when >= + * boundary, fill played area with + * silence immediately */ + snd_pcm_uframes_t boundary; /* pointers wrap point */ + unsigned int proto; /* protocol version */ + unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ + unsigned char reserved[56]; /* reserved for future */ }; struct snd_pcm_channel_info { @@ -540,22 +498,21 @@ enum { SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0, /* timestamp definitions */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per - hw_ptr */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or - wallclock counter, reset on - startup */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by - sample or wallclock - counter, not reset on - startup */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated - indirectly */ + SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per + hw_ptr */ + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or + wallclock counter, reset on + startup */ + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by + sample or wallclock + counter, not reset on + startup */ + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated + indirectly */ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */ - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = - SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED + SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED }; /* explicit padding avoids incompatibility between i386 and x86-64 */ @@ -564,28 +521,28 @@ typedef struct { } __time_pad; struct snd_pcm_status { - snd_pcm_state_t state; /* stream state */ - __time_pad pad1; /* align to timespec */ - struct timespec trigger_tstamp; /* time when stream was - started/stopped/paused */ - struct timespec tstamp; /* reference timestamp */ - snd_pcm_uframes_t appl_ptr; /* appl ptr */ - snd_pcm_uframes_t hw_ptr; /* hw ptr */ - snd_pcm_sframes_t delay; /* current delay in frames */ - snd_pcm_uframes_t avail; /* number of frames available */ - snd_pcm_uframes_t avail_max; /* max frames available on hw since last - status */ - snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange - detections from last status */ - snd_pcm_state_t suspended_state; /* suspended stream state */ - __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for - configs/report to/from userspace */ - struct timespec audio_tstamp; /* sample counter, wall clock, PHC or - on-demand sync'ed */ - struct timespec driver_tstamp; /* useful in case reference system tstamp - is reported with delay */ - __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in - audio_tstamp_data */ + snd_pcm_state_t state; /* stream state */ + __time_pad pad1; /* align to timespec */ + struct timespec trigger_tstamp; /* time when stream was + started/stopped/paused */ + struct timespec tstamp; /* reference timestamp */ + snd_pcm_uframes_t appl_ptr; /* appl ptr */ + snd_pcm_uframes_t hw_ptr; /* hw ptr */ + snd_pcm_sframes_t delay; /* current delay in frames */ + snd_pcm_uframes_t avail; /* number of frames available */ + snd_pcm_uframes_t avail_max; /* max frames available on hw since last + status */ + snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange + detections from last status */ + snd_pcm_state_t suspended_state; /* suspended stream state */ + __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for + configs/report to/from userspace */ + struct timespec audio_tstamp; /* sample counter, wall clock, PHC or + on-demand sync'ed */ + struct timespec driver_tstamp; /* useful in case reference system tstamp + is reported with delay */ + __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in + audio_tstamp_data */ unsigned char reserved[52 - 2 * sizeof(struct timespec)]; /* must be filled with zero */ @@ -618,11 +575,11 @@ struct __snd_timespec64 { #endif struct __snd_pcm_mmap_status { - snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ - int pad1; /* Needed for 64 bit alignment */ - snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ - struct __snd_timespec tstamp; /* Timestamp */ - snd_pcm_state_t suspended_state; /* RO: suspended stream state */ + snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ + int pad1; /* Needed for 64 bit alignment */ + snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ + struct __snd_timespec tstamp; /* Timestamp */ + snd_pcm_state_t suspended_state; /* RO: suspended stream state */ struct __snd_timespec audio_tstamp; /* from sample counter or wall clock */ }; @@ -633,9 +590,9 @@ struct __snd_pcm_mmap_control { }; #define SNDRV_PCM_SYNC_PTR_HWSYNC (1 << 0) /* execute hwsync */ -#define SNDRV_PCM_SYNC_PTR_APPL \ - (1 << 1) /* get appl_ptr from driver (r/w op) \ - */ +#define SNDRV_PCM_SYNC_PTR_APPL \ + (1 << 1) /* get appl_ptr from driver (r/w op) \ + */ #define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1 << 2) /* get avail_min from driver */ struct __snd_pcm_sync_ptr { @@ -655,8 +612,7 @@ typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; typedef char __pad_after_uframe[0]; #endif -#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ - defined(__LITTLE_ENDIAN) +#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) typedef char __pad_before_uframe[0]; typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)]; #endif @@ -712,8 +668,8 @@ struct snd_xfern { enum { SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ - SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ - SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ + SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ + SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, }; @@ -779,12 +735,10 @@ enum { #define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) #define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) #define __SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct __snd_pcm_sync_ptr) -#define __SNDRV_PCM_IOCTL_SYNC_PTR64 \ - _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64) -#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) -#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) -#define SNDRV_PCM_IOCTL_CHANNEL_INFO \ - _IOR('A', 0x32, struct snd_pcm_channel_info) +#define __SNDRV_PCM_IOCTL_SYNC_PTR64 _IOWR('A', 0x23, struct __snd_pcm_sync_ptr64) +#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) +#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) +#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) #define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) #define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) #define SNDRV_PCM_IOCTL_START _IO('A', 0x42) @@ -874,16 +828,16 @@ struct snd_rawmidi_params { size_t avail_min; /* minimum avail bytes for wakeup */ unsigned int no_active_sensing : 1; /* do not send active sensing byte in close() */ - unsigned int mode; /* For input data only, frame incoming data */ - unsigned char reserved[12]; /* reserved for future use */ + unsigned int mode; /* For input data only, frame incoming data */ + unsigned char reserved[12]; /* reserved for future use */ }; struct snd_rawmidi_status { int stream; __time_pad pad1; - struct timespec tstamp; /* Timestamp */ - size_t avail; /* available bytes */ - size_t xruns; /* count of overruns since last status (in bytes) */ + struct timespec tstamp; /* Timestamp */ + size_t avail; /* available bytes */ + size_t xruns; /* count of overruns since last status (in bytes) */ unsigned char reserved[16]; /* reserved for future use */ }; @@ -961,9 +915,8 @@ struct snd_ump_block_info { #define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) #define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) /* Additional ioctls for UMP rawmidi devices */ -#define SNDRV_UMP_IOCTL_ENDPOINT_INFO \ - _IOR('W', 0x40, struct snd_ump_endpoint_info) -#define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info) +#define SNDRV_UMP_IOCTL_ENDPOINT_INFO _IOR('W', 0x40, struct snd_ump_endpoint_info) +#define SNDRV_UMP_IOCTL_BLOCK_INFO _IOR('W', 0x41, struct snd_ump_block_info) /* * Timer section - /dev/snd/timer @@ -1055,18 +1008,16 @@ struct snd_timer_info { unsigned char reserved[64]; /* reserved */ }; -#define SNDRV_TIMER_PSFLG_AUTO (1 << 0) /* auto start, otherwise one-shot */ -#define SNDRV_TIMER_PSFLG_EXCLUSIVE \ - (1 << 1) /* exclusive use, precise start/stop/pause/continue */ -#define SNDRV_TIMER_PSFLG_EARLY_EVENT \ - (1 << 2) /* write early event to the poll queue */ +#define SNDRV_TIMER_PSFLG_AUTO (1 << 0) /* auto start, otherwise one-shot */ +#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1 << 1) /* exclusive use, precise start/stop/pause/continue */ +#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1 << 2) /* write early event to the poll queue */ struct snd_timer_params { - unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */ - unsigned int ticks; /* requested resolution in ticks */ - unsigned int queue_size; /* total size of queue (32-1024) */ - unsigned int reserved0; /* reserved, was: failure locations */ - unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ + unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */ + unsigned int ticks; /* requested resolution in ticks */ + unsigned int queue_size; /* total size of queue (32-1024) */ + unsigned int reserved0; /* reserved, was: failure locations */ + unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ unsigned char reserved[60]; /* reserved */ }; @@ -1115,10 +1066,8 @@ struct snd_timer_uinfo { #if __BITS_PER_LONG == 64 #define SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_TREAD_OLD #else -#define SNDRV_TIMER_IOCTL_TREAD \ - ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? \ - SNDRV_TIMER_IOCTL_TREAD_OLD : \ - SNDRV_TIMER_IOCTL_TREAD64) +#define SNDRV_TIMER_IOCTL_TREAD \ + ((sizeof(__kernel_long_t) >= sizeof(time_t)) ? SNDRV_TIMER_IOCTL_TREAD_OLD : SNDRV_TIMER_IOCTL_TREAD64) #endif struct snd_timer_read { @@ -1162,14 +1111,14 @@ struct snd_timer_tread { #define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9) struct snd_ctl_card_info { - int card; /* card number */ - int pad; /* reserved for future (was type) */ - unsigned char id[16]; /* ID of card (user selectable) */ - unsigned char driver[16]; /* Driver name */ - unsigned char name[32]; /* Short name of soundcard */ - unsigned char longname[80]; /* name + info text about soundcard */ - unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ - unsigned char mixername[80]; /* visual mixer identification */ + int card; /* card number */ + int pad; /* reserved for future (was type) */ + unsigned char id[16]; /* ID of card (user selectable) */ + unsigned char driver[16]; /* Driver name */ + unsigned char name[32]; /* Short name of soundcard */ + unsigned char longname[80]; /* name + info text about soundcard */ + unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ + unsigned char mixername[80]; /* visual mixer identification */ unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ @@ -1180,76 +1129,62 @@ typedef int __bitwise snd_ctl_elem_type_t; #define SNDRV_CTL_ELEM_TYPE_BOOLEAN \ ((snd_ctl_elem_type_t)1) /* boolean type \ */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER \ - ((snd_ctl_elem_type_t)2) /* integer type \ - */ -#define SNDRV_CTL_ELEM_TYPE_ENUMERATED \ - ((snd_ctl_elem_type_t)3) /* enumerated type */ -#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t)4) /* byte array */ -#define SNDRV_CTL_ELEM_TYPE_IEC958 \ - ((snd_ctl_elem_type_t)5) /* IEC958 (S/PDIF) setup */ -#define SNDRV_CTL_ELEM_TYPE_INTEGER64 \ - ((snd_ctl_elem_type_t)6) /* 64-bit integer type */ -#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 +#define SNDRV_CTL_ELEM_TYPE_INTEGER \ + ((snd_ctl_elem_type_t)2) /* integer type \ + */ +#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((snd_ctl_elem_type_t)3) /* enumerated type */ +#define SNDRV_CTL_ELEM_TYPE_BYTES ((snd_ctl_elem_type_t)4) /* byte array */ +#define SNDRV_CTL_ELEM_TYPE_IEC958 ((snd_ctl_elem_type_t)5) /* IEC958 (S/PDIF) setup */ +#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((snd_ctl_elem_type_t)6) /* 64-bit integer type */ +#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 typedef int __bitwise snd_ctl_elem_iface_t; -#define SNDRV_CTL_ELEM_IFACE_CARD \ - ((snd_ctl_elem_iface_t)0) /* global control \ - */ -#define SNDRV_CTL_ELEM_IFACE_HWDEP \ - ((snd_ctl_elem_iface_t)1) /* hardware dependent device */ -#define SNDRV_CTL_ELEM_IFACE_MIXER \ - ((snd_ctl_elem_iface_t)2) /* virtual mixer device */ -#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t)3) /* PCM device */ -#define SNDRV_CTL_ELEM_IFACE_RAWMIDI \ - ((snd_ctl_elem_iface_t)4) /* RawMidi device */ -#define SNDRV_CTL_ELEM_IFACE_TIMER \ - ((snd_ctl_elem_iface_t)5) /* timer device \ - */ -#define SNDRV_CTL_ELEM_IFACE_SEQUENCER \ - ((snd_ctl_elem_iface_t)6) /* sequencer client */ -#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER - -#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0) -#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1) -#define SNDRV_CTL_ELEM_ACCESS_READWRITE \ - (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE) -#define SNDRV_CTL_ELEM_ACCESS_VOLATILE \ - (1 << 2) /* control value may be changed without a notification */ +#define SNDRV_CTL_ELEM_IFACE_CARD \ + ((snd_ctl_elem_iface_t)0) /* global control \ + */ +#define SNDRV_CTL_ELEM_IFACE_HWDEP ((snd_ctl_elem_iface_t)1) /* hardware dependent device */ +#define SNDRV_CTL_ELEM_IFACE_MIXER ((snd_ctl_elem_iface_t)2) /* virtual mixer device */ +#define SNDRV_CTL_ELEM_IFACE_PCM ((snd_ctl_elem_iface_t)3) /* PCM device */ +#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((snd_ctl_elem_iface_t)4) /* RawMidi device */ +#define SNDRV_CTL_ELEM_IFACE_TIMER \ + ((snd_ctl_elem_iface_t)5) /* timer device \ + */ +#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((snd_ctl_elem_iface_t)6) /* sequencer client */ +#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER + +#define SNDRV_CTL_ELEM_ACCESS_READ (1 << 0) +#define SNDRV_CTL_ELEM_ACCESS_WRITE (1 << 1) +#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_WRITE) +#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1 << 2) /* control value may be changed without a notification */ /* (1 << 3) is unused. */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4) /* TLV read is possible */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5) /* TLV write is possible */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE \ - (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) -#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND \ - (1 << 6) /* TLV command is possible \ - */ -#define SNDRV_CTL_ELEM_ACCESS_INACTIVE \ - (1 << 8) /* control does actually nothing, but may be updated */ -#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9) /* write lock */ -#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10) /* write lock owner */ -#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK \ - (1 << 28) /* kernel use a TLV callback */ -#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29) /* user space element */ +#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1 << 4) /* TLV read is possible */ +#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1 << 5) /* TLV write is possible */ +#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) +#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND \ + (1 << 6) /* TLV command is possible \ + */ +#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1 << 8) /* control does actually nothing, but may be updated */ +#define SNDRV_CTL_ELEM_ACCESS_LOCK (1 << 9) /* write lock */ +#define SNDRV_CTL_ELEM_ACCESS_OWNER (1 << 10) /* write lock owner */ +#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1 << 28) /* kernel use a TLV callback */ +#define SNDRV_CTL_ELEM_ACCESS_USER (1 << 29) /* user space element */ /* bits 30 and 31 are obsoleted (for indirect access) */ /* for further details see the ACPI and PCI power management specification */ -#define SNDRV_CTL_POWER_D0 0x0000 /* full On */ -#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ -#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ -#define SNDRV_CTL_POWER_D3 0x0300 /* Off */ -#define SNDRV_CTL_POWER_D3hot \ - (SNDRV_CTL_POWER_D3 | 0x0000) /* Off, with power */ -#define SNDRV_CTL_POWER_D3cold \ - (SNDRV_CTL_POWER_D3 | 0x0001) /* Off, without power */ +#define SNDRV_CTL_POWER_D0 0x0000 /* full On */ +#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ +#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ +#define SNDRV_CTL_POWER_D3 0x0300 /* Off */ +#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3 | 0x0000) /* Off, with power */ +#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3 | 0x0001) /* Off, without power */ #define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 struct snd_ctl_elem_id { - unsigned int numid; /* numeric identifier, zero = invalid */ - snd_ctl_elem_iface_t iface; /* interface identifier */ - unsigned int device; /* device/client number */ - unsigned int subdevice; /* subdevice (substream) number */ + unsigned int numid; /* numeric identifier, zero = invalid */ + snd_ctl_elem_iface_t iface; /* interface identifier */ + unsigned int device; /* device/client number */ + unsigned int subdevice; /* subdevice (substream) number */ unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */ unsigned int index; /* index of item */ @@ -1349,12 +1284,10 @@ struct snd_ctl_tlv { #define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) #define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) #define SNDRV_CTL_IOCTL_UMP_NEXT_DEVICE _IOWR('U', 0x43, int) -#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO \ - _IOWR('U', 0x44, struct snd_ump_endpoint_info) -#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO \ - _IOWR('U', 0x45, struct snd_ump_block_info) -#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) -#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) +#define SNDRV_CTL_IOCTL_UMP_ENDPOINT_INFO _IOWR('U', 0x44, struct snd_ump_endpoint_info) +#define SNDRV_CTL_IOCTL_UMP_BLOCK_INFO _IOWR('U', 0x45, struct snd_ump_block_info) +#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) +#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) /* * Read interface. diff --git a/include/arch/x86_64/sound/compress_offload.h b/include/arch/x86_64/sound/compress_offload.h index 7f7c6747..9e385aca 100644 --- a/include/arch/x86_64/sound/compress_offload.h +++ b/include/arch/x86_64/sound/compress_offload.h @@ -65,11 +65,7 @@ struct snd_compr_avail { struct snd_compr_tstamp tstamp; } __attribute__((packed, aligned(4))); -enum snd_compr_direction { - SND_COMPRESS_PLAYBACK = 0, - SND_COMPRESS_CAPTURE, - SND_COMPRESS_ACCEL -}; +enum snd_compr_direction { SND_COMPRESS_PLAYBACK = 0, SND_COMPRESS_CAPTURE, SND_COMPRESS_ACCEL }; /** * struct snd_compr_caps - caps descriptor @@ -201,30 +197,28 @@ struct snd_compr_task_status { * SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that * SNDRV_COMPRESS_IOCTL_VERSION: Query the API version */ -#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) -#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps) -#define SNDRV_COMPRESS_GET_CODEC_CAPS \ - _IOWR('C', 0x11, struct snd_compr_codec_caps) -#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) -#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) -#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata) -#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata) -#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) -#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) -#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) -#define SNDRV_COMPRESS_RESUME _IO('C', 0x31) -#define SNDRV_COMPRESS_START _IO('C', 0x32) -#define SNDRV_COMPRESS_STOP _IO('C', 0x33) -#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) -#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) -#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) +#define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) +#define SNDRV_COMPRESS_GET_CAPS _IOWR('C', 0x10, struct snd_compr_caps) +#define SNDRV_COMPRESS_GET_CODEC_CAPS _IOWR('C', 0x11, struct snd_compr_codec_caps) +#define SNDRV_COMPRESS_SET_PARAMS _IOW('C', 0x12, struct snd_compr_params) +#define SNDRV_COMPRESS_GET_PARAMS _IOR('C', 0x13, struct snd_codec) +#define SNDRV_COMPRESS_SET_METADATA _IOW('C', 0x14, struct snd_compr_metadata) +#define SNDRV_COMPRESS_GET_METADATA _IOWR('C', 0x15, struct snd_compr_metadata) +#define SNDRV_COMPRESS_TSTAMP _IOR('C', 0x20, struct snd_compr_tstamp) +#define SNDRV_COMPRESS_AVAIL _IOR('C', 0x21, struct snd_compr_avail) +#define SNDRV_COMPRESS_PAUSE _IO('C', 0x30) +#define SNDRV_COMPRESS_RESUME _IO('C', 0x31) +#define SNDRV_COMPRESS_START _IO('C', 0x32) +#define SNDRV_COMPRESS_STOP _IO('C', 0x33) +#define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) +#define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) +#define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) #define SNDRV_COMPRESS_TASK_CREATE _IOWR('C', 0x60, struct snd_compr_task) #define SNDRV_COMPRESS_TASK_FREE _IOW('C', 0x61, __u64) #define SNDRV_COMPRESS_TASK_START _IOWR('C', 0x62, struct snd_compr_task) #define SNDRV_COMPRESS_TASK_STOP _IOW('C', 0x63, __u64) -#define SNDRV_COMPRESS_TASK_STATUS \ - _IOWR('C', 0x68, struct snd_compr_task_status) +#define SNDRV_COMPRESS_TASK_STATUS _IOWR('C', 0x68, struct snd_compr_task_status) /* * TODO diff --git a/include/arch/x86_64/sound/emu10k1.h b/include/arch/x86_64/sound/emu10k1.h index 99b2a976..22e6d5ac 100644 --- a/include/arch/x86_64/sound/emu10k1.h +++ b/include/arch/x86_64/sound/emu10k1.h @@ -22,8 +22,7 @@ * this header file in userspace since they are not generally available for * uapi headers. */ -#define __EMU10K1_DECLARE_BITMAP(name, bits) \ - unsigned long name[(bits) / (sizeof(unsigned long) * 8)] +#define __EMU10K1_DECLARE_BITMAP(name, bits) unsigned long name[(bits) / (sizeof(unsigned long) * 8)] /* instruction set */ #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ @@ -38,23 +37,16 @@ #define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */ #define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */ #define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */ -#define iLOG \ - 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */ -#define iEXP \ - 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */ -#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */ -#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */ - -#define LOWORD_OPX_MASK \ - 0x000ffc00 /* Instruction operand X */ -#define LOWORD_OPY_MASK \ - 0x000003ff /* Instruction operand Y */ -#define HIWORD_OPCODE_MASK \ - 0x00f00000 /* Instruction opcode */ -#define HIWORD_RESULT_MASK \ - 0x000ffc00 /* Instruction result */ -#define HIWORD_OPA_MASK \ - 0x000003ff /* Instruction operand A */ +#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */ +#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */ +#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */ +#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */ + +#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */ +#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */ +#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */ +#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */ +#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */ /* Audigy Soundcards have a different instruction format */ #define A_LOWORD_OPX_MASK 0x007ff000 @@ -64,25 +56,23 @@ #define A_HIWORD_OPA_MASK 0x000007ff /* GPRs */ -#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */ -#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */ -#define EXTOUT(x) \ - (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */ +#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */ +#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */ +#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */ #define FXBUS2(x) \ (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC \ high 16 bits */ /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ -#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */ -#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */ -#define A_P16VIN(x) \ - (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ +#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */ +#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */ +#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ #define A_EXTOUT(x) \ (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f \ unknown */ -#define A_FXBUS2(x) \ - (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> \ - A_FXWC2 */ +#define A_FXBUS2(x) \ + (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> \ + A_FXWC2 */ #define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" */ #define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_01 - _0F" */ #define A3_EMU32IN(x) \ @@ -159,9 +149,8 @@ 0x400 /* Audigy GPRs, 0x400 to 0x5ff \ */ -#define A_TANKMEMCTLREGBASE \ - 0x100 /* Tank memory control registers base - only for Audigy */ -#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */ +#define A_TANKMEMCTLREGBASE 0x100 /* Tank memory control registers base - only for Audigy */ +#define A_TANKMEMCTLREG_MASK 0x1f /* only 5 bits used - only for Audigy */ /* Tank audio data is logarithmically compressed down to 16 bits before writing * to TRAM and is */ @@ -169,27 +158,19 @@ * the last 32 */ /* locations are for external TRAM. */ -#define TANKMEMDATAREGBASE \ - 0x200 /* Tank memory data registers base */ -#define TANKMEMDATAREG_MASK \ - 0x000fffff /* 20 bit tank audio data field */ +#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */ +#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */ /* Combined address field and memory opcode or flag field. 160 locations, last * 32 are external */ -#define TANKMEMADDRREGBASE \ - 0x300 /* Tank memory address registers base */ -#define TANKMEMADDRREG_ADDR_MASK \ - 0x000fffff /* 20 bit tank address field */ -#define TANKMEMADDRREG_CLEAR \ - 0x00800000 /* Clear tank memory */ -#define TANKMEMADDRREG_ALIGN \ - 0x00400000 /* Align read or write relative to tank access */ -#define TANKMEMADDRREG_WRITE \ - 0x00200000 /* Write to tank memory */ -#define TANKMEMADDRREG_READ \ - 0x00100000 /* Read from tank memory */ - -#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ +#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */ +#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ +#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ +#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ +#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ +#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ + +#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ #define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ #define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ #define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ @@ -380,8 +361,8 @@ struct snd_emu10k1_fx8010_control_gpr { int value[32]; /* initial values */ int min; /* minimum range */ int max; /* maximum range */ - unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) - */ + unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) + */ const unsigned int *tlv; }; @@ -404,20 +385,20 @@ struct snd_emu10k1_fx8010_code { initializers */ __u32 *gpr_map; /* initializers */ - unsigned int gpr_add_control_count; /* count of GPR controls to - add/replace */ + unsigned int gpr_add_control_count; /* count of GPR controls to + add/replace */ struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */ - unsigned int gpr_del_control_count; /* count of GPR controls to remove - */ + unsigned int gpr_del_control_count; /* count of GPR controls to remove + */ struct emu10k1_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */ - unsigned int gpr_list_control_count; /* count of GPR controls to list */ - unsigned int gpr_list_control_total; /* total count of GPR controls */ + unsigned int gpr_list_control_count; /* count of GPR controls to list */ + unsigned int gpr_list_control_total; /* total count of GPR controls */ struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */ @@ -428,7 +409,7 @@ struct snd_emu10k1_fx8010_code { __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ - __u32 *code; /* one instruction - 64 bits */ + __u32 *code; /* one instruction - 64 bits */ }; struct snd_emu10k1_fx8010_tram { @@ -439,18 +420,18 @@ struct snd_emu10k1_fx8010_tram { }; struct snd_emu10k1_fx8010_pcm_rec { - unsigned int substream; /* substream number */ - unsigned int res1; /* reserved */ - unsigned int channels; /* 16-bit channels count, zero = remove this - substream */ - unsigned int tram_start; /* ring buffer position in TRAM (in samples) */ - unsigned int buffer_size; /* count of buffered samples */ - unsigned short gpr_size; /* GPR containing size of ringbuffer in samples - (host) */ - unsigned short gpr_ptr; /* GPR containing current pointer in the ring - buffer (host = reset, FX8010) */ - unsigned short gpr_count; /* GPR containing count of samples between two - interrupts (host) */ + unsigned int substream; /* substream number */ + unsigned int res1; /* reserved */ + unsigned int channels; /* 16-bit channels count, zero = remove this + substream */ + unsigned int tram_start; /* ring buffer position in TRAM (in samples) */ + unsigned int buffer_size; /* count of buffered samples */ + unsigned short gpr_size; /* GPR containing size of ringbuffer in samples + (host) */ + unsigned short gpr_ptr; /* GPR containing current pointer in the ring + buffer (host = reset, FX8010) */ + unsigned short gpr_count; /* GPR containing count of samples between two + interrupts (host) */ unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */ unsigned short gpr_trigger; /* GPR containing trigger (activate) @@ -465,20 +446,14 @@ struct snd_emu10k1_fx8010_pcm_rec { #define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) -#define SNDRV_EMU10K1_IOCTL_INFO _IOR('H', 0x10, struct snd_emu10k1_fx8010_info) -#define SNDRV_EMU10K1_IOCTL_CODE_POKE \ - _IOW('H', 0x11, struct snd_emu10k1_fx8010_code) -#define SNDRV_EMU10K1_IOCTL_CODE_PEEK \ - _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) -#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW('H', 0x20, int) -#define SNDRV_EMU10K1_IOCTL_TRAM_POKE \ - _IOW('H', 0x21, struct snd_emu10k1_fx8010_tram) -#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK \ - _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) -#define SNDRV_EMU10K1_IOCTL_PCM_POKE \ - _IOW('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) -#define SNDRV_EMU10K1_IOCTL_PCM_PEEK \ - _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) +#define SNDRV_EMU10K1_IOCTL_INFO _IOR('H', 0x10, struct snd_emu10k1_fx8010_info) +#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW('H', 0x11, struct snd_emu10k1_fx8010_code) +#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) +#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW('H', 0x20, int) +#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW('H', 0x21, struct snd_emu10k1_fx8010_tram) +#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) +#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) +#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) #define SNDRV_EMU10K1_IOCTL_PVERSION _IOR('H', 0x40, int) #define SNDRV_EMU10K1_IOCTL_STOP _IO('H', 0x80) #define SNDRV_EMU10K1_IOCTL_CONTINUE _IO('H', 0x81) diff --git a/include/arch/x86_64/sound/fcp.h b/include/arch/x86_64/sound/fcp.h index 4efd72ba..135ff412 100644 --- a/include/arch/x86_64/sound/fcp.h +++ b/include/arch/x86_64/sound/fcp.h @@ -62,8 +62,7 @@ #define FCP_HWDEP_MINOR 0 #define FCP_HWDEP_SUBMINOR 0 -#define FCP_HWDEP_VERSION \ - ((FCP_HWDEP_MAJOR << 16) | (FCP_HWDEP_MINOR << 8) | FCP_HWDEP_SUBMINOR) +#define FCP_HWDEP_VERSION ((FCP_HWDEP_MAJOR << 16) | (FCP_HWDEP_MINOR << 8) | FCP_HWDEP_SUBMINOR) #define FCP_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF) #define FCP_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF) diff --git a/include/arch/x86_64/sound/firewire.h b/include/arch/x86_64/sound/firewire.h index febaf527..37d1c70e 100644 --- a/include/arch/x86_64/sound/firewire.h +++ b/include/arch/x86_64/sound/firewire.h @@ -106,21 +106,16 @@ union snd_firewire_event { struct snd_firewire_event_digi00x_message digi00x_message; struct snd_firewire_event_tascam_control tascam_control; struct snd_firewire_event_motu_notification motu_notification; - struct snd_firewire_event_motu_register_dsp_change - motu_register_dsp_change; + struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change; struct snd_firewire_event_ff400_message ff400_message; }; -#define SNDRV_FIREWIRE_IOCTL_GET_INFO \ - _IOR('H', 0xf8, struct snd_firewire_get_info) -#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) -#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) -#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE \ - _IOR('H', 0xfb, struct snd_firewire_tascam_state) -#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER \ - _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter) -#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER \ - _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter) +#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) +#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) +#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) +#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state) +#define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_METER _IOR('H', 0xfc, struct snd_firewire_motu_register_dsp_meter) +#define SNDRV_FIREWIRE_IOCTL_MOTU_COMMAND_DSP_METER _IOR('H', 0xfd, struct snd_firewire_motu_command_dsp_meter) #define SNDRV_FIREWIRE_IOCTL_MOTU_REGISTER_DSP_PARAMETER \ _IOR('H', 0xfe, struct snd_firewire_motu_register_dsp_parameter) @@ -179,9 +174,8 @@ struct snd_firewire_tascam_state { #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT 24 #define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT 24 -#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT \ - (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + \ - SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT) +#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT \ + (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_INPUT_COUNT + SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_OUTPUT_COUNT) /** * struct snd_firewire_motu_register_dsp_meter - the container for meter @@ -196,11 +190,10 @@ struct snd_firewire_motu_register_dsp_meter { __u8 data[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_METER_COUNT]; }; -#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4 -#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20 -#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10 -#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT \ - (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2) +#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT 4 +#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT 20 +#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT 10 +#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2) /** * snd_firewire_motu_register_dsp_parameter - the container for parameters of @@ -239,16 +232,12 @@ struct snd_firewire_motu_register_dsp_parameter { __u8 gain[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; __u8 pan[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; - __u8 paired_balance - [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; - __u8 paired_width - [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; + __u8 paired_balance[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; + __u8 paired_width[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_SRC_COUNT]; } source[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; struct { - __u8 paired_volume - [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; - __u8 paired_flag - [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; + __u8 paired_volume[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; + __u8 paired_flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_MIXER_COUNT]; } output; } mixer; struct { @@ -263,8 +252,7 @@ struct snd_firewire_motu_register_dsp_parameter { __u8 reserved[6]; } line_input; struct { - __u8 gain_and_invert - [SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT]; + __u8 gain_and_invert[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT]; __u8 flag[SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT]; } input; __u8 reserved[64]; diff --git a/include/arch/x86_64/sound/hdsp.h b/include/arch/x86_64/sound/hdsp.h index c340e9af..db28b235 100644 --- a/include/arch/x86_64/sound/hdsp.h +++ b/include/arch/x86_64/sound/hdsp.h @@ -59,8 +59,7 @@ struct hdsp_config_info { unsigned char analog_extension_board; }; -#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO \ - _IOR('H', 0x41, struct hdsp_config_info) +#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) struct hdsp_firmware { void *firmware_data; /* 24413 x 4 bytes */ diff --git a/include/arch/x86_64/sound/hdspm.h b/include/arch/x86_64/sound/hdspm.h index a873e680..b416eff6 100644 --- a/include/arch/x86_64/sound/hdspm.h +++ b/include/arch/x86_64/sound/hdspm.h @@ -83,18 +83,11 @@ struct hdspm_ltc { * connection status. */ -enum hdspm_sync { - hdspm_sync_no_lock = 0, - hdspm_sync_lock = 1, - hdspm_sync_sync = 2 -}; +enum hdspm_sync { hdspm_sync_no_lock = 0, hdspm_sync_lock = 1, hdspm_sync_sync = 2 }; enum hdspm_madi_input { hdspm_input_optical = 0, hdspm_input_coax = 1 }; -enum hdspm_madi_channel_format { - hdspm_format_ch_64 = 0, - hdspm_format_ch_56 = 1 -}; +enum hdspm_madi_channel_format { hdspm_format_ch_64 = 0, hdspm_format_ch_56 = 1 }; enum hdspm_madi_frame_format { hdspm_frame_48 = 0, hdspm_frame_96 = 1 }; diff --git a/include/arch/x86_64/sound/sb16_csp.h b/include/arch/x86_64/sound/sb16_csp.h index 5a2617f2..84b3e9f0 100644 --- a/include/arch/x86_64/sound/sb16_csp.h +++ b/include/arch/x86_64/sound/sb16_csp.h @@ -90,8 +90,7 @@ struct snd_sb_csp_info { * As a workaround for skipping the size-limit check, here we don't use the * normal _IOW() macro but _IOC() with the manual argument. */ -#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ - _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) +#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) /* unload microcode from CSP */ #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) /* start CSP */ diff --git a/include/arch/x86_64/sound/scarlett2.h b/include/arch/x86_64/sound/scarlett2.h index c909190a..d3b94d46 100644 --- a/include/arch/x86_64/sound/scarlett2.h +++ b/include/arch/x86_64/sound/scarlett2.h @@ -16,9 +16,8 @@ #define SCARLETT2_HWDEP_MINOR 0 #define SCARLETT2_HWDEP_SUBMINOR 0 -#define SCARLETT2_HWDEP_VERSION \ - ((SCARLETT2_HWDEP_MAJOR << 16) | (SCARLETT2_HWDEP_MINOR << 8) | \ - SCARLETT2_HWDEP_SUBMINOR) +#define SCARLETT2_HWDEP_VERSION \ + ((SCARLETT2_HWDEP_MAJOR << 16) | (SCARLETT2_HWDEP_MINOR << 8) | SCARLETT2_HWDEP_SUBMINOR) #define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF) #define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF) @@ -47,7 +46,6 @@ struct scarlett2_flash_segment_erase_progress { unsigned char progress; unsigned char num_blocks; }; -#define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \ - _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress) +#define SCARLETT2_IOCTL_GET_ERASE_PROGRESS _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress) #endif /* __UAPI_SOUND_SCARLETT2_H */ diff --git a/include/arch/x86_64/sound/sfnt_info.h b/include/arch/x86_64/sound/sfnt_info.h index 17430b08..6ff08a87 100644 --- a/include/arch/x86_64/sound/sfnt_info.h +++ b/include/arch/x86_64/sound/sfnt_info.h @@ -71,10 +71,10 @@ struct soundfont_open_parm { /* wave table envelope & effect parameters to control EMU8000 */ struct soundfont_voice_parm { - unsigned short moddelay; /* modulation delay (0x8000) */ - unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */ - unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */ - unsigned short modrelease; /* modulation release time (0x807f) */ + unsigned short moddelay; /* modulation delay (0x8000) */ + unsigned short modatkhld; /* modulation attack & hold time (0x7f7f) */ + unsigned short moddcysus; /* modulation decay & sustain (0x7f7f) */ + unsigned short modrelease; /* modulation release time (0x807f) */ short modkeyhold, modkeydecay; /* envelope change per key (not used) */ unsigned short voldelay; /* volume delay (0x8000) */ unsigned short volatkhld; /* volume attack & hold time (0x7f7f) */ @@ -108,16 +108,16 @@ struct soundfont_voice_info { #define SNDRV_SFNT_MODE_NORELEASE 4 /* obsolete */ #define SNDRV_SFNT_MODE_INIT_PARM 8 - short root; /* midi root key */ - short tune; /* pitch tuning (in cents) */ - unsigned char low, high; /* key note range */ - unsigned char vellow, velhigh; /* velocity range */ - signed char fixkey, fixvel; /* fixed key, velocity */ - signed char pan, fixpan; /* panning, fixed panning */ - short exclusiveClass; /* exclusive class (0 = none) */ - unsigned char amplitude; /* sample volume (127 max) */ - unsigned char attenuation; /* attenuation (0.375dB) */ - short scaleTuning; /* pitch scale tuning(%), normally 100 */ + short root; /* midi root key */ + short tune; /* pitch tuning (in cents) */ + unsigned char low, high; /* key note range */ + unsigned char vellow, velhigh; /* velocity range */ + signed char fixkey, fixvel; /* fixed key, velocity */ + signed char pan, fixpan; /* panning, fixed panning */ + short exclusiveClass; /* exclusive class (0 = none) */ + unsigned char amplitude; /* sample volume (127 max) */ + unsigned char attenuation; /* attenuation (0.375dB) */ + short scaleTuning; /* pitch scale tuning(%), normally 100 */ struct soundfont_voice_parm parm; /* voice envelope parameters */ unsigned short sample_mode; /* sample mode_flag (set by driver) */ }; @@ -154,7 +154,7 @@ struct soundfont_sample_info { #define SNDRV_SFNT_SAMPLE_STEREO_LEFT 32 /* stereo left sound */ #define SNDRV_SFNT_SAMPLE_STEREO_RIGHT 64 /* stereo right sound */ #define SNDRV_SFNT_SAMPLE_REVERSE_LOOP 128 /* reverse looping */ - unsigned int truesize; /* used memory size (set by driver) */ + unsigned int truesize; /* used memory size (set by driver) */ }; /* @@ -181,9 +181,8 @@ struct snd_emux_misc_mode { int value2; /* reserved */ }; -#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) -#define SNDRV_EMUX_IOCTL_LOAD_PATCH \ - _IOWR('H', 0x81, struct soundfont_patch_info) +#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) +#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info) #define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82) #define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83) #define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int) diff --git a/include/arch/x86_64/sound/skl-tplg-interface.h b/include/arch/x86_64/sound/skl-tplg-interface.h index a958344f..c947abf9 100644 --- a/include/arch/x86_64/sound/skl-tplg-interface.h +++ b/include/arch/x86_64/sound/skl-tplg-interface.h @@ -28,13 +28,7 @@ #define SKL_UUID_STR_SZ 40 /* Event types goes here */ /* Reserve event type 0 for no event handlers */ -enum skl_event_types { - SKL_EVENT_NONE = 0, - SKL_MIXER_EVENT, - SKL_MUX_EVENT, - SKL_VMIXER_EVENT, - SKL_PGA_EVENT -}; +enum skl_event_types { SKL_EVENT_NONE = 0, SKL_MIXER_EVENT, SKL_MUX_EVENT, SKL_VMIXER_EVENT, SKL_PGA_EVENT }; /** * enum skl_ch_cfg - channel configuration @@ -84,23 +78,11 @@ enum skl_module_type { SKL_MODULE_TYPE_MIC_SELECT, }; -enum skl_core_affinity { - SKL_AFFINITY_CORE_0 = 0, - SKL_AFFINITY_CORE_1, - SKL_AFFINITY_CORE_MAX -}; +enum skl_core_affinity { SKL_AFFINITY_CORE_0 = 0, SKL_AFFINITY_CORE_1, SKL_AFFINITY_CORE_MAX }; -enum skl_pipe_conn_type { - SKL_PIPE_CONN_TYPE_NONE = 0, - SKL_PIPE_CONN_TYPE_FE, - SKL_PIPE_CONN_TYPE_BE -}; +enum skl_pipe_conn_type { SKL_PIPE_CONN_TYPE_NONE = 0, SKL_PIPE_CONN_TYPE_FE, SKL_PIPE_CONN_TYPE_BE }; -enum skl_hw_conn_type { - SKL_CONN_NONE = 0, - SKL_CONN_SOURCE = 1, - SKL_CONN_SINK = 2 -}; +enum skl_hw_conn_type { SKL_CONN_NONE = 0, SKL_CONN_SOURCE = 1, SKL_CONN_SINK = 2 }; enum skl_dev_type { SKL_DEVICE_BT = 0x0, @@ -142,12 +124,7 @@ enum module_pin_type { SKL_PIN_TYPE_HETEROGENEOUS, }; -enum skl_module_param_type { - SKL_PARAM_DEFAULT = 0, - SKL_PARAM_INIT, - SKL_PARAM_SET, - SKL_PARAM_BIND -}; +enum skl_module_param_type { SKL_PARAM_DEFAULT = 0, SKL_PARAM_INIT, SKL_PARAM_SET, SKL_PARAM_BIND }; struct skl_dfw_algo_data { __u32 set_params : 2; diff --git a/include/arch/x86_64/sound/sof/abi.h b/include/arch/x86_64/sound/sof/abi.h index b3b33960..09411a1a 100644 --- a/include/arch/x86_64/sound/sof/abi.h +++ b/include/arch/x86_64/sound/sof/abi.h @@ -40,20 +40,15 @@ #define SOF_ABI_PATCH_SHIFT 0 #define SOF_ABI_PATCH_MASK 0xfff -#define SOF_ABI_VER(major, minor, patch) \ - (((major) << SOF_ABI_MAJOR_SHIFT) | ((minor) << SOF_ABI_MINOR_SHIFT) | \ - ((patch) << SOF_ABI_PATCH_SHIFT)) +#define SOF_ABI_VER(major, minor, patch) \ + (((major) << SOF_ABI_MAJOR_SHIFT) | ((minor) << SOF_ABI_MINOR_SHIFT) | ((patch) << SOF_ABI_PATCH_SHIFT)) -#define SOF_ABI_VERSION_MAJOR(version) \ - (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK) -#define SOF_ABI_VERSION_MINOR(version) \ - (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK) -#define SOF_ABI_VERSION_PATCH(version) \ - (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK) +#define SOF_ABI_VERSION_MAJOR(version) (((version) >> SOF_ABI_MAJOR_SHIFT) & SOF_ABI_MAJOR_MASK) +#define SOF_ABI_VERSION_MINOR(version) (((version) >> SOF_ABI_MINOR_SHIFT) & SOF_ABI_MINOR_MASK) +#define SOF_ABI_VERSION_PATCH(version) (((version) >> SOF_ABI_PATCH_SHIFT) & SOF_ABI_PATCH_MASK) #define SOF_ABI_VERSION_INCOMPATIBLE(sof_ver, client_ver) \ - (SOF_ABI_VERSION_MAJOR((sof_ver)) != \ - SOF_ABI_VERSION_MAJOR((client_ver))) + (SOF_ABI_VERSION_MAJOR((sof_ver)) != SOF_ABI_VERSION_MAJOR((client_ver))) #define SOF_ABI_VERSION SOF_ABI_VER(SOF_ABI_MAJOR, SOF_ABI_MINOR, SOF_ABI_PATCH) diff --git a/include/arch/x86_64/sound/sof/fw.h b/include/arch/x86_64/sound/sof/fw.h index 98608953..af9292f5 100644 --- a/include/arch/x86_64/sound/sof/fw.h +++ b/include/arch/x86_64/sound/sof/fw.h @@ -73,9 +73,9 @@ struct snd_sof_mod_hdr { */ struct snd_sof_fw_header { unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */ - __u32 file_size; /* size of file minus this header */ - __u32 num_modules; /* number of modules */ - __u32 abi; /* version of header format */ + __u32 file_size; /* size of file minus this header */ + __u32 num_modules; /* number of modules */ + __u32 abi; /* version of header format */ } __attribute__((packed)); #endif diff --git a/include/arch/x86_64/sound/tlv.h b/include/arch/x86_64/sound/tlv.h index 1c6c5a82..26a1c7e9 100644 --- a/include/arch/x86_64/sound/tlv.h +++ b/include/arch/x86_64/sound/tlv.h @@ -28,27 +28,21 @@ * block_length = (length + (sizeof(unsigned int) - 1)) & * ~(sizeof(unsigned int) - 1)) .... */ -#define SNDRV_CTL_TLVD_ITEM(type, ...) \ - (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__ -#define SNDRV_CTL_TLVD_LENGTH(...) \ - ((unsigned int)sizeof((const unsigned int[]){ __VA_ARGS__ })) +#define SNDRV_CTL_TLVD_ITEM(type, ...) (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__ +#define SNDRV_CTL_TLVD_LENGTH(...) ((unsigned int)sizeof((const unsigned int[]){ __VA_ARGS__ })) /* Accessor offsets for TLV data items */ #define SNDRV_CTL_TLVO_TYPE 0 #define SNDRV_CTL_TLVO_LEN 1 -#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) -#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \ - unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) } +#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) +#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) unsigned int name[] = { SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) } #define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff #define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000 -#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, (min), \ - ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \ - ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : \ - 0)) +#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ + SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, (min), \ + ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0)) #define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \ unsigned int name[] = { SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) } @@ -57,23 +51,20 @@ #define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3 /* dB scale specified with min/max values instead of step */ -#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) +#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) #define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB)) #define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \ unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) } -#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \ - unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, \ - max_dB) } +#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \ + unsigned int name[] = { SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) } /* Accessor offsets for min, max items in db-minmax types of TLV. */ #define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2 #define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3 /* linear volume between min_dB and max_dB (.01dB unit) */ -#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) +#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) #define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \ unsigned int name[] = { SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) } @@ -87,10 +78,8 @@ * dB values (which is also required for all other mixer controls). */ /* Each item is: <min> <max> <TLV> */ -#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \ - SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) -#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \ - unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) } +#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) +#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) unsigned int name[] = { SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) } #define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999 diff --git a/include/arch/x86_64/sound/usb_stream.h b/include/arch/x86_64/sound/usb_stream.h index 6a6c3ca6..b4a7a4bb 100644 --- a/include/arch/x86_64/sound/usb_stream.h +++ b/include/arch/x86_64/sound/usb_stream.h @@ -8,8 +8,7 @@ #define USB_STREAM_INTERFACE_VERSION 2 -#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS \ - _IOW('H', 0x90, struct usb_stream_config) +#define SNDRV_USB_STREAM_IOCTL_SET_PARAMS _IOW('H', 0x90, struct usb_stream_config) struct usb_stream_packet { unsigned offset; |
