Unverified Commit ec39862f authored by Mark Brown's avatar Mark Brown
Browse files

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.
parents 140ccd04 c05dff38
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
}
+0 −4
Original line number Diff line number Diff line
@@ -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>");
+9 −0
Original line number Diff line number Diff line
@@ -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),
+1 −2
Original line number Diff line number Diff line
@@ -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;
}
+1 −2
Original line number Diff line number Diff line
@@ -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");

Loading