Just bit of information:
There are four internal MI2S hardware interfaces inside LPA_IF and two TLMM external
MI2S hardware interfaces. Also, there are two IO MUX controls that connect four internal
MI2S to internal audio codec and TLMM external MI2S.
It is possible to operate the external MI2S and the internal codec path at the same time.
-By default, the primary internal MI2S (SPKR path) and TER internal MI2S (MIC path)
are occupied by the internal codec.
-SEC internal MI2S can be used for external PA in Half-duplex mode (SPKR path only).
-QUAT internal MI2S can be used for external PA in Full-duplex mode (bi-directional).
To be more clear on your setup…
If you are connecting
GPIO110 as WS
GPIO113 as SCLK
GPIO114 as DATA
These pins belong to External Primary MI2S, comes from Mux of Internal Primary and Internal Secondary MI2S.
You should also notice that:
Primary MI2S is for only playback
Secondary MI2S supports only playback
Teritary MI2S supports only capture
Quatenary MI2S supports both playback and capture.
If you are connecting:
GPIO117 as WS
GPIO118 as SCLK
GPIO119 as DATA
These belong to External Secondary MI2S, this is muxed with both internal Teritary I2S and internal Quatenary I2S
Currently on mainline [1] we already have a configuration which uses below setup.
Internal WCD Codec:
playback - Primary MI2S
capture - Ter MI2S
External HDMI Codec via External Secondary MI2S TLM:
playback - Quat MI2S
In MI2S Master mode, both bit clock and Word Select (WS) are provided by the MSM.
The WS clock is sourced from the bit clock and is set equal to sample rate. Clock
configuration is not required for WS.
In MI2S Slave mode, both bit clock and WS must be provided by a third-party MI2S
device.
The following is for QUAT internal MI2S as Slave mode and external PA as Master
mode LPASS_CSR_GP_IO_MUX_MIC_CTL(0x07702000) is configured to 0x00420000 for QUAT
internal MI2S as Slave mode
1> How to access the device tree in Linaro developer (not a desktop)?
A.You can find device tree sources in kernel.org at apq8016-sbc.dtsi « qcom « dts « boot « arm64 « arch - kernel/git/torvalds/linux.git - Linux kernel source tree
2> How to write a new node (in device tree) to define a new Sound Card to be use with ALSA aplay & arecord?
A> Currently mainline kernel.org already supports this. If you are in a custom apq8016 board, It totally depends on how you is your board setup. But if you are using DB410c, you should have this working.
3> How to capture the I2S signals on the LS expansion connector, simply hooking the logic analyzer probes on pins 16, 18, 20 and 27?
A> You should be able to see these signals if you play on internal codec, and once you add the primary TLMM pins in to pinctrl node , Having said that I never tried that.
4> The I2S over the LS expansion is always Master?
A> You can configure it as master or slave depending on who is suppling the mclk, these needs extra bits setup in mux registers.
thanks,
srini