Commit fb1edb4b authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: cht_bsw_rt5645: Register jacks at the card level

The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e0f7dd9d
......@@ -169,17 +169,17 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
return ret;
}
ret = snd_soc_jack_new(codec, "Headphone Jack",
SND_JACK_HEADPHONE,
&ctx->hp_jack);
ret = snd_soc_card_jack_new(runtime->card, "Headphone Jack",
SND_JACK_HEADPHONE, &ctx->hp_jack,
NULL, 0);
if (ret) {
dev_err(runtime->dev, "HP jack creation failed %d\n", ret);
return ret;
}
ret = snd_soc_jack_new(codec, "Mic Jack",
SND_JACK_MICROPHONE,
&ctx->mic_jack);
ret = snd_soc_card_jack_new(runtime->card, "Mic Jack",
SND_JACK_MICROPHONE, &ctx->mic_jack,
NULL, 0);
if (ret) {
dev_err(runtime->dev, "Mic jack creation failed %d\n", ret);
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment