mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
dsp: add an exception in determining port type
AFE ports have been identified as RX or TX based on a certain rule. Add an exception for VOICE_RECORD_TX port from this rule. Change-Id: I8a2fa4b6053baaf7747493aa385da887e6dd170c Signed-off-by: Vikram Panduranga <vpandura@codeaurora.org>
This commit is contained in:
parent
7c20a7cc2e
commit
dfae8ef1bb
1 changed files with 15 additions and 3 deletions
18
dsp/q6afe.c
18
dsp/q6afe.c
|
|
@ -586,11 +586,23 @@ int afe_get_port_type(u16 port_id)
|
|||
{
|
||||
int ret = MSM_AFE_PORT_TYPE_RX;
|
||||
|
||||
/* Odd numbered ports are TX and Rx are Even numbered */
|
||||
if (port_id & 0x1)
|
||||
switch (port_id) {
|
||||
case VOICE_RECORD_RX:
|
||||
case VOICE_RECORD_TX:
|
||||
ret = MSM_AFE_PORT_TYPE_TX;
|
||||
else
|
||||
break;
|
||||
case VOICE_PLAYBACK_TX:
|
||||
case VOICE2_PLAYBACK_TX:
|
||||
ret = MSM_AFE_PORT_TYPE_RX;
|
||||
break;
|
||||
default:
|
||||
/* Odd numbered ports are TX and Rx are Even numbered */
|
||||
if (port_id & 0x1)
|
||||
ret = MSM_AFE_PORT_TYPE_TX;
|
||||
else
|
||||
ret = MSM_AFE_PORT_TYPE_RX;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue