mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
ASoC: codecs: da7219: Do not export da7219_aad_jack_det()
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Goal of the series is to drop any usage of the internal function. First, update all users to utilize component->set_jack() and then remove the relevant EXPORT_SYMBOL_GPL.
This commit is contained in:
commit
ec39862fdd
11 changed files with 20 additions and 22 deletions
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "acp.h"
|
||||
#include "../codecs/da7219.h"
|
||||
#include "../codecs/da7219-aad.h"
|
||||
#include "../codecs/rt5682.h"
|
||||
|
||||
#define CZ_PLAT_CLK 48000000
|
||||
|
@ -82,7 +81,7 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, &cz_jack);
|
||||
snd_soc_component_set_jack(component, &cz_jack, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ void da7219_aad_jack_det(struct snd_soc_component *component, struct snd_soc_jac
|
|||
DA7219_ACCDET_EN_MASK,
|
||||
(jack ? DA7219_ACCDET_EN_MASK : 0));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(da7219_aad_jack_det);
|
||||
|
||||
/*
|
||||
* Button/HPTest work
|
||||
|
@ -930,7 +929,6 @@ int da7219_aad_init(struct snd_soc_component *component)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(da7219_aad_init);
|
||||
|
||||
void da7219_aad_exit(struct snd_soc_component *component)
|
||||
{
|
||||
|
@ -948,7 +946,6 @@ void da7219_aad_exit(struct snd_soc_component *component)
|
|||
cancel_work_sync(&da7219_aad->btn_det_work);
|
||||
cancel_work_sync(&da7219_aad->hptest_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(da7219_aad_exit);
|
||||
|
||||
/*
|
||||
* AAD related I2C probe handling
|
||||
|
@ -972,7 +969,6 @@ int da7219_aad_probe(struct i2c_client *i2c)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(da7219_aad_probe);
|
||||
|
||||
MODULE_DESCRIPTION("ASoC DA7219 AAD Driver");
|
||||
MODULE_AUTHOR("Adam Thomson <Adam.Thomson.Opensource@diasemi.com>");
|
||||
|
|
|
@ -2633,11 +2633,20 @@ static int da7219_resume(struct snd_soc_component *component)
|
|||
#define da7219_resume NULL
|
||||
#endif
|
||||
|
||||
static int da7219_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jack,
|
||||
void *data)
|
||||
{
|
||||
da7219_aad_jack_det(component, jack);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_component_driver soc_component_dev_da7219 = {
|
||||
.probe = da7219_probe,
|
||||
.remove = da7219_remove,
|
||||
.suspend = da7219_suspend,
|
||||
.resume = da7219_resume,
|
||||
.set_jack = da7219_set_jack,
|
||||
.set_bias_level = da7219_set_bias_level,
|
||||
.controls = da7219_snd_controls,
|
||||
.num_controls = ARRAY_SIZE(da7219_snd_controls),
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include <sound/soc-dapm.h>
|
||||
#include <uapi/linux/input-event-codes.h>
|
||||
#include "../../../codecs/da7219.h"
|
||||
#include "../../../codecs/da7219-aad.h"
|
||||
|
||||
#define DA7219_DAI_NAME "da7219-hifi"
|
||||
|
||||
|
@ -110,7 +109,7 @@ static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, jack);
|
||||
snd_soc_component_set_jack(component, jack, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <sound/soc-acpi.h>
|
||||
#include "../../codecs/hdac_hdmi.h"
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
#include "../common/soc-intel-quirks.h"
|
||||
#include "hda_dsp_common.h"
|
||||
|
||||
|
@ -259,7 +258,7 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(broxton_headset.jack, SND_JACK_BTN_3,
|
||||
KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, &broxton_headset);
|
||||
snd_soc_component_set_jack(component, &broxton_headset, NULL);
|
||||
|
||||
snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <sound/soc.h>
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/hdac_hdmi.h"
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
|
||||
#define KBL_DIALOG_CODEC_DAI "da7219-hifi"
|
||||
#define KBL_MAXIM_CODEC_DAI "HiFi"
|
||||
|
@ -207,7 +206,7 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
da7219_aad_jack_det(component, &ctx->kabylake_headset);
|
||||
snd_soc_component_set_jack(component, &ctx->kabylake_headset, NULL);
|
||||
|
||||
ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
|
||||
if (ret)
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <sound/soc.h>
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/hdac_hdmi.h"
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
|
||||
#define KBL_DIALOG_CODEC_DAI "da7219-hifi"
|
||||
#define MAX98927_CODEC_DAI "max98927-aif1"
|
||||
|
@ -382,7 +381,7 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, &ctx->kabylake_headset);
|
||||
snd_soc_component_set_jack(component, &ctx->kabylake_headset, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
#include <linux/input.h>
|
||||
#include <linux/module.h>
|
||||
#include <sound/jack.h>
|
||||
#include <sound/pcm.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <sound/soc.h>
|
||||
#include <sound/soc-acpi.h>
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
#include "hda_dsp_common.h"
|
||||
|
||||
#define DIALOG_CODEC_DAI "da7219-hifi"
|
||||
|
@ -184,7 +184,7 @@ static int da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
da7219_aad_jack_det(component, jack);
|
||||
snd_soc_component_set_jack(component, jack, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <sound/pcm_params.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/rt1015.h"
|
||||
#include "../common/mtk-afe-platform-driver.h"
|
||||
|
@ -592,7 +591,7 @@ mt8183_da7219_max98357_headset_init(struct snd_soc_component *component)
|
|||
snd_jack_set_key(
|
||||
priv->headset_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, &priv->headset_jack);
|
||||
snd_soc_component_set_jack(component, &priv->headset_jack, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <sound/jack.h>
|
||||
#include <sound/pcm_params.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
#include "../../codecs/da7219-aad.h"
|
||||
#include "../../codecs/da7219.h"
|
||||
#include "../../codecs/mt6358.h"
|
||||
#include "../common/mtk-afe-platform-driver.h"
|
||||
|
@ -100,7 +100,7 @@ static int mt8186_da7219_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
|
||||
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(cmpnt_codec, &priv->headset_jack);
|
||||
snd_soc_component_set_jack(cmpnt_codec, &priv->headset_jack, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <sound/soc.h>
|
||||
#include "rockchip_i2s.h"
|
||||
#include "../codecs/da7219.h"
|
||||
#include "../codecs/da7219-aad.h"
|
||||
#include "../codecs/rt5514.h"
|
||||
|
||||
#define DRV_NAME "rk3399-gru-sound"
|
||||
|
@ -226,7 +225,7 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
|
|||
snd_jack_set_key(
|
||||
rockchip_sound_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
|
||||
|
||||
da7219_aad_jack_det(component, &rockchip_sound_jack);
|
||||
snd_soc_component_set_jack(component, &rockchip_sound_jack, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue