Loading dsp/q6afe.c 100644 → 100755 +17 −10 Original line number Diff line number Diff line Loading @@ -8628,10 +8628,8 @@ int afe_set_display_stream(u16 rx_port_id, u32 stream_idx, u32 ctl_idx) } EXPORT_SYMBOL(afe_set_display_stream); int afe_validate_port(u16 port_id) static bool is_port_valid(u16 port_id) { int ret; switch (port_id) { case PRIMARY_I2S_RX: case PRIMARY_I2S_TX: Loading Loading @@ -8841,15 +8839,23 @@ int afe_validate_port(u16 port_id) case RT_PROXY_PORT_002_RX: case RT_PROXY_PORT_002_TX: { ret = 0; break; return true; } default: return false; } } int afe_validate_port(u16 port_id) { int ret; if (is_port_valid(port_id)) { ret = 0; } else { pr_err("%s: default ret 0x%x\n", __func__, port_id); ret = -EINVAL; } return ret; } Loading Loading @@ -8884,7 +8890,9 @@ int afe_convert_virtual_to_portid(u16 port_id) * if port_id is virtual, convert to physical.. * if port_id is already physical, return physical */ if (afe_validate_port(port_id) < 0) { if (is_port_valid(port_id)) { ret = port_id; } else { if (port_id == RT_PROXY_DAI_001_RX || port_id == RT_PROXY_DAI_001_TX || port_id == RT_PROXY_DAI_002_RX || Loading @@ -8897,8 +8905,7 @@ int afe_convert_virtual_to_portid(u16 port_id) __func__, port_id); ret = -EINVAL; } } else ret = port_id; } return ret; } Loading Loading
dsp/q6afe.c 100644 → 100755 +17 −10 Original line number Diff line number Diff line Loading @@ -8628,10 +8628,8 @@ int afe_set_display_stream(u16 rx_port_id, u32 stream_idx, u32 ctl_idx) } EXPORT_SYMBOL(afe_set_display_stream); int afe_validate_port(u16 port_id) static bool is_port_valid(u16 port_id) { int ret; switch (port_id) { case PRIMARY_I2S_RX: case PRIMARY_I2S_TX: Loading Loading @@ -8841,15 +8839,23 @@ int afe_validate_port(u16 port_id) case RT_PROXY_PORT_002_RX: case RT_PROXY_PORT_002_TX: { ret = 0; break; return true; } default: return false; } } int afe_validate_port(u16 port_id) { int ret; if (is_port_valid(port_id)) { ret = 0; } else { pr_err("%s: default ret 0x%x\n", __func__, port_id); ret = -EINVAL; } return ret; } Loading Loading @@ -8884,7 +8890,9 @@ int afe_convert_virtual_to_portid(u16 port_id) * if port_id is virtual, convert to physical.. * if port_id is already physical, return physical */ if (afe_validate_port(port_id) < 0) { if (is_port_valid(port_id)) { ret = port_id; } else { if (port_id == RT_PROXY_DAI_001_RX || port_id == RT_PROXY_DAI_001_TX || port_id == RT_PROXY_DAI_002_RX || Loading @@ -8897,8 +8905,7 @@ int afe_convert_virtual_to_portid(u16 port_id) __func__, port_id); ret = -EINVAL; } } else ret = port_id; } return ret; } Loading