audio/audio_comp.c: capability should use collections
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
c2fd66bfab
commit
5f3aa40f10
1 changed files with 4 additions and 4 deletions
|
@ -179,8 +179,8 @@ static int audio_comp_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
|
|||
int i;
|
||||
|
||||
caps->ac_channels = 0;
|
||||
caps->ac_format.hw = 0;
|
||||
caps->ac_controls.w = 0;
|
||||
caps->ac_format.hw = UINT16_MAX;
|
||||
caps->ac_controls.w = UINT32_MAX;
|
||||
|
||||
for (i = 0; i < priv->count; i++)
|
||||
{
|
||||
|
@ -205,8 +205,8 @@ static int audio_comp_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
|
|||
caps->ac_channels = dup.ac_channels;
|
||||
}
|
||||
|
||||
caps->ac_format.hw |= dup.ac_format.hw;
|
||||
caps->ac_controls.w |= dup.ac_controls.w;
|
||||
caps->ac_format.hw &= dup.ac_format.hw;
|
||||
caps->ac_controls.w &= dup.ac_controls.w;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue