UPSTREAM: ASoC: hdmi-codec: Use set_jack ops to set jack
Use set_jack ops to set jack so machine drivers do not need to includehdmi-codec.h explicitly. Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org> Reviewed-by: Tzung-Bi Shih <tzungbi@google.com> Link:https://lore.kernel.org/r/20200922062316.1172935-1-cychiang@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 55c5cc63ab3277aa20637dc20f6528987ac23743) Change-Id: I5717c3e47ac9a8feb05b830b159c9ac9224f4136 Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
This commit is contained in:
@ -128,9 +128,6 @@ struct hdmi_codec_pdata {
|
||||
struct snd_soc_component;
|
||||
struct snd_soc_jack;
|
||||
|
||||
int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
|
||||
struct snd_soc_jack *jack);
|
||||
|
||||
#define HDMI_CODEC_DRV_NAME "hdmi-audio-codec"
|
||||
|
||||
#endif /* __HDMI_CODEC_H__ */
|
||||
|
||||
@ -773,13 +773,9 @@ static void plugged_cb(struct device *dev, bool plugged)
|
||||
hdmi_codec_jack_report(hcp, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* hdmi_codec_set_jack_detect - register HDMI plugged callback
|
||||
* @component: the hdmi-codec instance
|
||||
* @jack: ASoC jack to report (dis)connection events on
|
||||
*/
|
||||
int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
|
||||
struct snd_soc_jack *jack)
|
||||
static int hdmi_codec_set_jack(struct snd_soc_component *component,
|
||||
struct snd_soc_jack *jack,
|
||||
void *data)
|
||||
{
|
||||
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
|
||||
int ret = -EOPNOTSUPP;
|
||||
@ -795,7 +791,6 @@ int hdmi_codec_set_jack_detect(struct snd_soc_component *component,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hdmi_codec_set_jack_detect);
|
||||
|
||||
static const struct snd_soc_dai_driver hdmi_i2s_dai = {
|
||||
.name = "i2s-hifi",
|
||||
@ -848,6 +843,7 @@ static const struct snd_soc_component_driver hdmi_driver = {
|
||||
.use_pmdown_time = 1,
|
||||
.endianness = 1,
|
||||
.non_legacy_dai_naming = 1,
|
||||
.set_jack = hdmi_codec_set_jack,
|
||||
};
|
||||
|
||||
static int hdmi_codec_probe(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user