Skip to content

Commit

Permalink
sound: control: actually allow TLV command access
Browse files Browse the repository at this point in the history
Creating a control with TLV_COMMAND access was not possible because
snd_ctl_new1() forgot to include it in the mask of allowable access
bits.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Feb 1, 2010
1 parent 7910b4a commit a75d7a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
(ncontrol->access & (SNDRV_CTL_ELEM_ACCESS_READWRITE|
SNDRV_CTL_ELEM_ACCESS_INACTIVE|
SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE|
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK));
SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE|
SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND|
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK));
kctl.info = ncontrol->info;
kctl.get = ncontrol->get;
kctl.put = ncontrol->put;
Expand Down

0 comments on commit a75d7a4

Please sign in to comment.