Skip to content

Commit 6e28a0c

Browse files
committed
Merge series "Kconfig updates for DMIC and SOF HDMI support" from Pierre-Louis Bossart <[email protected]>:
This series provides the following updates to the Intel machine driver Kconfig: 1. The first patch adds the explicit dependency on GPIOLIB when SND_SOC_DMIC is selected. 2. SND_SOC_SOF_HDA_AUDIO_CODEC is required for using the legacy HDA codec driver for HDMI support in SOF. The last 3 three patches make the required changes to account for this. changes since v1: first patch for DMIC was merged already rebase for HDMI on top of Arnd's RT5682 changes. Libin Yang (3): ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition sound/soc/intel/boards/Kconfig | 20 ++++++++++---------- sound/soc/intel/boards/sof_pcm512x.c | 9 --------- sound/soc/intel/boards/sof_sdw.c | 8 -------- sound/soc/intel/boards/sof_sdw_hdmi.c | 7 ------- 4 files changed, 10 insertions(+), 34 deletions(-) base-commit: 89d73cc -- 2.20.1
2 parents b6f10d3 + 1e7cb64 commit 6e28a0c

File tree

4 files changed

+10
-34
lines changed

4 files changed

+10
-34
lines changed

sound/soc/intel/boards/Kconfig

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -411,13 +411,13 @@ config SND_SOC_INTEL_KBL_RT5660_MACH
411411

412412
endif ## SND_SOC_INTEL_KBL
413413

414-
if SND_SOC_SOF_GEMINILAKE && SND_SOC_SOF_HDA_LINK
414+
if SND_SOC_SOF_GEMINILAKE
415415

416416
config SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH
417417
tristate "GLK with DA7219 and MAX98357A in I2S Mode"
418418
depends on I2C && ACPI && GPIOLIB
419419
depends on MFD_INTEL_LPSS || COMPILE_TEST
420-
depends on SND_HDA_CODEC_HDMI
420+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
421421
select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
422422
help
423423
This adds support for ASoC machine driver for Geminilake platforms
@@ -429,7 +429,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
429429
tristate "GLK with RT5682 and MAX98357A in I2S Mode"
430430
depends on I2C && ACPI && GPIOLIB
431431
depends on MFD_INTEL_LPSS || COMPILE_TEST
432-
depends on SND_HDA_CODEC_HDMI
432+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
433433
select SND_SOC_RT5682_I2C
434434
select SND_SOC_MAX98357A
435435
select SND_SOC_DMIC
@@ -440,7 +440,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
440440
Say Y if you have such a device.
441441
If unsure select "N".
442442

443-
endif ## SND_SOC_SOF_GEMINILAKE && SND_SOC_SOF_HDA_LINK
443+
endif ## SND_SOC_SOF_GEMINILAKE
444444

445445
if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC
446446

@@ -463,9 +463,9 @@ if SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
463463
config SND_SOC_INTEL_SOF_RT5682_MACH
464464
tristate "SOF with rt5682 codec in I2S Mode"
465465
depends on I2C && ACPI && GPIOLIB
466-
depends on (SND_SOC_SOF_HDA_LINK && (MFD_INTEL_LPSS || COMPILE_TEST)) ||\
466+
depends on ((SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC) &&\
467+
(MFD_INTEL_LPSS || COMPILE_TEST)) ||\
467468
(SND_SOC_SOF_BAYTRAIL && (X86_INTEL_LPSS || COMPILE_TEST))
468-
depends on SND_HDA_CODEC_HDMI
469469
select SND_SOC_MAX98373
470470
select SND_SOC_RT1015
471471
select SND_SOC_RT5682_I2C
@@ -509,7 +509,7 @@ config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH
509509
tristate "CML with RT1011 and RT5682 in I2S Mode"
510510
depends on I2C && ACPI && GPIOLIB
511511
depends on MFD_INTEL_LPSS || COMPILE_TEST
512-
depends on SND_HDA_CODEC_HDMI
512+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
513513
select SND_SOC_RT1011
514514
select SND_SOC_RT5682_I2C
515515
select SND_SOC_DMIC
@@ -528,7 +528,7 @@ config SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH
528528
tristate "SOF with DA7219 and MAX98373/MAX98360A in I2S Mode"
529529
depends on I2C && ACPI && GPIOLIB
530530
depends on MFD_INTEL_LPSS || COMPILE_TEST
531-
depends on SND_HDA_CODEC_HDMI
531+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
532532
select SND_SOC_DA7219
533533
select SND_SOC_MAX98373
534534
select SND_SOC_DMIC
@@ -546,7 +546,7 @@ config SND_SOC_INTEL_EHL_RT5660_MACH
546546
tristate "EHL with RT5660 in I2S mode"
547547
depends on I2C && ACPI && GPIOLIB
548548
depends on MFD_INTEL_LPSS || COMPILE_TEST
549-
depends on SND_HDA_CODEC_HDMI
549+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
550550
select SND_SOC_RT5660
551551
select SND_SOC_DMIC
552552
help
@@ -563,7 +563,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
563563
depends on MFD_INTEL_LPSS || COMPILE_TEST
564564
depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST
565565
depends on SOUNDWIRE
566-
depends on SND_HDA_CODEC_HDMI
566+
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
567567
select SND_SOC_RT700_SDW
568568
select SND_SOC_RT711_SDW
569569
select SND_SOC_RT1308_SDW

sound/soc/intel/boards/sof_pcm512x.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ static struct snd_soc_dai_link_component platform_component[] = {
126126
}
127127
};
128128

129-
#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
130129
static int sof_card_late_probe(struct snd_soc_card *card)
131130
{
132131
struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
@@ -146,12 +145,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)
146145

147146
return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
148147
}
149-
#else
150-
static int sof_card_late_probe(struct snd_soc_card *card)
151-
{
152-
return 0;
153-
}
154-
#endif
155148

156149
static const struct snd_kcontrol_new sof_controls[] = {
157150
SOC_DAPM_PIN_SWITCH("Ext Spk"),
@@ -374,14 +367,12 @@ static int sof_audio_probe(struct platform_device *pdev)
374367
sof_pcm512x_quirk = SOF_PCM512X_SSP_CODEC(2);
375368
} else {
376369
dmic_be_num = 2;
377-
#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
378370
if (mach->mach_params.common_hdmi_codec_drv &&
379371
(mach->mach_params.codec_mask & IDISP_CODEC_MASK))
380372
ctx->idisp_codec = true;
381373

382374
/* links are always present in topology */
383375
hdmi_num = 3;
384-
#endif
385376
}
386377

387378
dmi_check_system(sof_pcm512x_quirk_table);

sound/soc/intel/boards/sof_sdw.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,7 @@ static int sof_card_dai_links_create(struct device *dev,
663663
struct snd_soc_card *card)
664664
{
665665
int ssp_num, sdw_be_num = 0, hdmi_num = 0, dmic_num;
666-
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
667666
struct snd_soc_dai_link_component *idisp_components;
668-
#endif
669667
struct snd_soc_dai_link_component *ssp_components;
670668
struct snd_soc_acpi_mach_params *mach_params;
671669
const struct snd_soc_acpi_link_adr *adr_link;
@@ -686,10 +684,8 @@ static int sof_card_dai_links_create(struct device *dev,
686684
for (i = 0; i < ARRAY_SIZE(codec_info_list); i++)
687685
codec_info_list[i].amp_num = 0;
688686

689-
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
690687
hdmi_num = sof_sdw_quirk & SOF_SDW_TGL_HDMI ?
691688
SOF_TGL_HDMI_COUNT : SOF_PRE_TGL_HDMI_COUNT;
692-
#endif
693689

694690
ssp_mask = SOF_SSP_GET_PORT(sof_sdw_quirk);
695691
/*
@@ -849,7 +845,6 @@ static int sof_card_dai_links_create(struct device *dev,
849845
INC_ID(be_id, cpu_id, link_id);
850846
}
851847

852-
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
853848
/* HDMI */
854849
if (hdmi_num > 0) {
855850
idisp_components = devm_kcalloc(dev, hdmi_num,
@@ -886,7 +881,6 @@ static int sof_card_dai_links_create(struct device *dev,
886881
sof_sdw_hdmi_init, NULL);
887882
INC_ID(be_id, cpu_id, link_id);
888883
}
889-
#endif
890884

891885
card->dai_link = links;
892886
card->num_links = num_links;
@@ -920,9 +914,7 @@ static int mc_probe(struct platform_device *pdev)
920914

921915
dmi_check_system(sof_sdw_quirk_table);
922916

923-
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
924917
INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
925-
#endif
926918

927919
card->dev = &pdev->dev;
928920

sound/soc/intel/boards/sof_sdw_hdmi.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "../../codecs/hdac_hdmi.h"
1717
#include "hda_dsp_common.h"
1818

19-
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
2019
static struct snd_soc_jack hdmi[MAX_HDMI_NUM];
2120

2221
struct hdmi_pcm {
@@ -89,9 +88,3 @@ int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
8988

9089
return hdac_hdmi_jack_port_init(component, &card->dapm);
9190
}
92-
#else
93-
int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
94-
{
95-
return 0;
96-
}
97-
#endif

0 commit comments

Comments
 (0)