mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
ASoC: qcom: common: add default jack dapm pins
If the soundcard does not specify the dapm pins, let the common code add these pins for jack. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/Message-Id: <20230302120327.10823-1-srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
012fa2622e
commit
82f76ac26c
1 changed files with 10 additions and 0 deletions
|
@ -8,6 +8,11 @@
|
|||
#include "qdsp6/q6afe.h"
|
||||
#include "common.h"
|
||||
|
||||
static const struct snd_soc_dapm_widget qcom_jack_snd_widgets[] = {
|
||||
SND_SOC_DAPM_HP("Headphone Jack", NULL),
|
||||
SND_SOC_DAPM_MIC("Mic Jack", NULL),
|
||||
};
|
||||
|
||||
int qcom_snd_parse_of(struct snd_soc_card *card)
|
||||
{
|
||||
struct device_node *np;
|
||||
|
@ -153,6 +158,11 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
|
|||
of_node_put(platform);
|
||||
}
|
||||
|
||||
if (!card->dapm_widgets) {
|
||||
card->dapm_widgets = qcom_jack_snd_widgets;
|
||||
card->num_dapm_widgets = ARRAY_SIZE(qcom_jack_snd_widgets);
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
of_node_put(cpu);
|
||||
|
|
Loading…
Reference in a new issue