Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 583a0467 authored by Honghao Liu's avatar Honghao Liu
Browse files

ASoC: msm: Add machine driver for APQ8096 based automotive platform



Add machine driver for APQ8096 based automotive platform. The machine
driver is based on msm8996.c. On top of it, add support for TDM which
is used for data transfer between APQ8096 and the automotive COODEC HW,
the changes include add TDM backend and frontend DAI links as well as
kcontrol functions to configure TDM channels.

Change-Id: Id4e8931c06de9cf20f8012d84cd808f919020174
Signed-off-by: default avatarHonghao Liu <honghaol@codeaurora.org>
parent 64322367
Loading
Loading
Loading
Loading
+71 −0
Original line number Diff line number Diff line
@@ -1868,3 +1868,74 @@ Example:
		qcom,aux-codec = <&stub_codec>;
	};

* APQ8096 Automotive ASoC Machine driver

Required properties:
- compatible : "qcom,apq8096-asoc-snd-auto" for auto codec and
		node is "sound-auto"
- qcom,model : The user-visible name of this sound card.
- asoc-platform: This is phandle list containing the references to platform device
		nodes that are used as part of the sound card dai-links.
- asoc-platform-names: This property contains list of platform names. The order of
		the platform names should match to that of the phandle order
		given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
		that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
		cpu dai names should match to that of the phandle order given
		in "asoc-cpu". The cpu names are in the form of "%s.%d" form,
		where the id (%d) field represents the back-end AFE port id that
		this CPU dai is associated with.
- asoc-codec: This is phandle list containing the references to codec dai device
		nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
		codec dai names should match to that of the phandle order given
		in "asoc-codec".

Example:

	sound-auto {
		compatible = "qcom,apq8096-asoc-snd-auto";
		qcom,model = "apq8096-auto-snd-card";

		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&compr>;
		asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
				"msm-pcm-dsp.2", "msm-voip-dsp",
				"msm-pcm-voice", "msm-pcm-loopback",
				"msm-compress-dsp", "msm-pcm-hostless",
				"msm-pcm-afe", "msm-lsm-client",
				"msm-pcm-routing", "msm-compr-dsp";
		asoc-cpu = <&dai_pri_auxpcm>, <&dai_sec_auxpcm>, <&dai_hdmi>,
				<&dai_mi2s>, <&dai_mi2s_quat>,
				<&afe_pcm_rx>, <&afe_pcm_tx>,
				<&afe_proxy_rx>, <&afe_proxy_tx>,
				<&incall_record_rx>, <&incall_record_tx>,
				<&incall_music_rx>, <&incall_music2_rx>,
				<&dai_tert_tdm_rx_0>, <&dai_tert_tdm_rx_1>,
				<&dai_tert_tdm_rx_2>, <&dai_tert_tdm_rx_3>,
				<&dai_tert_tdm_tx_0>, <&dai_tert_tdm_tx_1>,
				<&dai_tert_tdm_tx_2>, <&dai_tert_tdm_tx_3>,
				<&dai_quat_tdm_rx_0>, <&dai_quat_tdm_rx_1>,
				<&dai_quat_tdm_rx_2>, <&dai_quat_tdm_rx_3>,
				<&dai_quat_tdm_tx_0>, <&dai_quat_tdm_tx_1>,
				<&dai_quat_tdm_tx_2>, <&dai_quat_tdm_tx_3>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-auxpcm.2",
				"msm-dai-q6-hdmi.8",
				"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
				"msm-dai-q6-dev.224", "msm-dai-q6-dev.225",
				"msm-dai-q6-dev.241", "msm-dai-q6-dev.240",
				"msm-dai-q6-dev.32771", "msm-dai-q6-dev.32772",
				"msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770",
				"msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36898",
				"msm-dai-q6-tdm.36900", "msm-dai-q6-tdm.36902",
				"msm-dai-q6-tdm.36897", "msm-dai-q6-tdm.36899",
				"msm-dai-q6-tdm.36901", "msm-dai-q6-tdm.36903",
				"msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36914",
				"msm-dai-q6-tdm.36916", "msm-dai-q6-tdm.36918",
				"msm-dai-q6-tdm.36913", "msm-dai-q6-tdm.36915",
				"msm-dai-q6-tdm.36917", "msm-dai-q6-tdm.36919";
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
	};
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ snd-soc-msm8994-objs := msm8994.o
obj-$(CONFIG_SND_SOC_MSM8994) += snd-soc-msm8994.o

# for MSM8996 sound card driver
snd-soc-msm8996-objs := msm8996.o
snd-soc-msm8996-objs := msm8996.o apq8096-auto.o
obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-msm8996.o

# for MSM 8x16/8952 sound card driver