mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
audio: add 12K support in sim_alsa driver
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
7355629d19
commit
618a51fa84
@@ -309,6 +309,7 @@ static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
|
|||||||
struct audio_caps_s *caps)
|
struct audio_caps_s *caps)
|
||||||
{
|
{
|
||||||
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
|
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
|
||||||
|
uint16_t *ptr;
|
||||||
long val;
|
long val;
|
||||||
|
|
||||||
caps->ac_format.hw = 0;
|
caps->ac_format.hw = 0;
|
||||||
@@ -369,8 +370,10 @@ static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
|
|||||||
|
|
||||||
/* Report the Sample rates we support */
|
/* Report the Sample rates we support */
|
||||||
|
|
||||||
caps->ac_controls.b[0] = AUDIO_SAMP_RATE_8K |
|
ptr = (uint16_t *)caps->ac_controls.b;
|
||||||
|
*ptr = AUDIO_SAMP_RATE_8K |
|
||||||
AUDIO_SAMP_RATE_11K |
|
AUDIO_SAMP_RATE_11K |
|
||||||
|
AUDIO_SAMP_RATE_12K |
|
||||||
AUDIO_SAMP_RATE_16K |
|
AUDIO_SAMP_RATE_16K |
|
||||||
AUDIO_SAMP_RATE_22K |
|
AUDIO_SAMP_RATE_22K |
|
||||||
AUDIO_SAMP_RATE_24K |
|
AUDIO_SAMP_RATE_24K |
|
||||||
|
|||||||
Reference in New Issue
Block a user