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

Commit f196ab86 authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msmskunk: add initial audio support" into msm-4.8

parents b9bd35b9 5dbcc081
Loading
Loading
Loading
Loading
+156 −2
Original line number Diff line number Diff line
@@ -2315,7 +2315,8 @@ Example:
* MSMSTUB ASoC Machine driver

Required properties:
- compatible : "qcom,msm8998-asoc-snd-stub"
- compatible : "qcom,msm8998-asoc-snd-stub" for MSM8998 target.
	       "qcom,msmskunk-asoc-snd-stub" for MSMSKUNK target.
- qcom,model : The user-visible name of this sound card.
- qcom,tasha-mclk-clk-freq : MCLK frequency value for tasha codec
- asoc-platform: This is phandle list containing the references to platform device
@@ -2341,7 +2342,7 @@ Optional properties:
Example:

	sound_msm:sound-9335 {
		compatible = "qcom,msm8998-asoc-snd";
		compatible = "qcom,msm8998-asoc-snd-stub";
		qcom,model = "msm8998-stub-snd-card";

		qcom,tasha-mclk-clk-freq = <9600000>;
@@ -2385,3 +2386,156 @@ Example of child node that would have qcom,wdsp-cmpnt-dev-name property
	wcd934x_cdc: tavil_codec {
		qcom,wdsp-cmpnt-dev-name = "tavil_codec";
	};

* MSMSKUNK ASoC Machine driver

Required properties:
- compatible : "qcom,msmskunk-asoc-snd-tavil"
- qcom,model : The user-visible name of this sound card.
- qcom,tavil-mclk-clk-freq : MCLK frequency value for tavil codec
- 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:
- qcom,mbhc-audio-jack-type : String to indicate the jack type on the hardware.
		Possible Values:
		4-pole-jack : Jack on the hardware is 4-pole.
		5-pole-jack : Jack on the hardware is 5-pole.
		6-pole-jack : Jack on the hardware is 6-pole.
- 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.
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs : List of phandles for all possible WSA881x devices supported for the target
- qcom,wsa-aux-dev-prefix : Name prefix with Left/Right configuration for WSA881x device
- qcom,wcn-btfm : Property to specify if WCN BT/FM chip is used for the target

Example:

	sound-tavil {
		compatible = "qcom,msmskunk-asoc-snd-tavil";
		qcom,model = "msmskunk-tavil-snd-card";
		qcom,ext-disp-audio-rx;
		qcom,wcn-btfm;
		qcom,mi2s-audio-intf;
		qcom,auxpcm-audio-intf;
		qcom,msm-mi2s-master = <1>, <1>, <1>, <1>;

		reg = <0x1711a000 0x4>,
		      <0x1711b000 0x4>,
		      <0x1711c000 0x4>,
		      <0x1711d000 0x4>;
		reg-names = "lpaif_pri_mode_muxsel",
			    "lpaif_sec_mode_muxsel",
			    "lpaif_tert_mode_muxsel",
			    "lpaif_quat_mode_muxsel";

		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"MADINPUT", "MCLK",
			"hifi amp", "LINEOUT1",
			"hifi amp", "LINEOUT2",
			"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",
			"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";

		qcom,msm-mbhc-hphl-swh = <0>;
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,hph-en0-gpio = <&tavil_hph_en0>;
		qcom,hph-en1-gpio = <&tavil_hph_en1>;
		qcom,tavil-mclk-clk-freq = <9600000>;
		asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&cpe>, <&compr>,
				<&pcm_noirq>;
		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", "msm-pcm-dsp-noirq";
		asoc-cpu = <&dai_hdmi>, <&dai_dp>,
				<&dai_mi2s0>, <&dai_mi2s1>,
				<&dai_mi2s2>, <&dai_mi2s3>,
				<&dai_pri_auxpcm>, <&dai_sec_auxpcm>,
				<&dai_tert_auxpcm>, <&dai_quat_auxpcm>,
				<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
				<&sb_2_rx>, <&sb_2_tx>, <&sb_3_rx>, <&sb_3_tx>,
				<&sb_4_rx>, <&sb_4_tx>, <&sb_5_tx>,
				<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>,
				<&afe_proxy_tx>, <&incall_record_rx>,
				<&incall_record_tx>, <&incall_music_rx>,
				<&incall_music_2_rx>, <&sb_5_rx>, <&sb_6_rx>,
				<&sb_7_rx>, <&sb_7_tx>, <&sb_8_tx>,
				<&usb_audio_rx>, <&usb_audio_tx>,
				<&dai_pri_tdm_rx_0>, <&dai_pri_tdm_tx_0>,
				<&dai_sec_tdm_rx_0>, <&dai_sec_tdm_tx_0>,
				<&dai_tert_tdm_rx_0>, <&dai_tert_tdm_tx_0>,
				<&dai_quat_tdm_rx_0>, <&dai_quat_tdm_tx_0>;
		asoc-cpu-names = "msm-dai-q6-hdmi.8",  "msm-dai-q6-dp.24608",
				"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
				"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
				"msm-dai-q6-auxpcm.1", "msm-dai-q6-auxpcm.2",
				"msm-dai-q6-auxpcm.3", "msm-dai-q6-auxpcm.4",
				"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
				"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
				"msm-dai-q6-dev.16388", "msm-dai-q6-dev.16389",
				"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
				"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
				"msm-dai-q6-dev.16395", "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-dev.16394",
				"msm-dai-q6-dev.16396", "msm-dai-q6-dev.16398",
				"msm-dai-q6-dev.16399", "msm-dai-q6-dev.16401",
				"msm-dai-q6-dev.28672", "msm-dai-q6-dev.28673",
				"msm-dai-q6-tdm.36864", "msm-dai-q6-tdm.36865",
				"msm-dai-q6-tdm.36880", "msm-dai-q6-tdm.36881",
				"msm-dai-q6-tdm.36896", "msm-dai-q6-tdm.36897",
				"msm-dai-q6-tdm.36912", "msm-dai-q6-tdm.36913";
		asoc-codec = <&stub_codec>, <&ext_disp_audio_codec>;
		asoc-codec-names = "msm-stub-codec.1",
				   "msm-ext-disp-audio-codec-rx";
		qcom,wsa-max-devs = <2>;
		qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0212>,
				<&wsa881x_0213>, <&wsa881x_0214>;
		qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrRight",
					  "SpkrLeft", "SpkrRight";
	};
+28 −0
Original line number Diff line number Diff line
@@ -233,4 +233,32 @@ config SND_SOC_FALCON
	 the machine driver and the corresponding
	 DAI-links

config SND_SOC_MSMSKUNK
	tristate "SoC Machine driver for MSMSKUNK boards"
	depends on ARCH_QCOM
	select SND_SOC_COMPRESS
	select SND_SOC_QDSP6V2
	select SND_SOC_MSM_STUB
	select SND_SOC_MSM_HOSTLESS_PCM
	select SND_DYNAMIC_MINORS
	select MSM_QDSP6_APRV2_GLINK
	select MSM_QDSP6_SSR
	select MSM_QDSP6_PDR
	select MSM_QDSP6_NOTIFIER
	select MSM_QDSP6V2_CODECS
	select SND_SOC_WCD934X
	select SND_SOC_WSA881X
	select SND_SOC_MSM_HDMI_CODEC_RX
	select DTS_SRS_TM
	select QTI_PP
	select MSM_ULTRASOUND
	select DOLBY_DS2
	select SND_HWDEP
        select DTS_EAGLE
	help
	 To add support for SoC audio on MSMSKUNK.
	 This enables sound soc drivers that interfaces
	 with DSP. This also enables the machine driver
	 and the corresponding DAI-links.

endmenu
+4 −0
Original line number Diff line number Diff line
@@ -33,3 +33,7 @@ obj-$(CONFIG_SND_SOC_INT_CODEC) += snd-soc-int-codec.o
snd-soc-ext-codec-objs := msmfalcon-external.o msmfalcon-ext-dai-links.o
obj-$(CONFIG_SND_SOC_EXT_CODEC) += snd-soc-msmfalcon-common.o
obj-$(CONFIG_SND_SOC_EXT_CODEC) += snd-soc-ext-codec.o

# for MSMSKUNK sound card driver
snd-soc-msmskunk-objs := msmskunk.o
obj-$(CONFIG_SND_SOC_MSMSKUNK) += snd-soc-msmskunk.o
+6269 −0

File added.

Preview size limit exceeded, changes collapsed.