mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +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,14 +370,16 @@ 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;
|
||||||
AUDIO_SAMP_RATE_11K |
|
*ptr = AUDIO_SAMP_RATE_8K |
|
||||||
AUDIO_SAMP_RATE_16K |
|
AUDIO_SAMP_RATE_11K |
|
||||||
AUDIO_SAMP_RATE_22K |
|
AUDIO_SAMP_RATE_12K |
|
||||||
AUDIO_SAMP_RATE_24K |
|
AUDIO_SAMP_RATE_16K |
|
||||||
AUDIO_SAMP_RATE_32K |
|
AUDIO_SAMP_RATE_22K |
|
||||||
AUDIO_SAMP_RATE_44K |
|
AUDIO_SAMP_RATE_24K |
|
||||||
AUDIO_SAMP_RATE_48K;
|
AUDIO_SAMP_RATE_32K |
|
||||||
|
AUDIO_SAMP_RATE_44K |
|
||||||
|
AUDIO_SAMP_RATE_48K;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user