18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _UAPI_SOUND_FIREWIRE_H_INCLUDED 38c2ecf20Sopenharmony_ci#define _UAPI_SOUND_FIREWIRE_H_INCLUDED 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/ioctl.h> 68c2ecf20Sopenharmony_ci#include <linux/types.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* events can be read() from the hwdep device */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc 118c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e 128c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475 138c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c 148c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479 158c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistruct snd_firewire_event_common { 188c2ecf20Sopenharmony_ci unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */ 198c2ecf20Sopenharmony_ci}; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistruct snd_firewire_event_lock_status { 228c2ecf20Sopenharmony_ci unsigned int type; 238c2ecf20Sopenharmony_ci unsigned int status; /* 0/1 = unlocked/locked */ 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_cistruct snd_firewire_event_dice_notification { 278c2ecf20Sopenharmony_ci unsigned int type; 288c2ecf20Sopenharmony_ci unsigned int notification; /* DICE-specific bits */ 298c2ecf20Sopenharmony_ci}; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32)((__u16)~0) - 1) 328c2ecf20Sopenharmony_ci/* each field should be in big endian */ 338c2ecf20Sopenharmony_cistruct snd_efw_transaction { 348c2ecf20Sopenharmony_ci __be32 length; 358c2ecf20Sopenharmony_ci __be32 version; 368c2ecf20Sopenharmony_ci __be32 seqnum; 378c2ecf20Sopenharmony_ci __be32 category; 388c2ecf20Sopenharmony_ci __be32 command; 398c2ecf20Sopenharmony_ci __be32 status; 408c2ecf20Sopenharmony_ci __be32 params[0]; 418c2ecf20Sopenharmony_ci}; 428c2ecf20Sopenharmony_cistruct snd_firewire_event_efw_response { 438c2ecf20Sopenharmony_ci unsigned int type; 448c2ecf20Sopenharmony_ci __be32 response[0]; /* some responses */ 458c2ecf20Sopenharmony_ci}; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_cistruct snd_firewire_event_digi00x_message { 488c2ecf20Sopenharmony_ci unsigned int type; 498c2ecf20Sopenharmony_ci __u32 message; /* Digi00x-specific message */ 508c2ecf20Sopenharmony_ci}; 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_cistruct snd_firewire_event_motu_notification { 538c2ecf20Sopenharmony_ci unsigned int type; 548c2ecf20Sopenharmony_ci __u32 message; /* MOTU-specific bits. */ 558c2ecf20Sopenharmony_ci}; 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_cistruct snd_firewire_tascam_change { 588c2ecf20Sopenharmony_ci unsigned int index; 598c2ecf20Sopenharmony_ci __be32 before; 608c2ecf20Sopenharmony_ci __be32 after; 618c2ecf20Sopenharmony_ci}; 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_cistruct snd_firewire_event_tascam_control { 648c2ecf20Sopenharmony_ci unsigned int type; 658c2ecf20Sopenharmony_ci struct snd_firewire_tascam_change changes[0]; 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciunion snd_firewire_event { 698c2ecf20Sopenharmony_ci struct snd_firewire_event_common common; 708c2ecf20Sopenharmony_ci struct snd_firewire_event_lock_status lock_status; 718c2ecf20Sopenharmony_ci struct snd_firewire_event_dice_notification dice_notification; 728c2ecf20Sopenharmony_ci struct snd_firewire_event_efw_response efw_response; 738c2ecf20Sopenharmony_ci struct snd_firewire_event_digi00x_message digi00x_message; 748c2ecf20Sopenharmony_ci struct snd_firewire_event_tascam_control tascam_control; 758c2ecf20Sopenharmony_ci struct snd_firewire_event_motu_notification motu_notification; 768c2ecf20Sopenharmony_ci}; 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) 808c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) 818c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) 828c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state) 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_DICE 1 858c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 868c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_BEBOB 3 878c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_OXFW 4 888c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_DIGI00X 5 898c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_TASCAM 6 908c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_MOTU 7 918c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TYPE_FIREFACE 8 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_cistruct snd_firewire_get_info { 948c2ecf20Sopenharmony_ci unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */ 958c2ecf20Sopenharmony_ci unsigned int card; /* same as fw_cdev_get_info.card */ 968c2ecf20Sopenharmony_ci unsigned char guid[8]; 978c2ecf20Sopenharmony_ci char device_name[16]; /* device node in /dev */ 988c2ecf20Sopenharmony_ci}; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci/* 1018c2ecf20Sopenharmony_ci * SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming. 1028c2ecf20Sopenharmony_ci * Returns -EBUSY if the driver is already streaming. 1038c2ecf20Sopenharmony_ci */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci#define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_cistruct snd_firewire_tascam_state { 1088c2ecf20Sopenharmony_ci __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT]; 1098c2ecf20Sopenharmony_ci}; 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ci#endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */ 112