headphones/firmware/tools
ploopyco 009dd2e698
Headphones toolbox (#18) (#19)
* Initial, very incomplete, toolbox interface.

* Refactored things to move ugly structs out of run.c. Experimental config structures.

* Extra comments.

* Continuted to implement communication protocol. Can now validate Filter Configuration Structures

* Config save/load works.

* Reverse stereo and preamp.

* Fixes and minor features.

* Codec confiuguration implementation.

* Support sending configs back to the client.

* Fix broken audio when changing a filter type.

* Fix broken audio when changing a filter type.

* Try to create a build workflow

* Report version info

* Disable interrupts while reconfiguring, reset all filters if one has a type change.

* Reset memory on filter type change..

* Shuffle cores.

* Slight refactoring.

* Only update a filter if something has changed.

* Re-order PCM3060 init i2c commands.

* Fixed point math tweaks. Treat samples as normalized (-1..1), this doesnt change much, except the filter coefficients get way more bits of precision.

* Allow the user to create fully custom filters.

* Increase the max fix16 size to -32.0..32.0 as it seems it is possible to create coefficients which are >16.

---------

Co-authored-by: George Norton <george_norton_uk@hotmail.com>
Co-authored-by: George Norton <30636555+george-norton@users.noreply.github.com>
2023-07-14 14:53:04 -04:00
..
CMakeLists.txt Headphones toolbox (#18) (#19) 2023-07-14 14:53:04 -04:00
README.md PCM3060 volume control (#13) 2023-05-17 15:13:24 -04:00
filter_test.c Headphones toolbox (#18) (#19) 2023-07-14 14:53:04 -04:00
reboot_bootloader.py Basic support for rebooting into the bootloader. (#10) 2023-04-13 09:08:59 -04:00

README.md

filter_test

This is a basic utility for testing the Ploopy headphones filtering routines on a PC.

Usage

Find a source file and use ffmpeg to convert it to 16bit stereo PCM samples:

ffmpeg -i <input file> -vn -f s16le -acodec pcm_s16le input.pcm

Run filter_test to process the PCM samples. The filter_test program takes two arguments an input file and an output file:

./filter_test input.pcm output.pcm

You can listen to the PCM files using ffplay (which is usually included with ffmpeg):

ffplay -f s16le -ar 48000 -ac 2 output.pcm

If there are no obvious problems, go ahead and flash your firmware.

reboot_bootloader.py

If your Ploopy Headphones firmware is new enough, it has support for a USB vendor command that will cause the RP2040 to reboot into the bootloader. This will enable you to update the firmware without having to remove the case and short the pins on the board.

Usage

Connect the Ploopy headphones DAC and run:

./reboot_bootloader.py

You will need python3 and the pyusb module. If you get a permission denied error you may need to configure your udev rules, or run the script with administrator privileges.