mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
hcontrol: use position offset macro of TLV data
A series of SNDRV_CTL_TLVO_XXX macro was introduced for position offset of TLV data. This commit applies a code optimization. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
f61193c96c
commit
33f0888f0d
1 changed files with 2 additions and 2 deletions
|
|
@ -870,7 +870,7 @@ int snd_hctl_elem_tlv_write(snd_hctl_elem_t *elem, const unsigned int *tlv)
|
|||
{
|
||||
assert(elem);
|
||||
assert(tlv);
|
||||
assert(tlv[1] >= 4);
|
||||
assert(tlv[SNDRV_CTL_TLVO_LEN] >= 4);
|
||||
return snd_ctl_elem_tlv_write(elem->hctl->ctl, &elem->id, tlv);
|
||||
}
|
||||
|
||||
|
|
@ -886,7 +886,7 @@ int snd_hctl_elem_tlv_command(snd_hctl_elem_t *elem, const unsigned int *tlv)
|
|||
{
|
||||
assert(elem);
|
||||
assert(tlv);
|
||||
assert(tlv[1] >= 4);
|
||||
assert(tlv[SNDRV_CTL_TLVO_LEN] >= 4);
|
||||
return snd_ctl_elem_tlv_command(elem->hctl->ctl, &elem->id, tlv);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue