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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e0f7dd9d88
commit
fb1edb4b68
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue