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:

کامیت شده توسط
Gerrit - the friendly Code Review server

والد
a387074fd0
کامیت
625753df87
@@ -25,6 +25,7 @@
|
||||
#include "wcd937x-registers.h"
|
||||
#include "wcd937x.h"
|
||||
#include "internal.h"
|
||||
#include "asoc/bolero-slave-internal.h"
|
||||
|
||||
#define WCD9370_VARIANT 0
|
||||
#define WCD9375_VARIANT 5
|
||||
@@ -745,7 +746,7 @@ static int wcd937x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
|
||||
0x02, 0x02);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX2 << 0x10));
|
||||
wcd_enable_irq(&wcd937x->irq_info,
|
||||
WCD937X_IRQ_HPHR_PDM_WD_INT);
|
||||
@@ -755,7 +756,7 @@ static int wcd937x_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
|
||||
WCD937X_IRQ_HPHR_PDM_WD_INT);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX2 << 0x10 | 0x1));
|
||||
blocking_notifier_call_chain(&wcd937x->mbhc->notifier,
|
||||
WCD_EVENT_PRE_HPHR_PA_OFF,
|
||||
@@ -844,7 +845,7 @@ static int wcd937x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
|
||||
0x02, 0x02);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX1 << 0x10));
|
||||
wcd_enable_irq(&wcd937x->irq_info,
|
||||
WCD937X_IRQ_HPHL_PDM_WD_INT);
|
||||
@@ -854,7 +855,7 @@ static int wcd937x_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
|
||||
WCD937X_IRQ_HPHL_PDM_WD_INT);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX1 << 0x10 | 0x1));
|
||||
blocking_notifier_call_chain(&wcd937x->mbhc->notifier,
|
||||
WCD_EVENT_PRE_HPHL_PA_OFF,
|
||||
@@ -920,7 +921,7 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
|
||||
0x02, 0x02);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX3 << 0x10));
|
||||
wcd_enable_irq(&wcd937x->irq_info, WCD937X_IRQ_AUX_PDM_WD_INT);
|
||||
break;
|
||||
@@ -928,7 +929,7 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
|
||||
wcd_disable_irq(&wcd937x->irq_info, WCD937X_IRQ_AUX_PDM_WD_INT);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX3 << 0x10 | 0x1));
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
@@ -990,7 +991,7 @@ static int wcd937x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
|
||||
0x02, 0x02);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX1 << 0x10));
|
||||
if (wcd937x->ear_rx_path & EAR_RX_PATH_AUX)
|
||||
wcd_enable_irq(&wcd937x->irq_info,
|
||||
@@ -1008,7 +1009,7 @@ static int wcd937x_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
|
||||
WCD937X_IRQ_HPHL_PDM_WD_INT);
|
||||
if (wcd937x->update_wcd_event)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_RX_MUTE,
|
||||
SLV_BOLERO_EVT_RX_MUTE,
|
||||
(WCD_RX1 << 0x10 | 0x1));
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
@@ -1589,10 +1590,10 @@ void wcd937x_disable_bcs_before_slow_insert(struct snd_soc_component *component,
|
||||
if (wcd937x->update_wcd_event) {
|
||||
if (bcs_disable)
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_BCS_CLK_OFF, 0);
|
||||
SLV_BOLERO_EVT_BCS_CLK_OFF, 0);
|
||||
else
|
||||
wcd937x->update_wcd_event(wcd937x->handle,
|
||||
WCD_BOLERO_EVT_BCS_CLK_OFF, 1);
|
||||
SLV_BOLERO_EVT_BCS_CLK_OFF, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1640,7 +1641,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
struct wcd_mbhc *mbhc;
|
||||
|
||||
switch (event) {
|
||||
case BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR:
|
||||
case BOLERO_SLV_EVT_TX_CH_HOLD_CLEAR:
|
||||
if (amic == 0x1 || amic == 0x2)
|
||||
reg = WCD937X_ANA_TX_CH2;
|
||||
else if (amic == 0x3)
|
||||
@@ -1651,7 +1652,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
mask = 0x20;
|
||||
snd_soc_component_update_bits(component, reg, mask, 0x00);
|
||||
break;
|
||||
case BOLERO_WCD_EVT_PA_OFF_PRE_SSR:
|
||||
case BOLERO_SLV_EVT_PA_OFF_PRE_SSR:
|
||||
snd_soc_component_update_bits(component, WCD937X_ANA_HPH,
|
||||
0xC0, 0x00);
|
||||
snd_soc_component_update_bits(component, WCD937X_ANA_EAR,
|
||||
@@ -1659,7 +1660,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
snd_soc_component_update_bits(component, WCD937X_AUX_AUXPA,
|
||||
0x80, 0x00);
|
||||
break;
|
||||
case BOLERO_WCD_EVT_SSR_DOWN:
|
||||
case BOLERO_SLV_EVT_SSR_DOWN:
|
||||
wcd937x->mbhc->wcd_mbhc.deinit_in_progress = true;
|
||||
mbhc = &wcd937x->mbhc->wcd_mbhc;
|
||||
wcd937x->usbc_hs_status = get_usbc_hs_status(component,
|
||||
@@ -1667,7 +1668,7 @@ static int wcd937x_event_notify(struct notifier_block *block,
|
||||
wcd937x_mbhc_ssr_down(wcd937x->mbhc, component);
|
||||
wcd937x_reset_low(wcd937x->dev);
|
||||
break;
|
||||
case BOLERO_WCD_EVT_SSR_UP:
|
||||
case BOLERO_SLV_EVT_SSR_UP:
|
||||
wcd937x_reset(wcd937x->dev);
|
||||
/* allow reset to take effect */
|
||||
usleep_range(10000, 10010);
|
||||
|
مرجع در شماره جدید
Block a user