Skip to content

Commit

Permalink
Reduce uac2_headset max sample rate for better compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
HiFiPhile committed Apr 5, 2024
1 parent a4848b5 commit 34f3340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 1 addition & 5 deletions examples/device/uac2_headset/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@
//--------------------------------------------------------------------+

// List of supported sample rates
#if defined(__RX__)
const uint32_t sample_rates[] = {44100, 48000};
#else
const uint32_t sample_rates[] = {44100, 48000, 88200, 96000};
#endif
const uint32_t sample_rates[] = {44100, 48000};

uint32_t current_sample_rate = 44100;

Expand Down
8 changes: 3 additions & 5 deletions examples/device/uac2_headset/src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,9 @@ extern "C" {
#define CFG_TUD_AUDIO_FUNC_1_N_FORMATS 2

// Audio format type I specifications
#if defined(__RX__)
#define CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE 48000 // 16bit/48kHz is the best quality for Renesas RX
#else
#define CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE 96000 // 24bit/96kHz is the best quality for full-speed, high-speed is needed beyond this
#endif
/* 24bit/48kHz is the best quality for headset or 24bit/96kHz for 2ch speaker,
high-speed is needed beyond this */
#define CFG_TUD_AUDIO_FUNC_1_MAX_SAMPLE_RATE 48000
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_TX 1
#define CFG_TUD_AUDIO_FUNC_1_N_CHANNELS_RX 2

Expand Down

0 comments on commit 34f3340

Please sign in to comment.