diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-07-15 10:31:01 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-15 10:31:01 -0400 |
commit | 0cea76f3393782d67ccea8f07e9abf341bc4f60e (patch) | |
tree | ae39e2be9579d9a3dd2dbca041e994ea6d41d071 /include/sound/control.h | |
parent | cd3de83f147601356395b57a8673e9c5ff1e59d1 (diff) |
ALSA: control: Define SNDRV_CTL_TLV_OP_* constants
Instead of hard-coded magic numbers, define constants for op_flag to
tlv callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/control.h')
-rw-r--r-- | include/sound/control.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sound/control.h b/include/sound/control.h index 5358892b1b39..042613938a1d 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -31,10 +31,15 @@ typedef int (snd_kcontrol_info_t) (struct snd_kcontrol * kcontrol, struct snd_ct | |||
31 | typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); | 31 | typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); |
32 | typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); | 32 | typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); |
33 | typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol, | 33 | typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol, |
34 | int op_flag, /* 0=read,1=write,-1=command */ | 34 | int op_flag, /* SNDRV_CTL_TLV_OP_XXX */ |
35 | unsigned int size, | 35 | unsigned int size, |
36 | unsigned int __user *tlv); | 36 | unsigned int __user *tlv); |
37 | 37 | ||
38 | enum { | ||
39 | SNDRV_CTL_TLV_OP_READ = 0, | ||
40 | SNDRV_CTL_TLV_OP_WRITE = 1, | ||
41 | SNDRV_CTL_TLV_OP_CMD = -1, | ||
42 | }; | ||
38 | 43 | ||
39 | struct snd_kcontrol_new { | 44 | struct snd_kcontrol_new { |
40 | snd_ctl_elem_iface_t iface; /* interface identifier */ | 45 | snd_ctl_elem_iface_t iface; /* interface identifier */ |