diff --git a/audio/audio_comp.c b/audio/audio_comp.c index 74939be602..fd93121d30 100644 --- a/audio/audio_comp.c +++ b/audio/audio_comp.c @@ -178,7 +178,7 @@ static int audio_comp_getcaps(FAR struct audio_lowerhalf_s *dev, int type, int ret = -ENOTTY; int i; - caps->ac_channels = 0; + caps->ac_channels = UINT8_MAX; caps->ac_format.hw = UINT16_MAX; caps->ac_controls.w = UINT32_MAX; @@ -200,7 +200,7 @@ static int audio_comp_getcaps(FAR struct audio_lowerhalf_s *dev, int type, break; } - if (caps->ac_channels < dup.ac_channels) + if (caps->ac_channels > dup.ac_channels) { caps->ac_channels = dup.ac_channels; }