Skip to content

Commit

Permalink
audio:add 24K sample rate support
Browse files Browse the repository at this point in the history
Signed-off-by: shipei <[email protected]>
  • Loading branch information
shipei-xiaomi authored and xiaoxiang781216 committed Sep 14, 2023
1 parent 75999d2 commit 0beba02
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions arch/sim/src/sim/posix/sim_alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
AUDIO_SAMP_RATE_11K |
AUDIO_SAMP_RATE_16K |
AUDIO_SAMP_RATE_22K |
AUDIO_SAMP_RATE_24K |
AUDIO_SAMP_RATE_32K |
AUDIO_SAMP_RATE_44K |
AUDIO_SAMP_RATE_48K;
Expand Down
22 changes: 12 additions & 10 deletions include/nuttx/audio/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,20 @@
#define AUDIO_SAMP_RATE_11K 0x0002
#define AUDIO_SAMP_RATE_16K 0x0004
#define AUDIO_SAMP_RATE_22K 0x0008
#define AUDIO_SAMP_RATE_32K 0x0010
#define AUDIO_SAMP_RATE_44K 0x0020
#define AUDIO_SAMP_RATE_48K 0x0040
#define AUDIO_SAMP_RATE_88K 0x0080
#define AUDIO_SAMP_RATE_96K 0x0100
#define AUDIO_SAMP_RATE_128K 0x0200
#define AUDIO_SAMP_RATE_160K 0x0400
#define AUDIO_SAMP_RATE_172K 0x0800
#define AUDIO_SAMP_RATE_192K 0x1000
#define AUDIO_SAMP_RATE_24K 0x0010
#define AUDIO_SAMP_RATE_32K 0x0020
#define AUDIO_SAMP_RATE_44K 0x0040
#define AUDIO_SAMP_RATE_48K 0x0080
#define AUDIO_SAMP_RATE_88K 0x0100
#define AUDIO_SAMP_RATE_96K 0x0200
#define AUDIO_SAMP_RATE_128K 0x0400
#define AUDIO_SAMP_RATE_160K 0x0800
#define AUDIO_SAMP_RATE_172K 0x1000
#define AUDIO_SAMP_RATE_192K 0x2000
#define AUDIO_SAMP_RATE_DEF_ALL (AUDIO_SAMP_RATE_8K | AUDIO_SAMP_RATE_11K | \
AUDIO_SAMP_RATE_16K | AUDIO_SAMP_RATE_22K | \
AUDIO_SAMP_RATE_32K | AUDIO_SAMP_RATE_44K | \
AUDIO_SAMP_RATE_24K | AUDIO_SAMP_RATE_32K | \
AUDIO_SAMP_RATE_44K | AUDIO_SAMP_RATE_48K | \
AUDIO_SAMP_RATE_88K | AUDIO_SAMP_RATE_96K | \
AUDIO_SAMP_RATE_128K | AUDIO_SAMP_RATE_160K | \
AUDIO_SAMP_RATE_172K | AUDIO_SAMP_RATE_192K )
Expand Down

0 comments on commit 0beba02

Please sign in to comment.