| .. | .. |
|---|
| 23 | 23 | #ifndef _UAPI__SOUND_EMU10K1_H |
|---|
| 24 | 24 | #define _UAPI__SOUND_EMU10K1_H |
|---|
| 25 | 25 | |
|---|
| 26 | +#ifdef __linux__ |
|---|
| 26 | 27 | #include <linux/types.h> |
|---|
| 27 | | -#include <sound/asound.h> |
|---|
| 28 | +#endif |
|---|
| 28 | 29 | |
|---|
| 29 | 30 | /* |
|---|
| 30 | 31 | * ---- FX8010 ---- |
|---|
| .. | .. |
|---|
| 282 | 283 | #define EMU10K1_GPR_TRANSLATION_TREBLE 3 |
|---|
| 283 | 284 | #define EMU10K1_GPR_TRANSLATION_ONOFF 4 |
|---|
| 284 | 285 | |
|---|
| 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 | + |
|---|
| 285 | 300 | 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 */ |
|---|
| 287 | 302 | unsigned int vcount; /* visible count */ |
|---|
| 288 | 303 | unsigned int count; /* count of GPR (1..16) */ |
|---|
| 289 | 304 | unsigned short gpr[32]; /* GPR number(s) */ |
|---|
| .. | .. |
|---|
| 296 | 311 | |
|---|
| 297 | 312 | /* old ABI without TLV support */ |
|---|
| 298 | 313 | struct snd_emu10k1_fx8010_control_old_gpr { |
|---|
| 299 | | - struct snd_ctl_elem_id id; |
|---|
| 314 | + struct emu10k1_ctl_elem_id id; |
|---|
| 300 | 315 | unsigned int vcount; |
|---|
| 301 | 316 | unsigned int count; |
|---|
| 302 | 317 | unsigned short gpr[32]; |
|---|
| .. | .. |
|---|
| 310 | 325 | char name[128]; |
|---|
| 311 | 326 | |
|---|
| 312 | 327 | __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ |
|---|
| 313 | | - __u32 __user *gpr_map; /* initializers */ |
|---|
| 328 | + __u32 *gpr_map; /* initializers */ |
|---|
| 314 | 329 | |
|---|
| 315 | 330 | 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 */ |
|---|
| 317 | 332 | |
|---|
| 318 | 333 | 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 */ |
|---|
| 320 | 335 | |
|---|
| 321 | 336 | unsigned int gpr_list_control_count; /* count of GPR controls to list */ |
|---|
| 322 | 337 | 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 */ |
|---|
| 324 | 339 | |
|---|
| 325 | 340 | __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 */ |
|---|
| 328 | 343 | |
|---|
| 329 | 344 | __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 */ |
|---|
| 331 | 346 | }; |
|---|
| 332 | 347 | |
|---|
| 333 | 348 | struct snd_emu10k1_fx8010_tram { |
|---|
| .. | .. |
|---|
| 370 | 385 | #define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) |
|---|
| 371 | 386 | #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) |
|---|
| 372 | 387 | #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; |
|---|
| 380 | 388 | |
|---|
| 381 | 389 | #endif /* _UAPI__SOUND_EMU10K1_H */ |
|---|