That's what I meant with modding the Pi.Gert van Loo wrote:Or you could solder a wire to one of the PCM/I2S pins going to the 'revision' resistors.
cheers
Dariush
That's what I meant with modding the Pi.Gert van Loo wrote:Or you could solder a wire to one of the PCM/I2S pins going to the 'revision' resistors.
Hi Gert,Gert van Loo wrote:I have to ask about that one. I am not familiar with it.-> PCM_MCLK: is a fixed clock at 3.072Mhz (really fixed?)
Yes, that's righterror404 wrote:MCLK - This is the DAC master clock, depending on the DAC you choose the requirements may be different. Systems using I2S to transfer digital audio data don't usually require it (e.g. to convert to SPDIF). It's typically an oversampled clock at 256 x Fs (ie. 11.289.600Hz for 44.1KHz). It's typically the clock source for all other clocks in the system.
I can't find any info about source for PCM_MCLK in datasheet by Broadcomerror404 wrote:According to the datasheet, this is an input in the Pi implementation, and can be used to generate the other clocks when the Pi is a clock master. It shouldn't be required if the Pi is a slave.
Actually upon re-reading this section, it sounds to me like this is likely to be an internal clock source coming from the clock generation blocks, which are not defined in this datasheet. Definitely sounds like it's the serial bit clock though, not the DAC master clock, so I would assume that you'll need to generate the bit clock from MCLK yourself and inject it at PCM_CLK with the Pi configured as a clock slave. In a normal application I guess you could run the master clock directly into the SoC's clock architecture and generate all the I2S clocks internally (we don't have the docs to be able to do this, even if we had the hardware flexibility), but I think in this case you'll have to generate at least the bit clock yourself. Reads like the Pi can divide that down automatically by your selected bit depth to give you LRCLK though, that's handy.In clock master mode (CLKM=0), the PCM_CLK is an output and is driven from the
PCM_MCLK clock input.
In clock slave mode (CLKM=1), the PCM_CLK is an input, supplied by some external clock
source.
So I'm here and ask about iterror404 wrote:Actually upon re-reading this section, it sounds to me like this is likely to be an internal clock source coming from the clock generation blocks, which are not defined in this datasheet.
BCLK is usually a derivative of MCLK (as I know about I2S module in other microcontrollers)error404 wrote: Definitely sounds like it's the serial bit clock though, not the DAC master clock, so I would assume that you'll need to generate the bit clock from MCLK yourself and inject it at PCM_CLK with the Pi configured as a clock slave.
Code: Select all
*(i2s+2) = 31<<10 | 16; // bits 19:10 FLEN , 9:0 FSLEN 16
Code: Select all
*(i2s+4) = 1<<30 | 1<<14 //enable channel 1 & 2
| 8<<16 | 8 // channel 1 & 2 width
| 31<<20 | 15<4; // ch1 pos: 31, ch2 pos = bit 15
The PCM/I2S clock pin changes direction if you put the module interface into 'use external clock' mode.Chii wrote:....what's the input pin for the pi?
Hi Gert,Gert van Loo wrote:The PCM/I2S clock pin changes direction if you put the module interface into 'use external clock' mode.Chii wrote:....what's the input pin for the pi?
Hi!DogEars wrote:We've got the I2s interface woring with a Twisted Pair Buffalo DAC, as it doesn't require the master clock (MCLK) input. We're hoping to get it working with a cheaper DAC, hopefully with the Pi supplying the MCLK.
The LRCLK translates to the PCM_FS available via one of the tiny resistors not fitted to the Pi. see the attached image.
Hi DogEars, could you tell me what you think of the quality of the signal? My plan is to hook it up to a buffalo as well and I am wondering if this is the best way to do that. Thanks!DogEars wrote:We've got the I2s interface woring with a Twisted Pair Buffalo DAC, as it doesn't require the master clock (MCLK) input. We're hoping to get it working with a cheaper DAC, hopefully with the Pi supplying the MCLK.
The LRCLK translates to the PCM_FS available via one of the tiny resistors not fitted to the Pi. see the attached image.
Did you get this working?valtonia wrote: I know it's hard to diagnose from this description without seeing my code or anything, but can anyone think of anything obvious I'm missing?
Cheers,
A.
The coloured boxes for GPIO28 are clearly misplaced in that image. It should be:DogEars wrote:see the attached image.