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

Commit a9cc4dab 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: Fix config control indices for TX DAIs"

parents ce2b41a3 87f87191
Loading
Loading
Loading
Loading
+17 −20
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3571,13 +3571,13 @@ static int msm_dai_q6_dai_mi2s_probe(struct snd_soc_dai *dai)
	ctrl = NULL;
	if (mi2s_dai_data->tx_dai.mi2s_dai_data.port_config.i2s.channel_mode) {
		if (dai->id == MSM_PRIM_MI2S)
			ctrl = &mi2s_config_controls[4];
		if (dai->id == MSM_SEC_MI2S)
			ctrl = &mi2s_config_controls[5];
		if (dai->id == MSM_TERT_MI2S)
		if (dai->id == MSM_SEC_MI2S)
			ctrl = &mi2s_config_controls[6];
		if (dai->id == MSM_QUAT_MI2S)
		if (dai->id == MSM_TERT_MI2S)
			ctrl = &mi2s_config_controls[7];
		if (dai->id == MSM_QUAT_MI2S)
			ctrl = &mi2s_config_controls[8];
		if (dai->id == MSM_QUIN_MI2S)
			ctrl = &mi2s_config_controls[9];
		if (dai->id == MSM_SENARY_MI2S)
@@ -3586,9 +3586,6 @@ static int msm_dai_q6_dai_mi2s_probe(struct snd_soc_dai *dai)
			ctrl = &mi2s_config_controls[11];
	}

	if (dai->id == MSM_QUAT_MI2S)
		ctrl = &mi2s_config_controls[8];

	if (ctrl) {
		rc = snd_ctl_add(dai->component->card->snd_card,
				snd_ctl_new1(ctrl,
@@ -4164,18 +4161,6 @@ static struct snd_soc_dai_driver msm_dai_q6_mi2s_dai[] = {
		.probe = msm_dai_q6_dai_mi2s_probe,
		.remove = msm_dai_q6_dai_mi2s_remove,
	},
	{
		.playback = {
			.stream_name = "Secondary MI2S Playback SD1",
			.aif_name = "SEC_MI2S_RX_SD1",
			.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
			SNDRV_PCM_RATE_16000,
			.formats = SNDRV_PCM_FMTBIT_S16_LE,
			.rate_min =     8000,
			.rate_max =     48000,
		},
		.id = MSM_SEC_MI2S_SD1,
	},
	{
		.playback = {
			.stream_name = "Quinary MI2S Playback",
@@ -4201,6 +4186,18 @@ static struct snd_soc_dai_driver msm_dai_q6_mi2s_dai[] = {
		.probe = msm_dai_q6_dai_mi2s_probe,
		.remove = msm_dai_q6_dai_mi2s_remove,
	},
	{
		.playback = {
			.stream_name = "Secondary MI2S Playback SD1",
			.aif_name = "SEC_MI2S_RX_SD1",
			.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
			SNDRV_PCM_RATE_16000,
			.formats = SNDRV_PCM_FMTBIT_S16_LE,
			.rate_min =     8000,
			.rate_max =     48000,
		},
		.id = MSM_SEC_MI2S_SD1,
	},
	{
		.capture = {
			.stream_name = "Senary_mi2s Capture",