mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
dsp: Check ec ref rx port against AFE_PORT_INVALID
ec ref rx port is defined as integer and it is set to 0xFFFF (AFE_PORT_INVALID) when ec controls are reset. Due to this the current check against -1 (0xFFFFFFFF) in adm open will always return true even after controls are reset. This leads to adm open failures in case no ec ref channels are set as part of record usecase. Avoid this by checking ec ref rx port against AFE_PORT_INVALID. Change-Id: I0d52bbe2a980d495933239315e6bba193a18567e Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
This commit is contained in:
parent
5bb681434b
commit
8b0abba9d7
1 changed files with 3 additions and 2 deletions
|
|
@ -2895,8 +2895,9 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
|
|||
open_v8.endpoint_id_2 = 0xFFFF;
|
||||
open_v8.endpoint_id_3 = 0xFFFF;
|
||||
|
||||
if ((this_adm.ec_ref_rx != -1) &&
|
||||
(path != ADM_PATH_PLAYBACK)) {
|
||||
if (((this_adm.ec_ref_rx & AFE_PORT_INVALID) !=
|
||||
AFE_PORT_INVALID) &&
|
||||
(path != ADM_PATH_PLAYBACK)) {
|
||||
if (this_adm.num_ec_ref_rx_chans != 0) {
|
||||
open_v8.endpoint_id_2 =
|
||||
this_adm.ec_ref_rx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue