Browse Source

Merge "ASoC: Add port params for shima"

qctecmdr 4 years ago
parent
commit
1b6c22837e
3 changed files with 23 additions and 3 deletions
  1. 14 0
      asoc/lahaina-port-config.h
  2. 8 2
      asoc/lahaina.c
  3. 1 1
      asoc/msm_dailink.h

+ 14 - 0
asoc/lahaina-port-config.h

@@ -51,6 +51,13 @@ static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
 	{7,  1,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
 };
 
+/* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
+static struct port_params tx_frame_params_shima[SWR_MSTR_PORT_LEN] = {
+	{3,  1,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX1 */
+	{3,  0,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX2 */
+	{7,  2,  0,  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
+};
+
 static struct swr_mstr_port_map sm_port_map[] = {
 	{TX_MACRO, SWR_UC0, tx_frame_params_default},
 	{RX_MACRO, SWR_UC0, rx_frame_params_default},
@@ -58,4 +65,11 @@ static struct swr_mstr_port_map sm_port_map[] = {
 	{WSA_MACRO, SWR_UC0, wsa_frame_params_default},
 };
 
+static struct swr_mstr_port_map sm_port_map_shima[] = {
+	{TX_MACRO, SWR_UC0, tx_frame_params_shima},
+	{RX_MACRO, SWR_UC0, rx_frame_params_default},
+	{RX_MACRO, SWR_UC1, rx_frame_params_dsd},
+	{WSA_MACRO, SWR_UC0, wsa_frame_params_default},
+};
+
 #endif /* _LAHAINA_PORT_CONFIG */

+ 8 - 2
asoc/lahaina.c

@@ -7612,9 +7612,15 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd)
 
 	snd_soc_dapm_sync(dapm);
 
-	bolero_set_port_map(component, ARRAY_SIZE(sm_port_map), sm_port_map);
-
 	card = rtd->card->snd_card;
+
+	if (strnstr(rtd->card->name, "shima", 5) != NULL)
+		bolero_set_port_map(component, ARRAY_SIZE(sm_port_map_shima),
+				sm_port_map_shima);
+	else
+		bolero_set_port_map(component, ARRAY_SIZE(sm_port_map),
+				sm_port_map);
+
 	if (!pdata->codec_root) {
 		entry = msm_snd_info_create_subdir(card->module, "codecs",
 						 card->proc_root);

+ 1 - 1
asoc/msm_dailink.h

@@ -348,7 +348,7 @@ SND_SOC_DAILINK_DEFS(slimbus_7_tx,
 SND_SOC_DAILINK_DEFS(slimbus_8_tx,
 	DAILINK_COMP_ARRAY(COMP_CPU("msm-dai-q6-dev.16401")),
 	DAILINK_COMP_ARRAY(COMP_CODEC("btfmslim_slave",
-			"btfm_bt_sco_a2dp_slim_rx")),
+			"btfm_fm_slim_tx")),
 	DAILINK_COMP_ARRAY(COMP_PLATFORM("msm-pcm-routing")));
 
 SND_SOC_DAILINK_DEFS(display_port,