Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73bd1902 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 156b3650 625753df
Loading
Loading
Loading
Loading
+15 −14
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@
#include "bolero-cdc.h"
#include "bolero-cdc.h"
#include "internal.h"
#include "internal.h"
#include "bolero-clk-rsc.h"
#include "bolero-clk-rsc.h"
#include "asoc/bolero-slave-internal.h"


#define DRV_NAME "bolero_codec"
#define DRV_NAME "bolero_codec"


@@ -202,37 +203,37 @@ static int bolero_cdc_update_wcd_event(void *handle, u16 event, u32 data)
	}
	}


	switch (event) {
	switch (event) {
	case WCD_BOLERO_EVT_RX_MUTE:
	case SLV_BOLERO_EVT_RX_MUTE:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_RX_MUTE, data);
				BOLERO_MACRO_EVT_RX_MUTE, data);
		break;
		break;
	case WCD_BOLERO_EVT_IMPED_TRUE:
	case SLV_BOLERO_EVT_IMPED_TRUE:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_IMPED_TRUE, data);
				BOLERO_MACRO_EVT_IMPED_TRUE, data);
		break;
		break;
	case WCD_BOLERO_EVT_IMPED_FALSE:
	case SLV_BOLERO_EVT_IMPED_FALSE:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_IMPED_FALSE, data);
				BOLERO_MACRO_EVT_IMPED_FALSE, data);
		break;
		break;
	case WCD_BOLERO_EVT_RX_COMPANDER_SOFT_RST:
	case SLV_BOLERO_EVT_RX_COMPANDER_SOFT_RST:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_RX_COMPANDER_SOFT_RST, data);
				BOLERO_MACRO_EVT_RX_COMPANDER_SOFT_RST, data);
		break;
		break;
	case WCD_BOLERO_EVT_BCS_CLK_OFF:
	case SLV_BOLERO_EVT_BCS_CLK_OFF:
		if (priv->macro_params[TX_MACRO].event_handler)
		if (priv->macro_params[TX_MACRO].event_handler)
			priv->macro_params[TX_MACRO].event_handler(
			priv->macro_params[TX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_BCS_CLK_OFF, data);
				BOLERO_MACRO_EVT_BCS_CLK_OFF, data);
		break;
		break;
	case WCD_BOLERO_EVT_RX_PA_GAIN_UPDATE:
	case SLV_BOLERO_EVT_RX_PA_GAIN_UPDATE:
		/* Update PA Gain only for bolero version 2.1 */
		/* Update PA Gain only for bolero version 2.1 */
		if (priv->version == BOLERO_VERSION_2_1)
		if (priv->version == BOLERO_VERSION_2_1)
			if (priv->macro_params[RX_MACRO].event_handler)
			if (priv->macro_params[RX_MACRO].event_handler)
@@ -241,13 +242,13 @@ static int bolero_cdc_update_wcd_event(void *handle, u16 event, u32 data)
					BOLERO_MACRO_EVT_RX_PA_GAIN_UPDATE,
					BOLERO_MACRO_EVT_RX_PA_GAIN_UPDATE,
					data);
					data);
		break;
		break;
	case WCD_BOLERO_EVT_HPHL_HD2_ENABLE:
	case SLV_BOLERO_EVT_HPHL_HD2_ENABLE:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
				BOLERO_MACRO_EVT_HPHL_HD2_ENABLE, data);
				BOLERO_MACRO_EVT_HPHL_HD2_ENABLE, data);
		break;
		break;
	case WCD_BOLERO_EVT_HPHR_HD2_ENABLE:
	case SLV_BOLERO_EVT_HPHR_HD2_ENABLE:
		if (priv->macro_params[RX_MACRO].event_handler)
		if (priv->macro_params[RX_MACRO].event_handler)
			priv->macro_params[RX_MACRO].event_handler(
			priv->macro_params[RX_MACRO].event_handler(
				priv->component,
				priv->component,
@@ -329,7 +330,7 @@ void bolero_clear_amic_tx_hold(struct device *dev, u16 adc_n)
		dev_err(dev, "%s: priv is null\n", __func__);
		dev_err(dev, "%s: priv is null\n", __func__);
		return;
		return;
	}
	}
	event = BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR;
	event = BOLERO_SLV_EVT_TX_CH_HOLD_CLEAR;
	if (adc_n == BOLERO_ADC0)
	if (adc_n == BOLERO_ADC0)
		amic = 0x1;
		amic = 0x1;
	else if (adc_n == BOLERO_ADC1)
	else if (adc_n == BOLERO_ADC1)
@@ -796,10 +797,10 @@ void bolero_wsa_pa_on(struct device *dev, bool adie_lb)
	}
	}
	if (adie_lb)
	if (adie_lb)
		bolero_cdc_notifier_call(priv,
		bolero_cdc_notifier_call(priv,
			BOLERO_WCD_EVT_PA_ON_POST_FSCLK_ADIE_LB);
			BOLERO_SLV_EVT_PA_ON_POST_FSCLK_ADIE_LB);
	else
	else
		bolero_cdc_notifier_call(priv,
		bolero_cdc_notifier_call(priv,
			BOLERO_WCD_EVT_PA_ON_POST_FSCLK);
			BOLERO_SLV_EVT_PA_ON_POST_FSCLK);
}
}
EXPORT_SYMBOL(bolero_wsa_pa_on);
EXPORT_SYMBOL(bolero_wsa_pa_on);


@@ -916,7 +917,7 @@ static int bolero_ssr_enable(struct device *dev, void *data)
			BOLERO_MACRO_EVT_SSR_UP, 0x0);
			BOLERO_MACRO_EVT_SSR_UP, 0x0);
	}
	}
	trace_printk("%s: SSR up events processed by all macros\n", __func__);
	trace_printk("%s: SSR up events processed by all macros\n", __func__);
	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_SSR_UP);
	bolero_cdc_notifier_call(priv, BOLERO_SLV_EVT_SSR_UP);
	return 0;
	return 0;
}
}


@@ -931,7 +932,7 @@ static void bolero_ssr_disable(struct device *dev, void *data)
		return;
		return;
	}
	}


	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_PA_OFF_PRE_SSR);
	bolero_cdc_notifier_call(priv, BOLERO_SLV_EVT_PA_OFF_PRE_SSR);
	regcache_cache_only(priv->regmap, true);
	regcache_cache_only(priv->regmap, true);


	mutex_lock(&priv->clk_lock);
	mutex_lock(&priv->clk_lock);
@@ -947,7 +948,7 @@ static void bolero_ssr_disable(struct device *dev, void *data)
			priv->component,
			priv->component,
			BOLERO_MACRO_EVT_SSR_DOWN, 0x0);
			BOLERO_MACRO_EVT_SSR_DOWN, 0x0);
	}
	}
	bolero_cdc_notifier_call(priv, BOLERO_WCD_EVT_SSR_DOWN);
	bolero_cdc_notifier_call(priv, BOLERO_SLV_EVT_SSR_DOWN);
}
}


static struct snd_info_entry_ops bolero_info_ops = {
static struct snd_info_entry_ops bolero_info_ops = {
+0 −22
Original line number Original line Diff line number Diff line
@@ -9,16 +9,6 @@


#define BOLERO_CDC_CHILD_DEVICES_MAX 6
#define BOLERO_CDC_CHILD_DEVICES_MAX 6


/* from bolero to WCD events */
enum {
	BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR = 1,
	BOLERO_WCD_EVT_PA_OFF_PRE_SSR,
	BOLERO_WCD_EVT_SSR_DOWN,
	BOLERO_WCD_EVT_SSR_UP,
	BOLERO_WCD_EVT_PA_ON_POST_FSCLK,
	BOLERO_WCD_EVT_PA_ON_POST_FSCLK_ADIE_LB,
};

enum {
enum {
	REG_NO_ACCESS,
	REG_NO_ACCESS,
	RD_REG,
	RD_REG,
@@ -26,18 +16,6 @@ enum {
	RD_WR_REG
	RD_WR_REG
};
};


/* from WCD to bolero events */
enum {
	WCD_BOLERO_EVT_RX_MUTE = 1, /* for RX mute/unmute */
	WCD_BOLERO_EVT_IMPED_TRUE,   /* for imped true */
	WCD_BOLERO_EVT_IMPED_FALSE,  /* for imped false */
	WCD_BOLERO_EVT_RX_COMPANDER_SOFT_RST,
	WCD_BOLERO_EVT_BCS_CLK_OFF,
	WCD_BOLERO_EVT_RX_PA_GAIN_UPDATE,
	WCD_BOLERO_EVT_HPHL_HD2_ENABLE, /* to enable hd2 config for hphl */
	WCD_BOLERO_EVT_HPHR_HD2_ENABLE, /* to enable hd2 config for hphr */
};

struct wcd_ctrl_platform_data {
struct wcd_ctrl_platform_data {
	void *handle;
	void *handle;
	int (*update_wcd_event)(void *handle, u16 event, u32 data);
	int (*update_wcd_event)(void *handle, u16 event, u32 data);
+0 −18
Original line number Original line Diff line number Diff line
@@ -125,24 +125,6 @@ enum {
	WCD_RX3
	WCD_RX3
};
};


enum {
	BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR = 1,
	BOLERO_WCD_EVT_PA_OFF_PRE_SSR,
	BOLERO_WCD_EVT_SSR_DOWN,
	BOLERO_WCD_EVT_SSR_UP,
};

enum {
	WCD_BOLERO_EVT_RX_MUTE = 1,	/* for RX mute/unmute */
	WCD_BOLERO_EVT_IMPED_TRUE,	/* for imped true */
	WCD_BOLERO_EVT_IMPED_FALSE,	/* for imped false */
	WCD_BOLERO_EVT_RX_COMPANDER_SOFT_RST,
	WCD_BOLERO_EVT_BCS_CLK_OFF,
	WCD_BOLERO_EVT_RX_PA_GAIN_UPDATE, /* To reduce PA gain for low SoC */
	WCD_BOLERO_EVT_HPHL_HD2_ENABLE, /* to enable hd2 config for hphl */
	WCD_BOLERO_EVT_HPHR_HD2_ENABLE, /* to enable hd2 config for hphr */
};

enum {
enum {
	/* INTR_CTRL_INT_MASK_0 */
	/* INTR_CTRL_INT_MASK_0 */
	ROULEUR_IRQ_MBHC_BUTTON_PRESS_DET = 0,
	ROULEUR_IRQ_MBHC_BUTTON_PRESS_DET = 0,
+22 −21
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@
#include <dt-bindings/sound/audio-codec-port-types.h>
#include <dt-bindings/sound/audio-codec-port-types.h>
#include <asoc/msm-cdc-supply.h>
#include <asoc/msm-cdc-supply.h>
#include <linux/power_supply.h>
#include <linux/power_supply.h>
#include "asoc/bolero-slave-internal.h"


#define DRV_NAME "rouleur_codec"
#define DRV_NAME "rouleur_codec"


@@ -646,7 +647,7 @@ static int rouleur_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
		/* Enable HD2 Config for HPHR if foundry id is SEC */
		/* Enable HD2 Config for HPHR if foundry id is SEC */
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHR_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHR_HD2_ENABLE,
						0x04);
						0x04);
		snd_soc_component_update_bits(component,
		snd_soc_component_update_bits(component,
			ROULEUR_DIG_SWR_PDM_WD_CTL1,
			ROULEUR_DIG_SWR_PDM_WD_CTL1,
@@ -664,7 +665,7 @@ static int rouleur_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,


		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX2 << 0x10));
						(WCD_RX2 << 0x10));
		wcd_enable_irq(&rouleur->irq_info,
		wcd_enable_irq(&rouleur->irq_info,
				ROULEUR_IRQ_HPHR_PDM_WD_INT);
				ROULEUR_IRQ_HPHR_PDM_WD_INT);
@@ -674,7 +675,7 @@ static int rouleur_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,
				ROULEUR_IRQ_HPHR_PDM_WD_INT);
				ROULEUR_IRQ_HPHR_PDM_WD_INT);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX2 << 0x10 | 0x1));
						(WCD_RX2 << 0x10 | 0x1));
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
					     WCD_EVENT_PRE_HPHR_PA_OFF,
					     WCD_EVENT_PRE_HPHR_PA_OFF,
@@ -694,7 +695,7 @@ static int rouleur_codec_enable_hphr_pa(struct snd_soc_dapm_widget *w,


		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHR_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHR_HD2_ENABLE,
						0x00);
						0x00);
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
					     WCD_EVENT_POST_HPHR_PA_OFF,
					     WCD_EVENT_POST_HPHR_PA_OFF,
@@ -728,7 +729,7 @@ static int rouleur_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
		usleep_range(200, 210);
		usleep_range(200, 210);
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHL_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHL_HD2_ENABLE,
						0x04);
						0x04);
		snd_soc_component_update_bits(component,
		snd_soc_component_update_bits(component,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
@@ -746,7 +747,7 @@ static int rouleur_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,


		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10));
						(WCD_RX1 << 0x10));
		wcd_enable_irq(&rouleur->irq_info,
		wcd_enable_irq(&rouleur->irq_info,
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
@@ -756,7 +757,7 @@ static int rouleur_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10 | 0x1));
						(WCD_RX1 << 0x10 | 0x1));
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
					     WCD_EVENT_PRE_HPHL_PA_OFF,
					     WCD_EVENT_PRE_HPHL_PA_OFF,
@@ -775,7 +776,7 @@ static int rouleur_codec_enable_hphl_pa(struct snd_soc_dapm_widget *w,


		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHL_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHL_HD2_ENABLE,
						0x00);
						0x00);
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
		blocking_notifier_call_chain(&rouleur->mbhc->notifier,
					     WCD_EVENT_POST_HPHL_PA_OFF,
					     WCD_EVENT_POST_HPHL_PA_OFF,
@@ -819,7 +820,7 @@ static int rouleur_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
				0x40, 0x00);
				0x40, 0x00);
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHL_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHL_HD2_ENABLE,
						0x04);
						0x04);
		snd_soc_component_update_bits(component,
		snd_soc_component_update_bits(component,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
@@ -832,7 +833,7 @@ static int rouleur_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
				0x0F, 0x04);
				0x0F, 0x04);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10));
						(WCD_RX1 << 0x10));
		wcd_enable_irq(&rouleur->irq_info,
		wcd_enable_irq(&rouleur->irq_info,
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
@@ -842,14 +843,14 @@ static int rouleur_codec_enable_ear_pa(struct snd_soc_dapm_widget *w,
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10 | 0x1));
						(WCD_RX1 << 0x10 | 0x1));
		break;
		break;
	case SND_SOC_DAPM_POST_PMD:
	case SND_SOC_DAPM_POST_PMD:
		usleep_range(5000, 5100);
		usleep_range(5000, 5100);
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
		if (rouleur->foundry_id == FOUNDRY_ID_SEC)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_HPHL_HD2_ENABLE,
						SLV_BOLERO_EVT_HPHL_HD2_ENABLE,
						0x00);
						0x00);
		snd_soc_component_update_bits(component,
		snd_soc_component_update_bits(component,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
				ROULEUR_DIG_SWR_PDM_WD_CTL0,
@@ -897,7 +898,7 @@ static int rouleur_codec_enable_lo_pa(struct snd_soc_dapm_widget *w,
				0x0F, 0x04);
				0x0F, 0x04);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10));
						(WCD_RX1 << 0x10));
		wcd_enable_irq(&rouleur->irq_info,
		wcd_enable_irq(&rouleur->irq_info,
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
				ROULEUR_IRQ_HPHL_PDM_WD_INT);
@@ -907,7 +908,7 @@ static int rouleur_codec_enable_lo_pa(struct snd_soc_dapm_widget *w,
					ROULEUR_IRQ_HPHL_PDM_WD_INT);
					ROULEUR_IRQ_HPHL_PDM_WD_INT);
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_RX_MUTE,
						SLV_BOLERO_EVT_RX_MUTE,
						(WCD_RX1 << 0x10 | 0x1));
						(WCD_RX1 << 0x10 | 0x1));
		break;
		break;
	case SND_SOC_DAPM_POST_PMD:
	case SND_SOC_DAPM_POST_PMD:
@@ -1371,10 +1372,10 @@ void rouleur_disable_bcs_before_slow_insert(struct snd_soc_component *component,
	if (rouleur->update_wcd_event) {
	if (rouleur->update_wcd_event) {
		if (bcs_disable)
		if (bcs_disable)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_BCS_CLK_OFF, 0);
						SLV_BOLERO_EVT_BCS_CLK_OFF, 0);
		else
		else
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
						WCD_BOLERO_EVT_BCS_CLK_OFF, 1);
						SLV_BOLERO_EVT_BCS_CLK_OFF, 1);
	}
	}
}
}


@@ -1420,7 +1421,7 @@ static int rouleur_event_notify(struct notifier_block *block,
	struct wcd_mbhc *mbhc;
	struct wcd_mbhc *mbhc;


	switch (event) {
	switch (event) {
	case BOLERO_WCD_EVT_PA_OFF_PRE_SSR:
	case BOLERO_SLV_EVT_PA_OFF_PRE_SSR:
		snd_soc_component_update_bits(component,
		snd_soc_component_update_bits(component,
					ROULEUR_ANA_HPHPA_CNP_CTL_2,
					ROULEUR_ANA_HPHPA_CNP_CTL_2,
					0xC0, 0x00);
					0xC0, 0x00);
@@ -1437,7 +1438,7 @@ static int rouleur_event_notify(struct notifier_block *block,
				ROULEUR_ANA_COMBOPA_CTL,
				ROULEUR_ANA_COMBOPA_CTL,
				0x80, 0x00);
				0x80, 0x00);
		break;
		break;
	case BOLERO_WCD_EVT_SSR_DOWN:
	case BOLERO_SLV_EVT_SSR_DOWN:
		rouleur->dev_up = false;
		rouleur->dev_up = false;
		rouleur->mbhc->wcd_mbhc.deinit_in_progress = true;
		rouleur->mbhc->wcd_mbhc.deinit_in_progress = true;
		mbhc = &rouleur->mbhc->wcd_mbhc;
		mbhc = &rouleur->mbhc->wcd_mbhc;
@@ -1446,7 +1447,7 @@ static int rouleur_event_notify(struct notifier_block *block,
		rouleur_mbhc_ssr_down(rouleur->mbhc, component);
		rouleur_mbhc_ssr_down(rouleur->mbhc, component);
		rouleur_reset(rouleur->dev, 0x01);
		rouleur_reset(rouleur->dev, 0x01);
		break;
		break;
	case BOLERO_WCD_EVT_SSR_UP:
	case BOLERO_SLV_EVT_SSR_UP:
		rouleur_reset(rouleur->dev, 0x00);
		rouleur_reset(rouleur->dev, 0x00);
		/* allow reset to take effect */
		/* allow reset to take effect */
		usleep_range(10000, 10010);
		usleep_range(10000, 10010);
@@ -2094,7 +2095,7 @@ static void rouleur_evaluate_soc(struct work_struct *work)
		/* Reduce PA Gain by 6DB for low SoC */
		/* Reduce PA Gain by 6DB for low SoC */
		if (rouleur->update_wcd_event)
		if (rouleur->update_wcd_event)
			rouleur->update_wcd_event(rouleur->handle,
			rouleur->update_wcd_event(rouleur->handle,
					WCD_BOLERO_EVT_RX_PA_GAIN_UPDATE,
					SLV_BOLERO_EVT_RX_PA_GAIN_UPDATE,
					true);
					true);
		rouleur->low_soc = true;
		rouleur->low_soc = true;
		ret = msm_cdc_set_supply_min_voltage(rouleur->dev,
		ret = msm_cdc_set_supply_min_voltage(rouleur->dev,
@@ -2113,7 +2114,7 @@ static void rouleur_evaluate_soc(struct work_struct *work)
			/* Reset PA Gain to default for normal SoC */
			/* Reset PA Gain to default for normal SoC */
			if (rouleur->update_wcd_event)
			if (rouleur->update_wcd_event)
				rouleur->update_wcd_event(rouleur->handle,
				rouleur->update_wcd_event(rouleur->handle,
					WCD_BOLERO_EVT_RX_PA_GAIN_UPDATE,
					SLV_BOLERO_EVT_RX_PA_GAIN_UPDATE,
					false);
					false);
			ret = msm_cdc_set_supply_min_voltage(rouleur->dev,
			ret = msm_cdc_set_supply_min_voltage(rouleur->dev,
						rouleur->supplies,
						rouleur->supplies,
+0 −15
Original line number Original line Diff line number Diff line
@@ -128,21 +128,6 @@ enum {
	WCD_RX3
	WCD_RX3
};
};


enum {
	BOLERO_WCD_EVT_TX_CH_HOLD_CLEAR = 1,
	BOLERO_WCD_EVT_PA_OFF_PRE_SSR,
	BOLERO_WCD_EVT_SSR_DOWN,
	BOLERO_WCD_EVT_SSR_UP,
};

enum {
	WCD_BOLERO_EVT_RX_MUTE = 1,	/* for RX mute/unmute */
	WCD_BOLERO_EVT_IMPED_TRUE,	/* for imped true */
	WCD_BOLERO_EVT_IMPED_FALSE,	/* for imped false */
	WCD_BOLERO_EVT_RX_COMPANDER_SOFT_RST,
	WCD_BOLERO_EVT_BCS_CLK_OFF,
};

enum {
enum {
	/* INTR_CTRL_INT_MASK_0 */
	/* INTR_CTRL_INT_MASK_0 */
	WCD937X_IRQ_MBHC_BUTTON_PRESS_DET = 0,
	WCD937X_IRQ_MBHC_BUTTON_PRESS_DET = 0,
Loading