3. dt-blob.bin
Note: Users of the I2S HAT card operating in slave mode can skip this content.
3.1 Replace dt-blob.bin
symphonic-mpd has dt-blob.bin in the boot directory. This is a file to add a function to generate PLL (Phase Locked Loop) optimized for music playback to raspberry pi. There is a difference in the PLL value to be optimized between master mode and slave mode. However, dt-blob.bin does not have a function to switch between master mode and slave mode, so it is necessary to switch the dt-blob.bin file manually. For that purpose, three types of dt-blob.bin, specifically, dt-blob.bin, dt-blob.bin.master, and dt-blob.bin.slave are arranged. The default dt-blob.bin is for slave mode.
Therefore, it is not necessary to replace dt-blob.bin when using an I2S HAT card for slave mode.
There is no problem even if I2S HAT card for master mode is driven by dt-blob.bin for slave. Even if you are a user of I2S HAT card for master mode, you can skip this step. However, by replacing dt-blob.bin with dt-blob.bin.master, you can expect some improvement in playback sound quality.
The replacement method is easy. Mount the micro SD card for boot on the PC. Rename or delete dt-blob.bin that is visible in the micro SD card. Then rename dt-blob.bin.master to dt-blob.bin.
Here is a brief description of raspberry pi’s PLL (Phase Locked Loop). Five types of PLL are connected to the raspberry pi’s clock (19.2MHz) to provide clocks for various functions.
Each of the five PLLs is used as follows:
PLLA … 未使用 (unused)
PLLB …CPU のクロックのみに使用(可変) (Used only for CPU clock, variable)
PLLC …GPU やSDRAM等のクロックに使用(可変)(Used for GPU and SDRAM clocks, variable)
PLLD …I2S 等で使用(デフォルトで500MHz) (Used by I2S etc., 500MHz by default)
PLLH …HDMI 等で使用
In raspberry pi, 44.1KHz / 48KHz BCLK used in I2S is usually calculated from PLLD (500MHz) using a fractional frequency division PLL and generated by the MASH algorithm.
For example, when generating BCLK 2,822,400Hz of 44.1KHz sound source, two frequencies of 2,808,988Hz and 2,824,858Hz are combined at a specific ratio, and 2,822,400Hz is generated as BCLK from the average.
However, the clock generated in this way is not suitable for music playback. Therefore, in symphonic-mpd, the MASH operation is turned off, and the PLL frequency is obtained from the common multiple of 44.1KHz / 48KHz and the oscillator (19.2MHz). In addition, the 44.1KHz PLL and the 48KHz PLL are automatically switched during playback. The default dt-blob.bin, which is for slave mode, has made this possible and has succeeded in improving clock quality.
Do not replace dt-blob.bin with dt-blob.bin.master when using an I2S HAT card that operates in slave mode.
In dt-blob.bin.master, unnecessary PLL settings are turned off. When the slave mode I2S HAT is driven in this state, the PLL frequency is completely different from the ideal one, which causes problems with playback speed and pitch.
In addition, because the operation cycle of the RTDM driver is shifted, the timer offset is frequently adjusted, and it is far from optimal operation. As a result, the sound quality is greatly reduced.
For that reason, the dt-blob.bin.master file should not be used for I2S HAT cards operating in slave mode.
3.2 Explanation of slave mode and master mode
Many I2S HAT cards operate in slave mode. The term "slave" here means that the digital data supplied from the Raspberry Pi to the I2S HAT card is supplied based on the clock generated by the Raspberry Pi.
On the other hand, some I2S HAT cards have their own oscillators, and can supply the clock generated by the oscillator on the I2S HAT card to the Raspberry Pi. These I2S HAT cards are supplied with data from the Raspberry Pi based on the clock generated by themselves. Such a driving method is called “master mode”.