aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/control.h7
-rw-r--r--sound/core/control.c6
2 files changed, 9 insertions, 4 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
31typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); 31typedef int (snd_kcontrol_get_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
32typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol); 32typedef int (snd_kcontrol_put_t) (struct snd_kcontrol * kcontrol, struct snd_ctl_elem_value * ucontrol);
33typedef int (snd_kcontrol_tlv_rw_t)(struct snd_kcontrol *kcontrol, 33typedef 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
38enum {
39 SNDRV_CTL_TLV_OP_READ = 0,
40 SNDRV_CTL_TLV_OP_WRITE = 1,
41 SNDRV_CTL_TLV_OP_CMD = -1,
42};
38 43
39struct snd_kcontrol_new { 44struct snd_kcontrol_new {
40 snd_ctl_elem_iface_t iface; /* interface identifier */ 45 snd_ctl_elem_iface_t iface; /* interface identifier */
diff --git a/sound/core/control.c b/sound/core/control.c
index f0b0e14497a5..b9611344ff9e 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1406,11 +1406,11 @@ static long snd_ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg
1406 case SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS: 1406 case SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS:
1407 return snd_ctl_subscribe_events(ctl, ip); 1407 return snd_ctl_subscribe_events(ctl, ip);
1408 case SNDRV_CTL_IOCTL_TLV_READ: 1408 case SNDRV_CTL_IOCTL_TLV_READ:
1409 return snd_ctl_tlv_ioctl(ctl, argp, 0); 1409 return snd_ctl_tlv_ioctl(ctl, argp, SNDRV_CTL_TLV_OP_READ);
1410 case SNDRV_CTL_IOCTL_TLV_WRITE: 1410 case SNDRV_CTL_IOCTL_TLV_WRITE:
1411 return snd_ctl_tlv_ioctl(ctl, argp, 1); 1411 return snd_ctl_tlv_ioctl(ctl, argp, SNDRV_CTL_TLV_OP_WRITE);
1412 case SNDRV_CTL_IOCTL_TLV_COMMAND: 1412 case SNDRV_CTL_IOCTL_TLV_COMMAND:
1413 return snd_ctl_tlv_ioctl(ctl, argp, -1); 1413 return snd_ctl_tlv_ioctl(ctl, argp, SNDRV_CTL_TLV_OP_CMD);
1414 case SNDRV_CTL_IOCTL_POWER: 1414 case SNDRV_CTL_IOCTL_POWER:
1415 return -ENOPROTOOPT; 1415 return -ENOPROTOOPT;
1416 case SNDRV_CTL_IOCTL_POWER_STATE: 1416 case SNDRV_CTL_IOCTL_POWER_STATE: