mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ALSA: control: queue TLV event for a set of user-defined element
In a design of user-defined element set, applications allow to change TLV data on the set. This operation doesn't only affects to a target element, but also to elements in the set. This commit generates TLV event for all of elements in the set when the TLV data is changed. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
fb8027ebfd
commit
da4288287b
@ -1117,6 +1117,8 @@ static int replace_user_tlv(struct snd_kcontrol *kctl, unsigned int __user *buf,
|
|||||||
{
|
{
|
||||||
struct user_element *ue = kctl->private_data;
|
struct user_element *ue = kctl->private_data;
|
||||||
unsigned int *container;
|
unsigned int *container;
|
||||||
|
struct snd_ctl_elem_id id;
|
||||||
|
int i;
|
||||||
int change;
|
int change;
|
||||||
|
|
||||||
if (size > 1024 * 128) /* sane value */
|
if (size > 1024 * 128) /* sane value */
|
||||||
@ -1138,7 +1140,10 @@ static int replace_user_tlv(struct snd_kcontrol *kctl, unsigned int __user *buf,
|
|||||||
ue->tlv_data = container;
|
ue->tlv_data = container;
|
||||||
ue->tlv_data_size = size;
|
ue->tlv_data_size = size;
|
||||||
|
|
||||||
snd_ctl_notify(ue->card, SNDRV_CTL_EVENT_MASK_TLV, &kctl->id);
|
for (i = 0; i < kctl->count; ++i) {
|
||||||
|
snd_ctl_build_ioff(&id, kctl, i);
|
||||||
|
snd_ctl_notify(ue->card, SNDRV_CTL_EVENT_MASK_TLV, &id);
|
||||||
|
}
|
||||||
|
|
||||||
return change;
|
return change;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user