ASoC: codec: Change name for enum defined for callback between wcd and bolero

Add enum names defined for callback between wcd and bolero in
separate file and include that file in order to have same enum
across wcd and bolero.

Change-Id: I808c2ad3de37655c1ba2b8e096def60703ced7f2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
This commit is contained in:
Vatsal Bucha
2020-08-24 10:06:05 +05:30
committed by Gerrit - the friendly Code Review server
parent a387074fd0
commit 625753df87
12 changed files with 110 additions and 167 deletions

View File

@@ -28,6 +28,7 @@
#include <asoc/msm-cdc-pinctrl.h>
#include "wsa881x.h"
#include "wsa881x-temp-sensor.h"
#include "asoc/bolero-slave-internal.h"
#define DRV_NAME "wsa-codec"
#define WSA881X_NUM_RETRY 5
@@ -111,16 +112,6 @@ struct wsa881x_priv {
bool enable);
};
/* from bolero to WSA events */
enum {
BOLERO_WSA_EVT_TX_CH_HOLD_CLEAR = 1,
BOLERO_WSA_EVT_PA_OFF_PRE_SSR,
BOLERO_WSA_EVT_SSR_DOWN,
BOLERO_WSA_EVT_SSR_UP,
BOLERO_WSA_EVT_PA_ON_POST_FSCLK,
BOLERO_WSA_EVT_PA_ON_POST_FSCLK_ADIE_LB,
};
struct wsa_ctrl_platform_data {
void *handle;
int (*update_wsa_event)(void *handle, u16 event, u32 data);
@@ -1395,7 +1386,7 @@ static int wsa881x_event_notify(struct notifier_block *nb,
return -EINVAL;
switch (event) {
case BOLERO_WSA_EVT_PA_OFF_PRE_SSR:
case BOLERO_SLV_EVT_PA_OFF_PRE_SSR:
snd_soc_component_update_bits(wsa881x->component,
WSA881X_SPKR_DRV_GAIN,
0xF0, 0xC0);
@@ -1403,8 +1394,8 @@ static int wsa881x_event_notify(struct notifier_block *nb,
WSA881X_SPKR_DRV_EN,
0x80, 0x00);
break;
case BOLERO_WSA_EVT_PA_ON_POST_FSCLK:
case BOLERO_WSA_EVT_PA_ON_POST_FSCLK_ADIE_LB:
case BOLERO_SLV_EVT_PA_ON_POST_FSCLK:
case BOLERO_SLV_EVT_PA_ON_POST_FSCLK_ADIE_LB:
if ((snd_soc_component_read32(wsa881x->component,
WSA881X_SPKR_DAC_CTL) & 0x80) == 0x80)
snd_soc_component_update_bits(wsa881x->component,