History

Merge tag 'asoc-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.7 part 2 Really sorry about this late pull request. It looks like at the time I sent my pull request for v4.7 there was some conflict or other issue which caused my script to stop merging the ASoC branches at some point after the HDMI changes. It's all specific driver updates, including: - New drivers for MAX98371 and TAS5720. - SPI support for TLV320AIC32x4. - TDM support for STI Uniperf IPs. This code should all have been in -next prior to the merge window apart from some fixes, it dropped out on the 18th.

Takashi Iwai committed 10 years ago

Commit eb4606e2 parents 86c72d1 bf65921237 files · +4366 −1052Browse files

Showing the changes to include/uapi (5 of 237 files). Show all

Unified · Split

5 files
  1. include/uapi/linux/if.h +28 −0
  2. include/uapi/linux/if_macsec.h +3 −1
  3. include/uapi/linux/libc-compat.h +44 −0
  4. include/uapi/linux/tc_act/Kbuild +1 −0
  5. include/uapi/sound/asoc.h +42 −2
include/uapi/linux/if.h+28−0
@@ -19,14 +19,20 @@ · 18 unmodified lines
1919 #ifndef _LINUX_IF_H
2020 #define _LINUX_IF_H
2121
22+#include <linux/libc-compat.h> /* for compatibility with glibc */
2223 #include <linux/types.h> /* for "__kernel_caddr_t" et al */
2324 #include <linux/socket.h> /* for "struct sockaddr" et al */
2425 #include <linux/compiler.h> /* for "__user" et al */
2526
27+#if __UAPI_DEF_IF_IFNAMSIZ
2628 #define IFNAMSIZ 16
29+#endif /* __UAPI_DEF_IF_IFNAMSIZ */
2730 #define IFALIASZ 256
2831 #include <linux/hdlc/ioctl.h>
2932
33+/* For glibc compatibility. An empty enum does not compile. */
34+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \
35+ __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0
3036 /**
3137 * enum net_device_flags - &struct net_device flags
3238 *
@@ -68,6 +74,8 @@ · 35 unmodified lines
6874 * @IFF_ECHO: echo sent packets. Volatile.
6975 */
7076 enum net_device_flags {
77+/* for compatibility with glibc net/if.h */
78+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
7179 IFF_UP = 1<<0, /* sysfs */
7280 IFF_BROADCAST = 1<<1, /* volatile */
7381 IFF_DEBUG = 1<<2, /* sysfs */
@@ -84,11 +92,17 @@ enum net_device_flags { · 10 unmodified lines
8492 IFF_PORTSEL = 1<<13, /* sysfs */
8593 IFF_AUTOMEDIA = 1<<14, /* sysfs */
8694 IFF_DYNAMIC = 1<<15, /* sysfs */
95+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
96+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
8797 IFF_LOWER_UP = 1<<16, /* volatile */
8898 IFF_DORMANT = 1<<17, /* volatile */
8999 IFF_ECHO = 1<<18, /* volatile */
100+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
90101 };
102+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */
91103
104+/* for compatibility with glibc net/if.h */
105+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
92106 #define IFF_UP IFF_UP
93107 #define IFF_BROADCAST IFF_BROADCAST
94108 #define IFF_DEBUG IFF_DEBUG
@@ -105,9 +119,13 @@ enum net_device_flags { · 10 unmodified lines
105119 #define IFF_PORTSEL IFF_PORTSEL
106120 #define IFF_AUTOMEDIA IFF_AUTOMEDIA
107121 #define IFF_DYNAMIC IFF_DYNAMIC
122+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
123+
124+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
108125 #define IFF_LOWER_UP IFF_LOWER_UP
109126 #define IFF_DORMANT IFF_DORMANT
110127 #define IFF_ECHO IFF_ECHO
128+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
111129
112130 #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
113131 IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
@@ -166,6 +184,8 @@ enum { · 52 unmodified lines
166184 * being very small might be worth keeping for clean configuration.
167185 */
168186
187+/* for compatibility with glibc net/if.h */
188+#if __UAPI_DEF_IF_IFMAP
169189 struct ifmap {
170190 unsigned long mem_start;
171191 unsigned long mem_end;
@@ -175,6 +195,7 @@ struct ifmap { · 3 unmodified lines
175195 unsigned char port;
176196 /* 3 bytes spare */
177197 };
198+#endif /* __UAPI_DEF_IF_IFMAP */
178199
179200 struct if_settings {
180201 unsigned int type; /* Type of physical device or protocol */
@@ -200,6 +221,8 @@ struct if_settings { · 19 unmodified lines
200221 * remainder may be interface specific.
201222 */
202223
224+/* for compatibility with glibc net/if.h */
225+#if __UAPI_DEF_IF_IFREQ
203226 struct ifreq {
204227 #define IFHWADDRLEN 6
205228 union
@@ -223,6 +246,7 @@ struct ifreq { · 17 unmodified lines
223246 struct if_settings ifru_settings;
224247 } ifr_ifru;
225248 };
249+#endif /* __UAPI_DEF_IF_IFREQ */
226250
227251 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
228252 #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
@@ -249,6 +273,8 @@ struct ifreq { · 20 unmodified lines
249273 * must know all networks accessible).
250274 */
251275
276+/* for compatibility with glibc net/if.h */
277+#if __UAPI_DEF_IF_IFCONF
252278 struct ifconf {
253279 int ifc_len; /* size of buffer */
254280 union {
@@ -256,6 +282,8 @@ struct ifconf { · 1 unmodified line
256282 struct ifreq __user *ifcu_req;
257283 } ifc_ifcu;
258284 };
285+#endif /* __UAPI_DEF_IF_IFCONF */
286+
259287 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
260288 #define ifc_req ifc_ifcu.ifcu_req /* array of structures */
261289
include/uapi/linux/if_macsec.h+3−1
@@ -19,6 +19,8 @@ · 18 unmodified lines
1919
2020 #define MACSEC_MAX_KEY_LEN 128
2121
22+#define MACSEC_KEYID_LEN 16
23+
2224 #define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL
2325 #define MACSEC_DEFAULT_CIPHER_ALT 0x0080C20001000001ULL
2426
@@ -77,7 +79,7 @@ enum macsec_sa_attrs { · 52 unmodified lines
7779 MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */
7880 MACSEC_SA_ATTR_PN, /* config/dump, u32 */
7981 MACSEC_SA_ATTR_KEY, /* config, data */
80− MACSEC_SA_ATTR_KEYID, /* config/dump, u64 */
82+ MACSEC_SA_ATTR_KEYID, /* config/dump, 128-bit */
8183 MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */
8284 __MACSEC_SA_ATTR_END,
8385 NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END,
include/uapi/linux/libc-compat.h+44−0
@@ -51,6 +51,40 @@ · 50 unmodified lines
5151 /* We have included glibc headers... */
5252 #if defined(__GLIBC__)
5353
54+/* Coordinate with glibc net/if.h header. */
55+#if defined(_NET_IF_H)
56+
57+/* GLIBC headers included first so don't define anything
58+ * that would already be defined. */
59+
60+#define __UAPI_DEF_IF_IFCONF 0
61+#define __UAPI_DEF_IF_IFMAP 0
62+#define __UAPI_DEF_IF_IFNAMSIZ 0
63+#define __UAPI_DEF_IF_IFREQ 0
64+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
65+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
66+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
67+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
68+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
69+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
70+
71+#else /* _NET_IF_H */
72+
73+/* Linux headers included first, and we must define everything
74+ * we need. The expectation is that glibc will check the
75+ * __UAPI_DEF_* defines and adjust appropriately. */
76+
77+#define __UAPI_DEF_IF_IFCONF 1
78+#define __UAPI_DEF_IF_IFMAP 1
79+#define __UAPI_DEF_IF_IFNAMSIZ 1
80+#define __UAPI_DEF_IF_IFREQ 1
81+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
82+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
83+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
84+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
85+
86+#endif /* _NET_IF_H */
87+
5488 /* Coordinate with glibc netinet/in.h header. */
5589 #if defined(_NETINET_IN_H)
5690
@@ -117,6 +151,16 @@ · 60 unmodified lines
117151 * that we need. */
118152 #else /* !defined(__GLIBC__) */
119153
154+/* Definitions for if.h */
155+#define __UAPI_DEF_IF_IFCONF 1
156+#define __UAPI_DEF_IF_IFMAP 1
157+#define __UAPI_DEF_IF_IFNAMSIZ 1
158+#define __UAPI_DEF_IF_IFREQ 1
159+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
160+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
161+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
162+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
163+
120164 /* Definitions for in.h */
121165 #define __UAPI_DEF_IN_ADDR 1
122166 #define __UAPI_DEF_IN_IPPROTO 1
include/uapi/linux/tc_act/Kbuild+1−0
@@ -10,3 +10,4 @@ header-y += tc_skbedit.h · 9 unmodified lines
1010 header-y += tc_vlan.h
1111 header-y += tc_bpf.h
1212 header-y += tc_connmark.h
13+header-y += tc_ife.h
include/uapi/sound/asoc.h+42−2
@@ -116,6 +116,14 @@ · 115 unmodified lines
116116 #define SND_SOC_TPLG_STREAM_PLAYBACK 0
117117 #define SND_SOC_TPLG_STREAM_CAPTURE 1
118118
119+/* vendor tuple types */
120+#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0
121+#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1
122+#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2
123+#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3
124+#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4
125+#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5
126+
119127 /*
120128 * Block Header.
121129 * This header precedes all object and object arrays below.
@@ -132,6 +140,35 @@ struct snd_soc_tplg_hdr { · 10 unmodified lines
132140 __le32 count; /* number of elements in block */
133141 } __attribute__((packed));
134142
143+/* vendor tuple for uuid */
144+struct snd_soc_tplg_vendor_uuid_elem {
145+ __le32 token;
146+ char uuid[16];
147+} __attribute__((packed));
148+
149+/* vendor tuple for a bool/byte/short/word value */
150+struct snd_soc_tplg_vendor_value_elem {
151+ __le32 token;
152+ __le32 value;
153+} __attribute__((packed));
154+
155+/* vendor tuple for string */
156+struct snd_soc_tplg_vendor_string_elem {
157+ __le32 token;
158+ char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
159+} __attribute__((packed));
160+
161+struct snd_soc_tplg_vendor_array {
162+ __le32 size; /* size in bytes of the array, including all elements */
163+ __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */
164+ __le32 num_elems; /* number of elements in array */
165+ union {
166+ struct snd_soc_tplg_vendor_uuid_elem uuid[0];
167+ struct snd_soc_tplg_vendor_value_elem value[0];
168+ struct snd_soc_tplg_vendor_string_elem string[0];
169+ };
170+} __attribute__((packed));
171+
135172 /*
136173 * Private data.
137174 * All topology objects may have private data that can be used by the driver or
@@ -139,7 +176,10 @@ struct snd_soc_tplg_hdr { · 1 unmodified line
139176 */
140177 struct snd_soc_tplg_private {
141178 __le32 size; /* in bytes of private data */
142− char data[0];
179+ union {
180+ char data[0];
181+ struct snd_soc_tplg_vendor_array array[0];
182+ };
143183 } __attribute__((packed));
144184
145185 /*
@@ -383,7 +423,7 @@ struct snd_soc_tplg_pcm { · 237 unmodified lines
383423 __le32 size; /* in bytes of this structure */
384424 char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
385425 char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
386− __le32 pcm_id; /* unique ID - used to match */
426+ __le32 pcm_id; /* unique ID - used to match with DAI link */
387427 __le32 dai_id; /* unique ID - used to match */
388428 __le32 playback; /* supports playback mode */
389429 __le32 capture; /* supports capture mode */