Merge "ASoC: remove unnesssary log message for virtual port"
This commit is contained in:
commit
877781d540
27
dsp/q6afe.c
Normal file → Executable file
27
dsp/q6afe.c
Normal file → Executable file
@ -8628,10 +8628,8 @@ done:
|
||||
}
|
||||
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:
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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 ||
|
||||
@ -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…
Reference in New Issue
Block a user