|
@@ -3036,7 +3036,7 @@ static int wm8994_codec_resume(struct snd_soc_codec *codec)
|
|
|
|
|
|
static void wm8994_handle_retune_mobile_pdata(struct wm8994_priv *wm8994)
|
|
|
{
|
|
|
- struct snd_soc_codec *codec = wm8994->codec;
|
|
|
+ struct snd_soc_codec *codec = wm8994->hubs.codec;
|
|
|
struct wm8994_pdata *pdata = wm8994->pdata;
|
|
|
struct snd_kcontrol_new controls[] = {
|
|
|
SOC_ENUM_EXT("AIF1.1 EQ Mode",
|
|
@@ -3094,16 +3094,16 @@ static void wm8994_handle_retune_mobile_pdata(struct wm8994_priv *wm8994)
|
|
|
wm8994->retune_mobile_enum.max = wm8994->num_retune_mobile_texts;
|
|
|
wm8994->retune_mobile_enum.texts = wm8994->retune_mobile_texts;
|
|
|
|
|
|
- ret = snd_soc_add_codec_controls(wm8994->codec, controls,
|
|
|
+ ret = snd_soc_add_codec_controls(wm8994->hubs.codec, controls,
|
|
|
ARRAY_SIZE(controls));
|
|
|
if (ret != 0)
|
|
|
- dev_err(wm8994->codec->dev,
|
|
|
+ dev_err(wm8994->hubs.codec->dev,
|
|
|
"Failed to add ReTune Mobile controls: %d\n", ret);
|
|
|
}
|
|
|
|
|
|
static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
|
|
|
{
|
|
|
- struct snd_soc_codec *codec = wm8994->codec;
|
|
|
+ struct snd_soc_codec *codec = wm8994->hubs.codec;
|
|
|
struct wm8994_pdata *pdata = wm8994->pdata;
|
|
|
int ret, i;
|
|
|
|
|
@@ -3132,10 +3132,10 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
|
|
|
};
|
|
|
|
|
|
/* We need an array of texts for the enum API */
|
|
|
- wm8994->drc_texts = devm_kzalloc(wm8994->codec->dev,
|
|
|
+ wm8994->drc_texts = devm_kzalloc(wm8994->hubs.codec->dev,
|
|
|
sizeof(char *) * pdata->num_drc_cfgs, GFP_KERNEL);
|
|
|
if (!wm8994->drc_texts) {
|
|
|
- dev_err(wm8994->codec->dev,
|
|
|
+ dev_err(wm8994->hubs.codec->dev,
|
|
|
"Failed to allocate %d DRC config texts\n",
|
|
|
pdata->num_drc_cfgs);
|
|
|
return;
|
|
@@ -3147,10 +3147,10 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
|
|
|
wm8994->drc_enum.max = pdata->num_drc_cfgs;
|
|
|
wm8994->drc_enum.texts = wm8994->drc_texts;
|
|
|
|
|
|
- ret = snd_soc_add_codec_controls(wm8994->codec, controls,
|
|
|
+ ret = snd_soc_add_codec_controls(wm8994->hubs.codec, controls,
|
|
|
ARRAY_SIZE(controls));
|
|
|
if (ret != 0)
|
|
|
- dev_err(wm8994->codec->dev,
|
|
|
+ dev_err(wm8994->hubs.codec->dev,
|
|
|
"Failed to add DRC mode controls: %d\n", ret);
|
|
|
|
|
|
for (i = 0; i < WM8994_NUM_DRC; i++)
|
|
@@ -3163,7 +3163,7 @@ static void wm8994_handle_pdata(struct wm8994_priv *wm8994)
|
|
|
if (pdata->num_retune_mobile_cfgs)
|
|
|
wm8994_handle_retune_mobile_pdata(wm8994);
|
|
|
else
|
|
|
- snd_soc_add_codec_controls(wm8994->codec, wm8994_eq_controls,
|
|
|
+ snd_soc_add_codec_controls(wm8994->hubs.codec, wm8994_eq_controls,
|
|
|
ARRAY_SIZE(wm8994_eq_controls));
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(pdata->micbias); i++) {
|
|
@@ -3318,7 +3318,7 @@ static void wm8994_mic_work(struct work_struct *work)
|
|
|
static irqreturn_t wm8994_mic_irq(int irq, void *data)
|
|
|
{
|
|
|
struct wm8994_priv *priv = data;
|
|
|
- struct snd_soc_codec *codec = priv->codec;
|
|
|
+ struct snd_soc_codec *codec = priv->hubs.codec;
|
|
|
|
|
|
#ifndef CONFIG_SND_SOC_WM8994_MODULE
|
|
|
trace_snd_soc_jack_irq(dev_name(codec->dev));
|
|
@@ -3431,7 +3431,7 @@ static void wm8958_default_micdet(u16 status, void *data)
|
|
|
static irqreturn_t wm1811_jackdet_irq(int irq, void *data)
|
|
|
{
|
|
|
struct wm8994_priv *wm8994 = data;
|
|
|
- struct snd_soc_codec *codec = wm8994->codec;
|
|
|
+ struct snd_soc_codec *codec = wm8994->hubs.codec;
|
|
|
int reg;
|
|
|
bool present;
|
|
|
|
|
@@ -3609,7 +3609,7 @@ EXPORT_SYMBOL_GPL(wm8958_mic_detect);
|
|
|
static irqreturn_t wm8958_mic_irq(int irq, void *data)
|
|
|
{
|
|
|
struct wm8994_priv *wm8994 = data;
|
|
|
- struct snd_soc_codec *codec = wm8994->codec;
|
|
|
+ struct snd_soc_codec *codec = wm8994->hubs.codec;
|
|
|
int reg, count;
|
|
|
|
|
|
/*
|
|
@@ -3699,13 +3699,11 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
|
|
unsigned int reg;
|
|
|
int ret, i;
|
|
|
|
|
|
- wm8994->codec = codec;
|
|
|
+ wm8994->hubs.codec = codec;
|
|
|
codec->control_data = control->regmap;
|
|
|
|
|
|
snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
|
|
|
|
|
|
- wm8994->codec = codec;
|
|
|
-
|
|
|
mutex_init(&wm8994->accdet_lock);
|
|
|
INIT_DELAYED_WORK(&wm8994->mic_work, wm8994_mic_work);
|
|
|
|