Skip to content
Snippets Groups Projects
Commit 621825e6 authored by Swapnil Kangralkar(Temp)'s avatar Swapnil Kangralkar(Temp) Committed by Swapnil Kangralkar
Browse files

asoc: monaco: Update port config


- SWR port 7 is used for AMIC Recording
  as well as VI Sense data which requires different
  SWR Port configuration.
- As per current logic VI sense related port config
  is overwriting the AMIC related port config resulting in
  AMIC recording to break.
- Add new port config struct for AMIC port config, and
  set this port mapping, if AMIC init is success.

Change-Id: I7ea8fc07c472a8a30611eac00d553fb6d80aa59a
Signed-off-by: default avatarSwapnil Kangralkar <quic_skangral@quicinc.com>
parent a8ac5495
No related merge requests found
...@@ -71,8 +71,10 @@ static struct swr_mstr_port_map sm_port_map[] = { ...@@ -71,8 +71,10 @@ static struct swr_mstr_port_map sm_port_map[] = {
static struct swr_mstr_port_map sm_port_map_besbev[] = { static struct swr_mstr_port_map sm_port_map_besbev[] = {
{VA_MACRO, SWR_UC0, tx_frame_params_besbev}, {VA_MACRO, SWR_UC0, tx_frame_params_besbev},
{RX_MACRO, SWR_UC0, rx_frame_params_besbev},
{RX_MACRO, SWR_UC0, rx_frame_params_visense}, {RX_MACRO, SWR_UC0, rx_frame_params_visense},
}; };
static struct swr_mstr_port_map sm_port_map_besbev_amic[] = {
{RX_MACRO, SWR_UC0, rx_frame_params_besbev},
};
#endif /* _MONACO_PORT_CONFIG */ #endif /* _MONACO_PORT_CONFIG */
...@@ -544,7 +544,18 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd) ...@@ -544,7 +544,18 @@ static int msm_int_audrx_init(struct snd_soc_pcm_runtime *rtd)
besbev_info_create_codec_entry(pdata->codec_root, component); besbev_info_create_codec_entry(pdata->codec_root, component);
bolero_set_port_map(bolero_component, bolero_set_port_map(bolero_component,
ARRAY_SIZE(sm_port_map_besbev), sm_port_map_besbev); ARRAY_SIZE(sm_port_map_besbev), sm_port_map_besbev);
besbev_amic_init(component); /* SWR port 7 is used for AMIC IN and VI SENSE IN,
* first set port map with VI SENSE port config and
* if amic_init is success overwrite with AMIC IN port config
*/
ret = besbev_amic_init(component);
if (!ret) {
/* For AMIC Variant Speaker Protection is not supported
* thus VI SENSE port config is not updated here
*/
bolero_set_port_map(bolero_component,
ARRAY_SIZE(sm_port_map_besbev_amic), sm_port_map_besbev_amic);
}
} else if (!strncmp(component->driver->name, "wsa-codec.1", } else if (!strncmp(component->driver->name, "wsa-codec.1",
strlen("wsa-codec.1"))) { strlen("wsa-codec.1"))) {
bolero_set_port_map(bolero_component, bolero_set_port_map(bolero_component,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment