hifiberry / hifiberry-dsp

DSP toolkit
MIT License
138 stars 36 forks source link

Wrong PROGRAM_END_SIGNATURE? #63

Closed koalo closed 4 months ago

koalo commented 5 months ago

Hi, I just stumbled upon the PROGRAM_END_SIGNATURE in https://github.com/hifiberry/hifiberry-dsp/blob/bf432eb2695f92ff81d2c02e863734392481894b/hifiberrydsp/hardware/adau145x.py#L53 which is

02 C2 00 00 00 00 00 00 00 00 00 00

but the last bytes in https://github.com/hifiberry/hifiberry-dsp/blob/bf432eb2695f92ff81d2c02e863734392481894b/sample_files/xml/beocreate-default.xml#L123 are

02 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

What is the reason for that? Is this a bug or a feature?

Thanks, Florian

koalo commented 4 months ago

Oh I see, my mistake. It is the correct one for https://github.com/hifiberry/hifiberry-dsp/blob/bf432eb2695f92ff81d2c02e863734392481894b/sample_files/xml/beocreate-default.xml#L300

What is the background? Why are two different programs written in succession?

hifiberry commented 4 months ago

Why are two different programs written in succession?

A DSP profile basically consists of 2 DSP programs. One that write something to the DSP - in the "real" program and then the real program afterwards. This is due to the architecture of the DSP that requires a program to write the EEPROM.

koalo commented 4 months ago

That makes sense, thanks!