On Wed, Sep 30, 2015 at 12:03 PM, Mark Brown broonie@kernel.org wrote:
On Mon, Sep 28, 2015 at 01:32:37PM -0700, Ben Zhang wrote:
The codec supports 4 channel recording with TDM on AIF1. This patch modifies the DAI capability to allow it.
Is there no code change needed to configure for the number of channels being used? I can't see any current handling of that, nor anything that looks like non-stereo handling in the DAPM graph.
No code change is needed. The current driver already supports 4 channel recording from DMICs using the Stereo1 path and the two Mono paths. rt5645_set_tdm_slot callback handles the I2S1 port config for TDM. It has been tested on a broadwell chromebook. An ASoC machine driver just needs to call snd_soc_dai_set_tdm_slot, and let ucm config file set the muxes/mixers for the following paths.
"DMIC L1"/"DMIC R1" -> "DMIC1" -> "Stereo1 DMIC Mux" -> "Stereo1 ADC L2 Mux"/"Stereo1 ADC R2 Mux" -> "Sto1 ADC MIXL"/"Sto1 ADC MIXR" -> "Stereo1 ADC MIXL"/"Stereo1 ADC MIXR" -> "IF_ADC1" -> "RT5650 IF1 ADC1 Swap Mux" -> "IF1 ADC" -> "RT5650 IF1 ADC Mux" -> "AIF1TX" -> "AIF1 Capture"
"DMIC L2" -> "Mono DMIC L Mux" -> "Mono ADC L2 Mux" -> "Mono ADC MIXL" -> "IF_ADC2" -> "RT5650 IF1 ADC2 Swap Mux" -> "IF1 ADC" -> "RT5650 IF1 ADC Mux" -> "AIF1TX" -> "AIF1 Capture"
"DMIC R2" -> "Mono DMIC R Mux" -> "Mono ADC R2 Mux" -> "Mono ADC MIXR" -> "IF_ADC2" -> "RT5650 IF1 ADC2 Swap Mux" -> "IF1 ADC" -> "RT5650 IF1 ADC Mux" -> "AIF1TX" -> "AIF1 Capture"