From 5f3aa40f1048d3316dacdc1db1b581ebadab5b7f Mon Sep 17 00:00:00 2001 From: ligd Date: Wed, 10 Nov 2021 23:36:37 +0800 Subject: [PATCH] audio/audio_comp.c: capability should use collections Signed-off-by: ligd --- audio/audio_comp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio/audio_comp.c b/audio/audio_comp.c index 648b400d39..74939be602 100644 --- a/audio/audio_comp.c +++ b/audio/audio_comp.c @@ -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; } }