Browse Source

asoc: dai-q6: update quinary mi2s dai id to 4

Update quinary mi2s dai id to 4 and secondary mi2s playback
sd1 dai id to 5. Also update index of mi2s_config_controls
for primary, secondary, tertiary and quaternary mi2s.

CRs-Fixed: 2133890
Change-Id: I00997b79a148cf50b2a3f9acf6e44fe603e5c944
Signed-off-by: Rohit kumar <[email protected]>
Rohit kumar 7 years ago
parent
commit
b242df4632
2 changed files with 19 additions and 19 deletions
  1. 16 16
      asoc/msm-dai-q6-v2.c
  2. 3 3
      asoc/msm-dai-q6-v2.h

+ 16 - 16
asoc/msm-dai-q6-v2.c

@@ -3690,13 +3690,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)
@@ -4276,18 +4276,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",
@@ -4313,6 +4301,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",

+ 3 - 3
asoc/msm-dai-q6-v2.h

@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, 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
@@ -25,8 +25,8 @@
 #define MSM_SEC_MI2S  1
 #define MSM_TERT_MI2S 2
 #define MSM_QUAT_MI2S  3
-#define MSM_SEC_MI2S_SD1  4
-#define MSM_QUIN_MI2S  5
+#define MSM_QUIN_MI2S  4
+#define MSM_SEC_MI2S_SD1  5
 #define MSM_SENARY_MI2S  6
 #define MSM_INT0_MI2S  7
 #define MSM_INT1_MI2S  8