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

Commit 0919e09f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: Add a separate array for TDM BE DAIs"

parents 37e01c4c 30b62249
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1654,6 +1654,8 @@ Optional Properties:
  secondary -> Secondary MI2S interface
  tertiary -> Tertiary MI2S interface
  quaternary -> Quaternary MI2S interface
- qcom,tdm-audio-intf : Boolean. This property is used to specify TDM interface
			is supported or not to the machine driver.
- 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
@@ -1691,6 +1693,7 @@ Example:
		qcom,msm-mbhc-gnd-swh = <0>;
		qcom,msm-hs-micbias-type = "internal";
		qcom,msm-micbias1-ext-cap;
		qcom,tdm-audio-intf;
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"SPK_RX_BIAS", "MCLK",
+50 −37
Original line number Diff line number Diff line
@@ -1411,6 +1411,45 @@ static struct snd_soc_dai_link msm8952_common_be_dai[] = {
		.ops = &msm8952_quin_mi2s_be_ops,
		.ignore_suspend = 1,
	},
};

static struct snd_soc_dai_link msm8952_hdmi_dba_dai_link[] = {
	{
		.name = LPASS_BE_QUIN_MI2S_RX,
		.stream_name = "Quinary MI2S Playback",
		.cpu_dai_name = "msm-dai-q6-mi2s.5",
		.platform_name = "msm-pcm-routing",
		.codec_dai_name = "msm_hdmi_dba_codec_rx_dai",
		.codec_name = "msm-hdmi-dba-codec-rx",
		.no_pcm = 1,
		.dpcm_playback = 1,
		.be_id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
		.be_hw_params_fixup = msm_quin_be_hw_params_fixup,
		.ops = &msm8952_quin_mi2s_be_ops,
		.ignore_pmdown_time = 1, /* dai link has playback support */
		.ignore_suspend = 1,
	},
};

static struct snd_soc_dai_link msm8952_quin_dai_link[] = {
	{
		.name = LPASS_BE_QUIN_MI2S_RX,
		.stream_name = "Quinary MI2S Playback",
		.cpu_dai_name = "msm-dai-q6-mi2s.5",
		.platform_name = "msm-pcm-routing",
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.no_pcm = 1,
		.dpcm_playback = 1,
		.be_id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
		.be_hw_params_fixup = msm_quin_be_hw_params_fixup,
		.ops = &msm8952_quin_mi2s_be_ops,
		.ignore_pmdown_time = 1, /* dai link has playback support */
		.ignore_suspend = 1,
	},
};

static struct snd_soc_dai_link msm8952_tdm_be_dai_link[] = {
	/* TDM be dai links */
	{
		.name = LPASS_BE_PRI_TDM_RX_0,
@@ -1470,41 +1509,6 @@ static struct snd_soc_dai_link msm8952_common_be_dai[] = {
	},
};

static struct snd_soc_dai_link msm8952_hdmi_dba_dai_link[] = {
	{
		.name = LPASS_BE_QUIN_MI2S_RX,
		.stream_name = "Quinary MI2S Playback",
		.cpu_dai_name = "msm-dai-q6-mi2s.5",
		.platform_name = "msm-pcm-routing",
		.codec_dai_name = "msm_hdmi_dba_codec_rx_dai",
		.codec_name = "msm-hdmi-dba-codec-rx",
		.no_pcm = 1,
		.dpcm_playback = 1,
		.be_id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
		.be_hw_params_fixup = msm_quin_be_hw_params_fixup,
		.ops = &msm8952_quin_mi2s_be_ops,
		.ignore_pmdown_time = 1, /* dai link has playback support */
		.ignore_suspend = 1,
	},
};
static struct snd_soc_dai_link msm8952_quin_dai_link[] = {
	{
		.name = LPASS_BE_QUIN_MI2S_RX,
		.stream_name = "Quinary MI2S Playback",
		.cpu_dai_name = "msm-dai-q6-mi2s.5",
		.platform_name = "msm-pcm-routing",
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.no_pcm = 1,
		.dpcm_playback = 1,
		.be_id = MSM_BACKEND_DAI_QUINARY_MI2S_RX,
		.be_hw_params_fixup = msm_quin_be_hw_params_fixup,
		.ops = &msm8952_quin_mi2s_be_ops,
		.ignore_pmdown_time = 1, /* dai link has playback support */
		.ignore_suspend = 1,
	},
};

struct msm895x_wsa881x_dev_info {
	struct device_node *of_node;
	u32 index;
@@ -1519,7 +1523,8 @@ ARRAY_SIZE(msm8952_tomtom_fe_dai) +
ARRAY_SIZE(msm8952_tdm_fe_dai) +
ARRAY_SIZE(msm8952_common_be_dai) +
ARRAY_SIZE(msm8952_tomtom_be_dai) +
ARRAY_SIZE(msm8952_quin_dai_link)];
ARRAY_SIZE(msm8952_quin_dai_link) +
ARRAY_SIZE(msm8952_tdm_be_dai_link)];

static struct snd_soc_dai_link msm8952_tasha_dai_links[
ARRAY_SIZE(msm8952_common_fe_dai) +
@@ -1527,7 +1532,8 @@ ARRAY_SIZE(msm8952_tasha_fe_dai) +
ARRAY_SIZE(msm8952_tdm_fe_dai) +
ARRAY_SIZE(msm8952_common_be_dai) +
ARRAY_SIZE(msm8952_tasha_be_dai) +
ARRAY_SIZE(msm8952_hdmi_dba_dai_link)];
ARRAY_SIZE(msm8952_hdmi_dba_dai_link) +
ARRAY_SIZE(msm8952_tdm_be_dai_link)];

int msm8952_init_wsa_dev(struct platform_device *pdev,
			struct snd_soc_card *card)
@@ -1773,6 +1779,13 @@ struct snd_soc_card *populate_snd_card_dailinks(struct device *dev)
			sizeof(msm8952_quin_dai_link));
		len5 += ARRAY_SIZE(msm8952_quin_dai_link);
	}
	if (of_property_read_bool(dev->of_node, "qcom,tdm-audio-intf")) {
		dev_dbg(dev, "%s(): TDM support present\n",
				__func__);
		memcpy(msm8952_dai_links + len5, msm8952_tdm_be_dai_link,
			sizeof(msm8952_tdm_be_dai_link));
		len5 += ARRAY_SIZE(msm8952_tdm_be_dai_link);
	}
	card->dai_link = msm8952_dai_links;
	card->num_links = len5;
	card->dev = dev;
+24 −24
Original line number Diff line number Diff line
@@ -3483,8 +3483,7 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev)
	if (!muxsel) {
		dev_err(&pdev->dev, "MUX addr invalid for QUIN PCM\n");
		ret = -ENODEV;
		goto err;
	}
	} else {
		pdata->vaddr_gpio_mux_qui_pcm_sec_mode_ctl =
			ioremap(muxsel->start, resource_size(muxsel));
		if (pdata->vaddr_gpio_mux_qui_pcm_sec_mode_ctl == NULL) {
@@ -3493,14 +3492,14 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev)
			ret = -ENOMEM;
			goto err;
		}
	}

	muxsel = platform_get_resource_byname(pdev, IORESOURCE_MEM,
			"csr_gp_io_mux_mic_ext_clk_ctl");
	if (!muxsel) {
		dev_err(&pdev->dev, "MUX addr invalid for EXT CLK CTL\n");
		ret = -ENODEV;
		goto err;
	}
	} else {
		pdata->vaddr_gpio_mux_mic_ext_clk_ctl =
			ioremap(muxsel->start, resource_size(muxsel));
		if (pdata->vaddr_gpio_mux_mic_ext_clk_ctl == NULL) {
@@ -3509,14 +3508,14 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev)
			ret = -ENOMEM;
			goto err;
		}
	}

	muxsel = platform_get_resource_byname(pdev, IORESOURCE_MEM,
			"csr_gp_io_mux_sec_tlmm_ctl");
	if (!muxsel) {
		dev_err(&pdev->dev, "MUX addr invalid for SEC TLMM CTL\n");
		ret = -ENODEV;
		goto err;
	}
	} else {
		pdata->vaddr_gpio_mux_sec_tlmm_ctl =
			ioremap(muxsel->start, resource_size(muxsel));
		if (pdata->vaddr_gpio_mux_sec_tlmm_ctl == NULL) {
@@ -3525,6 +3524,7 @@ static int msm8952_asoc_machine_probe(struct platform_device *pdev)
			ret = -ENOMEM;
			goto err;
		}
	}

	pdev->id = 0;