Skip to content

Huge noise when playing 44100Hz mp3 in usb_audio_player example (IEC-299) #174

@eggfly

Description

@eggfly

Answers checklist.

  • I have read the component documentation ESP-IDF Components and the issue is not addressed there.
  • I am using target and esp-idf version as defined in component's idf_component.yml
  • I have searched the issue tracker for a similar issue and not found any related issue.

Which component are you using? If you choose Other, provide details in More Information.

Other

ESP-IDF version.

All versions including v5.4 or above

Development Kit.

All esp32s3 board with USB Host port connecting a usb audio decoder

Used Component version.

1.2.*

More Information.

I use this example https://github.com/espressif/esp-iot-solution/tree/master/examples/usb/host/usb_audio_player
and replace spiffs folder's 48K sample rate mp3 to a 44.1Khz mp3 song, And it plays with a large sound and only a little music sound in it.
With printing some log I finally found this is because the packet_size problem.

[BAD] 44100Hz's packet size = 44100 * 2 * 16 / 8 /1000 = 176.4 Upper integer number -> 177
[GOOD] 48000Hz's packet size = 48000 * 2 * 16 / 8 /1000 = 192 (It's integer)

So I write a workaround code:
eggfly@1cdd0c9
And it worked without noise!

But there's a assertion checking also need commented. So what's the full functional driver solution will be?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions