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

Commit a28aa82d authored by Deven Patel's avatar Deven Patel Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: msm: Add apq8096 i2c machine driver



Machine driver holds target specific information for
apq8096 in i2c mode. DAI links and sound card for apq8096
are registered in machine driver.

CRs-fixed: 995013
Change-Id: I3a6cfaf09d03c374cecb12dbb728390bf041c1cc
Signed-off-by: default avatarDeven Patel <cdevenp@codeaurora.org>
parent 7abcab5e
Loading
Loading
Loading
Loading
+98 −0
Original line number Diff line number Diff line
@@ -1988,3 +1988,101 @@ Example:
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
	};

* APQ8096 I2C ASoC Machine driver

Required properties:
- compatible : "qcom,apq8096-asoc-snd-tasha-i2c"
- qcom,model : The user-visible name of this sound card.
- qcom,audio-routing : A list of the connections between audio components.
Each entry is a pair of strings, the first being the connection's sink,
the second being the connection's source.
- qcom,tomtom-mclk-clk-freq : Master clock value given to codec. Some WCD9XXX
codec can run at different mclk values. Mclk value can be 9.6MHz or 12.288MHz.
- pinctrl-names : pinctrl state names for each pin group configuration.
- pinctrl-x : defines pinctrl state for each pin group
- 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 {
		compatible = "qcom,apq8096-asoc-snd-tasha-i2c";
		qcom,model = "apq8096-tasha-i2c-snd-card";

		qcom,audio-routing =
			"AIF4 VI", "MCLK",
			"RX_BIAS", "MCLK",
			"MADINPUT", "MCLK",
			"AMIC2", "MIC BIAS2",
			"MIC BIAS2", "Headset Mic",
			"AMIC3", "MIC BIAS2",
			"MIC BIAS2", "ANCRight Headset Mic",
			"AMIC4", "MIC BIAS2",
			"MIC BIAS2", "ANCLeft Headset Mic",
			"AMIC5", "MIC BIAS3",
			"MIC BIAS3", "Handset Mic",
			"AMIC6", "MIC BIAS4",
			"MIC BIAS4", "Analog Mic6",
			"DMIC0", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic0",
			"DMIC1", "MIC BIAS1",
			"MIC BIAS1", "Digital Mic1",
			"DMIC2", "MIC BIAS3",
			"MIC BIAS3", "Digital Mic2",
			"DMIC3", "MIC BIAS3",
			"MIC BIAS3", "Digital Mic3",
			"DMIC4", "MIC BIAS4",
			"MIC BIAS4", "Digital Mic4",
			"DMIC5", "MIC BIAS4",
			"MIC BIAS4", "Digital Mic5",
			"SpkrLeft IN", "SPK1 OUT",
			"SpkrRight IN", "SPK2 OUT";

		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&cpe>, <&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-cpe-lsm",
				"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>;
		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";
		qcom,tasha-mclk-clk-freq = <12288000>;
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";

		pinctrl-names = "sleep", "active";
		pinctrl-0 = <&ap_mclk_sleep &mdm_mclk_sleep>;
		pinctrl-1 = <&ap_mclk_active &mdm_mclk_active>;
	};
+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 apq8096-auto.o
snd-soc-msm8996-objs := msm8996.o apq8096-auto.o apq8096-i2c.o
obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-msm8996.o

# for MSM 8x16/8952 sound card driver
+874 −0

File added.

Preview size limit exceeded, changes collapsed.