hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/uapi/sound/emu10k1.h
....@@ -23,8 +23,9 @@
2323 #ifndef _UAPI__SOUND_EMU10K1_H
2424 #define _UAPI__SOUND_EMU10K1_H
2525
26
+#ifdef __linux__
2627 #include <linux/types.h>
27
-#include <sound/asound.h>
28
+#endif
2829
2930 /*
3031 * ---- FX8010 ----
....@@ -282,8 +283,22 @@
282283 #define EMU10K1_GPR_TRANSLATION_TREBLE 3
283284 #define EMU10K1_GPR_TRANSLATION_ONOFF 4
284285
286
+enum emu10k1_ctl_elem_iface {
287
+ EMU10K1_CTL_ELEM_IFACE_MIXER = 2, /* virtual mixer device */
288
+ EMU10K1_CTL_ELEM_IFACE_PCM = 3, /* PCM device */
289
+};
290
+
291
+struct emu10k1_ctl_elem_id {
292
+ unsigned int pad; /* don't use */
293
+ int iface; /* interface identifier */
294
+ unsigned int device; /* device/client number */
295
+ unsigned int subdevice; /* subdevice (substream) number */
296
+ unsigned char name[44]; /* ASCII name of item */
297
+ unsigned int index; /* index of item */
298
+};
299
+
285300 struct snd_emu10k1_fx8010_control_gpr {
286
- struct snd_ctl_elem_id id; /* full control ID definition */
301
+ struct emu10k1_ctl_elem_id id; /* full control ID definition */
287302 unsigned int vcount; /* visible count */
288303 unsigned int count; /* count of GPR (1..16) */
289304 unsigned short gpr[32]; /* GPR number(s) */
....@@ -296,7 +311,7 @@
296311
297312 /* old ABI without TLV support */
298313 struct snd_emu10k1_fx8010_control_old_gpr {
299
- struct snd_ctl_elem_id id;
314
+ struct emu10k1_ctl_elem_id id;
300315 unsigned int vcount;
301316 unsigned int count;
302317 unsigned short gpr[32];
....@@ -310,24 +325,24 @@
310325 char name[128];
311326
312327 __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */
313
- __u32 __user *gpr_map; /* initializers */
328
+ __u32 *gpr_map; /* initializers */
314329
315330 unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
316
- struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */
331
+ struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */
317332
318333 unsigned int gpr_del_control_count; /* count of GPR controls to remove */
319
- struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */
334
+ struct emu10k1_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */
320335
321336 unsigned int gpr_list_control_count; /* count of GPR controls to list */
322337 unsigned int gpr_list_control_total; /* total count of GPR controls */
323
- struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */
338
+ struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */
324339
325340 __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */
326
- __u32 __user *tram_data_map; /* data initializers */
327
- __u32 __user *tram_addr_map; /* map initializers */
341
+ __u32 *tram_data_map; /* data initializers */
342
+ __u32 *tram_addr_map; /* map initializers */
328343
329344 __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */
330
- __u32 __user *code; /* one instruction - 64 bits */
345
+ __u32 *code; /* one instruction - 64 bits */
331346 };
332347
333348 struct snd_emu10k1_fx8010_tram {
....@@ -370,12 +385,5 @@
370385 #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82)
371386 #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int)
372387 #define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int)
373
-
374
-/* typedefs for compatibility to user-space */
375
-typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t;
376
-typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t;
377
-typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t;
378
-typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t;
379
-typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t;
380388
381389 #endif /* _UAPI__SOUND_EMU10K1_H */