summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/glk_rt5682_max98357a.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-07-15 16:11:58 +0200
committerTakashi Iwai <tiwai@suse.de>2022-07-15 16:11:58 +0200
commit29a249d72d31cde3cd24d43354b40019efdb48b1 (patch)
tree7b8b353a958b18e72ba14271dbd60f022fab2336 /sound/soc/intel/boards/glk_rt5682_max98357a.c
parentffb2759df7efbc00187bfd9d1072434a13a54139 (diff)
parent7fb72b7bf167a8047204d30e0e8affe6023363d9 (diff)
downloadlinux-29a249d72d31cde3cd24d43354b40019efdb48b1.tar.bz2
Merge tag 'asoc-v5.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v5.20 This is a big release thus far and there will probably be more changes to come, it's a combination of a larger than usual crop of new drivers and some subsysetm wide cleanups from Charles rather than anything structural. The SOF and Intel DSP code both also continue to be very actively developed. - Restructing of the set_fmt() callbacks to be specified in terms of the device rather than with semantics depending on if the device is supposed to be a CODEC or SoC, making things clearer in situations like CODEC to CODEC links. - Clean up of the way we flag which DAI naming scheme we use to reflect the progress that's been made modernising things. - Merge of more of the Intel AVS driver stack, including some board integrations. - New version 4 mechanism for communication with SOF DSPs. - Suppoort for dynamically selecting the PLL to use at runtime on i.MX platforms. - Improvements for CODEC to CODEC support in the generic cards. - Support for AMD Jadeite and various machines, Intel MetorLake DSPs, Mediatek MT8186 DSPs and MT6366, nVidia Tegra MDDRC, OPE and PEQ, NXP TFA9890, Qualcomm SDM845, WCD9335 and WAS883x, and Texas Instruments TAS2780.
Diffstat (limited to 'sound/soc/intel/boards/glk_rt5682_max98357a.c')
-rw-r--r--sound/soc/intel/boards/glk_rt5682_max98357a.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/sound/soc/intel/boards/glk_rt5682_max98357a.c b/sound/soc/intel/boards/glk_rt5682_max98357a.c
index 170164baae7d..cf0f89db3e20 100644
--- a/sound/soc/intel/boards/glk_rt5682_max98357a.c
+++ b/sound/soc/intel/boards/glk_rt5682_max98357a.c
@@ -78,6 +78,17 @@ static const struct snd_soc_dapm_widget geminilake_widgets[] = {
SND_SOC_DAPM_SPK("HDMI3", NULL),
};
+static struct snd_soc_jack_pin jack_pins[] = {
+ {
+ .pin = "Headphone Jack",
+ .mask = SND_JACK_HEADPHONE,
+ },
+ {
+ .pin = "Headset Mic",
+ .mask = SND_JACK_MICROPHONE,
+ },
+};
+
static const struct snd_soc_dapm_route geminilake_map[] = {
/* HP jack connectors - unknown if we have jack detection */
{ "Headphone Jack", NULL, "HPOL" },
@@ -173,10 +184,12 @@ static int geminilake_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
* Headset buttons map to the google Reference headset.
* These can be configured by userspace.
*/
- ret = snd_soc_card_jack_new(rtd->card, "Headset Jack",
- SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
- SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_LINEOUT,
- &ctx->geminilake_headset);
+ ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack",
+ SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
+ SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_LINEOUT,
+ &ctx->geminilake_headset,
+ jack_pins,
+ ARRAY_SIZE(jack_pins));
if (ret) {
dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret);
return ret;