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
1 changed files with 6 additions and 6 deletions
|
@ -169,17 +169,17 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_soc_jack_new(codec, "Headphone Jack",
|
ret = snd_soc_card_jack_new(runtime->card, "Headphone Jack",
|
||||||
SND_JACK_HEADPHONE,
|
SND_JACK_HEADPHONE, &ctx->hp_jack,
|
||||||
&ctx->hp_jack);
|
NULL, 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(runtime->dev, "HP jack creation failed %d\n", ret);
|
dev_err(runtime->dev, "HP jack creation failed %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_soc_jack_new(codec, "Mic Jack",
|
ret = snd_soc_card_jack_new(runtime->card, "Mic Jack",
|
||||||
SND_JACK_MICROPHONE,
|
SND_JACK_MICROPHONE, &ctx->mic_jack,
|
||||||
&ctx->mic_jack);
|
NULL, 0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(runtime->dev, "Mic jack creation failed %d\n", ret);
|
dev_err(runtime->dev, "Mic jack creation failed %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue