logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

scarlett2.h (1615B)


  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Focusrite Scarlett 2 Protocol Driver for ALSA
  4. * (including Scarlett 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, and
  5. * Clarett+ series products)
  6. *
  7. * Copyright (c) 2023 by Geoffrey D. Bennett <g at b4.vu>
  8. */
  9. #ifndef __UAPI_SOUND_SCARLETT2_H
  10. #define __UAPI_SOUND_SCARLETT2_H
  11. #include <linux/types.h>
  12. #include <linux/ioctl.h>
  13. #define SCARLETT2_HWDEP_MAJOR 1
  14. #define SCARLETT2_HWDEP_MINOR 0
  15. #define SCARLETT2_HWDEP_SUBMINOR 0
  16. #define SCARLETT2_HWDEP_VERSION \
  17. ((SCARLETT2_HWDEP_MAJOR << 16) | \
  18. (SCARLETT2_HWDEP_MINOR << 8) | \
  19. SCARLETT2_HWDEP_SUBMINOR)
  20. #define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF)
  21. #define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF)
  22. #define SCARLETT2_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF)
  23. /* Get protocol version */
  24. #define SCARLETT2_IOCTL_PVERSION _IOR('S', 0x60, int)
  25. /* Reboot */
  26. #define SCARLETT2_IOCTL_REBOOT _IO('S', 0x61)
  27. /* Select flash segment */
  28. #define SCARLETT2_SEGMENT_ID_SETTINGS 0
  29. #define SCARLETT2_SEGMENT_ID_FIRMWARE 1
  30. #define SCARLETT2_SEGMENT_ID_COUNT 2
  31. #define SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT _IOW('S', 0x62, int)
  32. /* Erase selected flash segment */
  33. #define SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT _IO('S', 0x63)
  34. /* Get selected flash segment erase progress
  35. * 1 through to num_blocks, or 255 for complete
  36. */
  37. struct scarlett2_flash_segment_erase_progress {
  38. unsigned char progress;
  39. unsigned char num_blocks;
  40. };
  41. #define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \
  42. _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress)
  43. #endif /* __UAPI_SOUND_SCARLETT2_H */