sim/alsa: add AUDIO_FMT_PCM query handler

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
This commit is contained in:
qiaohaijiao1 2023-06-26 15:00:00 +08:00 committed by Xiang Xiao
parent ce6330bf29
commit 31da767cfc

View File

@ -340,6 +340,17 @@ static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
caps->ac_controls.b[0] = AUDIO_SUBFMT_PCM_MP3;
caps->ac_controls.b[1] = AUDIO_SUBFMT_END;
break;
case AUDIO_FMT_PCM:
if (priv->offload)
{
caps->ac_controls.b[0] = AUDIO_SUBFMT_END;
}
else
{
caps->ac_controls.b[0] = AUDIO_SUBFMT_PCM_S16_LE;
caps->ac_controls.b[1] = AUDIO_SUBFMT_END;
}
break;
default:
caps->ac_controls.b[0] = AUDIO_SUBFMT_END;
break;