DSP

DSP

DSP Binary

OffsetSizeDescription
0x00x100RSA Signature over bytes 0x100-0x300
0x1004Magic ('DSP1')
0x1044DSP binary size
0x1082Memory layout (bits 0-7: Program ram, 8-15: Data ram). Each bit represents a memory region. The region is always 0x8000 bytes in size (the first region starts at 0x1FF00000; the next is a 0x1FF08000 and so on). The HW registers for DSP memory configuration are CFG11_SHAREDWRAM_32K_DATA and CFG11_SHAREDWRAM_32K_CODE, located at physical address 0x10140000 (mapped to 0x1EC40000).
0x10C1?
0x10D1Special segment memory type (0=1=0x1FF00000(Program ram)+,2=0x1FF40000(Data ram)+)
0x10E1Num segments (must be 1-10)
0x10F1Flags:

DSP Memory Region

Note that everything below may vary depending on the exact DSP firmware used and different variants have slightly different behaviours.

The DSP communicates with the application through two shared memory areas 0x8000 bytes long each (at 0x1FF50000 and 0x1FF70000 respectively). The DSP alternates between the use of these two areas (much like a double-buffer). Each area has 15 structures within it. The location of these structures can be obtained by reading channel 2 of the DSP pipe. A list of structures in the order the DSP addresses are read from the pipe follows:

DSP Services

DSP service “dsp::DSP” #

Command HeaderDescription
0x00010040RecvData
0x00020040RecvDataIsReady
0x00030080SendData
0x00040040SendDataIsEmpty
0x000500C2SendFifoEx(unsigned short, unsigned short const*, unsigned int, unsigned int)
0x000600C0RecvFifoEx(unsigned short *, unsigned short, unsigned int, unsigned int)
0x00070040SetSemaphore
0x00080000GetSemaphore
0x00090040ClearSemaphore
0x000A0040MaskSemaphore
0x000B0000CheckSemaphoreRequest
0x000C0040ConvertProcessAddressFromDspDram
0x000D0082WriteProcessPipe
0x000E00C0ReadPipe
0x000F0080GetPipeReadableSize
0x001000C0ReadPipeIfPossible
0x001100C2LoadComponent
0x00120000UnloadComponent
0x00130082FlushDataCache
0x00140082InvalidateDCache
0x00150082RegisterInterruptEvents
0x00160000GetSemaphoreEventHandle
0x00170040SetSemaphoreMask
0x00180040GetPhysicalAddress
0x00190040GetVirtualAddress
0x001A0042SetIirFilterI2S1. Wrapper for cdc:DSP cmd 1
0x001B0042SetIirFilterI2S2. Wrapper for cdc:DSP cmd 2
0x001C0082SetIirFilterEQ. Wrapper for cdc:DSP cmd 3
0x001D00C0ReadMultiEx_SPI2(unsigned char, unsigned char, unsigned char *, unsigned char) (Wrapper for cdc:DSP cmd 4)
0x001E00C2WriteMultiEx_SPI2(unsigned char, unsigned char, unsigned char const*, unsigned char) (Wrapper for cdc:DSP cmd 5)
0x001F0000GetHeadphoneStatus
0x00200040ForceHeadphoneOut
0x00210000GetIsDspOccupied

This is the main service for playing audio. The CSND service can be used for playing audio as well, however most processes use this DSP service for playing audio. The DSP and CSND hardware can play audio simultaneously.