diff options
| -rw-r--r-- | include/uapi/sound/firewire.h | 5 | ||||
| -rw-r--r-- | sound/firewire/tascam/tascam-hwdep.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/sound/firewire.h b/include/uapi/sound/firewire.h index b9bc4bb1756b..012f81bf4750 100644 --- a/include/uapi/sound/firewire.h +++ b/include/uapi/sound/firewire.h | |||
| @@ -66,6 +66,7 @@ union snd_firewire_event { | |||
| 66 | #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) | 66 | #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info) |
| 67 | #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) | 67 | #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9) |
| 68 | #define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) | 68 | #define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa) |
| 69 | #define SNDRV_FIREWIRE_IOCTL_TASCAM_STATE _IOR('H', 0xfb, struct snd_firewire_tascam_state) | ||
| 69 | 70 | ||
| 70 | #define SNDRV_FIREWIRE_TYPE_DICE 1 | 71 | #define SNDRV_FIREWIRE_TYPE_DICE 1 |
| 71 | #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 | 72 | #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2 |
| @@ -90,4 +91,8 @@ struct snd_firewire_get_info { | |||
| 90 | 91 | ||
| 91 | #define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64 | 92 | #define SNDRV_FIREWIRE_TASCAM_STATE_COUNT 64 |
| 92 | 93 | ||
| 94 | struct snd_firewire_tascam_state { | ||
| 95 | __be32 data[SNDRV_FIREWIRE_TASCAM_STATE_COUNT]; | ||
| 96 | }; | ||
| 97 | |||
| 93 | #endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */ | 98 | #endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */ |
diff --git a/sound/firewire/tascam/tascam-hwdep.c b/sound/firewire/tascam/tascam-hwdep.c index 4e4c1e9020e8..a80397116c48 100644 --- a/sound/firewire/tascam/tascam-hwdep.c +++ b/sound/firewire/tascam/tascam-hwdep.c | |||
| @@ -123,6 +123,14 @@ static int hwdep_unlock(struct snd_tscm *tscm) | |||
| 123 | return err; | 123 | return err; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | static int tscm_hwdep_state(struct snd_tscm *tscm, void __user *arg) | ||
| 127 | { | ||
| 128 | if (copy_to_user(arg, tscm->state, sizeof(tscm->state))) | ||
| 129 | return -EFAULT; | ||
| 130 | |||
| 131 | return 0; | ||
| 132 | } | ||
| 133 | |||
| 126 | static int hwdep_release(struct snd_hwdep *hwdep, struct file *file) | 134 | static int hwdep_release(struct snd_hwdep *hwdep, struct file *file) |
| 127 | { | 135 | { |
| 128 | struct snd_tscm *tscm = hwdep->private_data; | 136 | struct snd_tscm *tscm = hwdep->private_data; |
| @@ -147,6 +155,8 @@ static int hwdep_ioctl(struct snd_hwdep *hwdep, struct file *file, | |||
| 147 | return hwdep_lock(tscm); | 155 | return hwdep_lock(tscm); |
| 148 | case SNDRV_FIREWIRE_IOCTL_UNLOCK: | 156 | case SNDRV_FIREWIRE_IOCTL_UNLOCK: |
| 149 | return hwdep_unlock(tscm); | 157 | return hwdep_unlock(tscm); |
| 158 | case SNDRV_FIREWIRE_IOCTL_TASCAM_STATE: | ||
| 159 | return tscm_hwdep_state(tscm, (void __user *)arg); | ||
| 150 | default: | 160 | default: |
| 151 | return -ENOIOCTLCMD; | 161 | return -ENOIOCTLCMD; |
| 152 | } | 162 | } |
