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

Commit 0d25f034 authored by Deven Patel's avatar Deven Patel
Browse files

ASoC: msm: Add mdm californium machine driver



Machine driver holds target specific information for
mdm californium. DAI links and sound card for mdm californium
are registered in machine driver.

Change-Id: I8a24e1d10f9800a6d5dd7e24bef7a477321423cd
Signed-off-by: default avatarDeven Patel <cdevenp@codeaurora.org>
parent 13fe987c
Loading
Loading
Loading
Loading
+91 −0
Original line number Diff line number Diff line
@@ -1611,3 +1611,94 @@ sound {
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
	};

* MDMCALIFORNIUM ASoC Machine driver

- compatible : "qcom,mdm-audio-tasha" for tasha codec and
                node is "sound"
- qcom,model : The user-visible name of this sound card.
- qcom,tasha-mclk-clk-freq : MCLK frequency value for tasha codec
                             and node is "sound-9335"
- qcom,audio-routing : A list of the connections between audio components.
- 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".
Optional properties:
- clock-names : clock name defined for external clock.
- clocks : external clock defined for codec clock.
- qcom,hph-en1-gpio : GPIO to enable HiFi amplifiers.
- qcom,hph-en0-gpio : GPIO to enable HiFi audio route to headset.

Example:

	sound {
	compatible = "qcom,mdm-audio-tasha";
	qcom,model = "mdm-tasha-i2s-snd-card";

	qcom,audio-routing =
		"RX_BIAS", "MCLK",
		"LDO_H", "MCLK",
		"AIF4 MAD", "MCLK",
		"ultrasound amp", "LINEOUT1",
		"ultrasound amp", "LINEOUT3",
		"AMIC1", "MIC BIAS1 Internal1",
		"MIC BIAS1 Internal1", "Handset Mic",
		"AMIC2", "MIC BIAS2 External",
		"MIC BIAS2 External", "Headset Mic",
		"AMIC3", "MIC BIAS2 External",
		"MIC BIAS2 External", "ANCRight Headset Mic",
		"AMIC4", "MIC BIAS2 External",
		"MIC BIAS2 External", "ANCLeft Headset Mic",
		"DMIC1", "MIC BIAS1 External",
		"MIC BIAS1 External", "Digital Mic1",
		"DMIC2", "MIC BIAS1 External",
		"MIC BIAS1 External", "Digital Mic2",
		"DMIC3", "MIC BIAS3 External",
		"MIC BIAS3 External", "Digital Mic3",
		"DMIC4", "MIC BIAS3 External",
		"MIC BIAS3 External", "Digital Mic4",
		"DMIC5", "MIC BIAS4 External",
		"MIC BIAS4 External", "Digital Mic5",
		"DMIC6", "MIC BIAS4 External",
		"MIC BIAS4 External", "Digital Mic6";

		qcom,tasha-mclk-clk-freq = <12288000>;
		asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
				<&loopback>, <&hostless>, <&afe>, <&routing>,
				<&pcm_dtmf>, <&host_pcm>;
		asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
				"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
				"msm-pcm-hostless", "msm-pcm-afe",
				"msm-pcm-routing", "msm-pcm-dtmf", "msm-voice-host-pcm";
		asoc-cpu = <&dai_pri_auxpcm>, <&mi2s_prim>, <&dtmf_tx>,
				<&rx_capture_tx>, <&rx_playback_rx>,
				<&tx_capture_tx>, <&tx_playback_rx>,
				<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>,
				<&afe_proxy_tx>, <&incall_record_rx>,
				<&incall_record_tx>, <&incall_music_rx>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-mi2s.0",
				"msm-dai-stub-dev.4", "msm-dai-stub-dev.5",
				"msm-dai-stub-dev.6", "msm-dai-stub-dev.7",
				"msm-dai-stub-dev.8", "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";
		asoc-codec = <&stub_codec>;
		asoc-codec-names = "msm-stub-codec.1";
		qcom,aux-codec = <&stub_codec>;
	};
+18 −0
Original line number Diff line number Diff line
@@ -184,4 +184,22 @@ config SND_SOC_MSM8X16
	 the machine driver and the corresponding
	 DAI-links

config SND_SOC_MDMCALIFORNIUM
        tristate "SoC Machine driver for MDMCALIFORNIUM boards"
        depends on ARCH_MDMCALIFORNIUM
        select SND_SOC_QDSP6V2
        select SND_SOC_MSM_STUB
        select SND_SOC_MSM_HOSTLESS_PCM
        select SND_DYNAMIC_MINORS
        select MSM_QDSP6_APRV3
        select MSM_QDSP6V2_CODECS
        select SND_SOC_WCD9335
        select SND_SOC_WSA881X
        select SND_HWDEP
        help
         To add support for SoC audio on MDMCALIFORNIUM.
         This will enable sound soc drivers which
         interfaces with DSP, also it will enable
         the machine driver and the corresponding
         DAI-links
endmenu
+3 −0
Original line number Diff line number Diff line
@@ -29,3 +29,6 @@ snd-soc-msm8x16-objs := msm8952.o msm-audio-pinctrl.o
snd-soc-msm8x16-objs += msm8952-slimbus.o msm8952-dai-links.o
obj-$(CONFIG_SND_SOC_MSM8X16) += snd-soc-msm8x16.o

# for MDM Californium sound card driver
snd-soc-mdmcalifornium-objs := mdmcalifornium.o
obj-$(CONFIG_SND_SOC_MDMCALIFORNIUM) += snd-soc-mdmcalifornium.o
+1441 −0

File added.

Preview size limit exceeded, changes collapsed.