diff options
| author | HiFiPHile <[email protected]> | 2026-08-26 11:33:46 +0200 |
|---|---|---|
| committer | HiFiPHile <[email protected]> | 2026-08-27 10:34:32 +0200 |
| commit | 804e54f9e59dc2b6442844d1194581e2b39c35b1 (patch) | |
| tree | 9ff249b76e624a3edfcebeb41bb9df98d4eee5fd /src/class/audio/audio_host.c | |
| parent | d57637f9c251135a1ab6791a627aaf195f1e84a7 (diff) | |
audio: preserve descriptor sample-rate entries
Retain every valid discrete rate in descriptor order, including duplicate public tuples. Alternate settings remain independently selectable without disruptive validation or deduplication during enumeration.
Signed-off-by: HiFiPHile <[email protected]>
Diffstat (limited to 'src/class/audio/audio_host.c')
| -rw-r--r-- | src/class/audio/audio_host.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/class/audio/audio_host.c b/src/class/audio/audio_host.c index 8caecf3d2..a28cad156 100644 --- a/src/class/audio/audio_host.c +++ b/src/class/audio/audio_host.c @@ -994,29 +994,6 @@ static const uint8_t *audioh_parse_as(audioh_interface_t *p_audio, const tusb_de itf_num, alt, ep->ep_size); continue; } - // Skip duplicate configurations already retained from another AS or from - // an earlier frequency entry in this descriptor. - bool duplicate = false; - for (uint8_t as_idx = 0; as_idx < stream->as_count && !duplicate; as_idx++) { - const audioh_as_config_t *existing = &stream->as[as_idx]; - if (existing->format == (uint8_t)format && existing->channels == num_channels) { - for (uint8_t rate_idx = 0; rate_idx < existing->sample_rate_count; rate_idx++) { - if (existing->sample_rate[rate_idx] == sample_rate) { - duplicate = true; - break; - } - } - } - } - for (uint8_t rate_idx = 0; rate_idx < as_config.sample_rate_count && !duplicate; rate_idx++) { - if (as_config.sample_rate[rate_idx] == sample_rate) { - duplicate = true; - } - } - if (duplicate) { - continue; - } - as_config.sample_rate[as_config.sample_rate_count++] = sample_rate; } |
