Realtek I2C codec datasheet

Nicolas Huillard nicolas at huillard.net
Fri Jul 1 16:23:53 CEST 2016


Le vendredi 01 juillet 2016 à 13:45 +0100, Paul Mansfield a écrit :
> The way I think sound works is this...
> 
> looking at this diagram:
> http://cdn.arstechnica.net/wp-content/uploads/2013/09/Screen-Shot-2013-09-13-at-6.32.07-PM.jpg
> 
> the baytrail has the subsystem required for streaming digital audio,
> in the I2S format (basically just a way of framing a bit stream). It
> spits out this I2S stream to the outside world, and it's up to the
> computer's implementers to do with it what they want.
> 
> Some devices will have a simple DAC and amp, others will have mixers
> and switches to route audio to bluetooth, HDMI or speaker etc.

On the SharksCove board, I2S is output in parallel from the SoC to both
the codec AND the BT chip. This may or may not be the same on the TCM
because the Wifi/BT chip is different here.

> Toshiba chose the Realtek 5640 codec in our case, and I just stumbled
> on its datasheet:
> http://www.datasheetbank.com/datasheet/Realtek/ALC5640.html
> 
> The datasheet says the Realtek codec is entirely controlled by I2C.
> I2C is a *slow* control bus, a bit like USB. I don't know if any GPIOs
> are also used to control the audio circuits, such as headphone switch
> detection. This is where having a wiring diagram of the Click Mini
> would help to verify what I2C and GPIOs are connected to the audio
> circuits.
> 
> Nicholas has pored over the Sharks Cove specs and thinks the TCM is
> pretty similar, so hopefully we'll make some progress into making
> sound work.

The Sharks Cove board have the same ALC5640 chip. The jack detection
switch is apparently directed to the codec AND the SoC through a GPIO.
Labelling is bizarre, as the GPIO pin is said to be bidirectionnal (maybe
the SoC can read the actual hardware switch state just like the codec,
and it can also fake the hardware switch to tell something to the codec).
There is also a digital switch chip which connects the SoC to
either the codec, or a header on the board (this is Sharks Cove
specific). Look for JACK_DET_N in the PDF.
SoC GPIOs are also involved with volume up/down buttons. The volume level
information should pass from GPIO to the software, then through the I2C,
to the codec.

-- 
Nicolas Huillard



More information about the click mailing list