Re: [Sound-open-firmware] SoF support for 8086:9d71?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 16, 2020 at 1:48 AM Amadeusz Sławiński
<amadeuszx.slawinski@xxxxxxxxxxxxxxx> wrote:
>
> On 12/15/2020 6:21 PM, Pierre-Louis Bossart wrote:
> >
> >
> > On 12/14/20 9:54 PM, Kai-Heng Feng wrote:
> >>
> >>
> >> On Mon, Dec 14, 2020 at 13:33, Pierre-Louis Bossart
> >> <pierre-louis.bossart@xxxxxxxxxxxxxxx> wrote:
> >>>
> >>>> On more recent kernels legacy HDA stops working for device 8086:9d71:
> >>>> [   47.211381] snd_hda_intel 0000:00:1f.3: DSP detected with PCI
> >>>>  class/subclass/prog-if info 0x040100
> >>>> [   47.211383] snd_hda_intel 0000:00:1f.3: Digital mics found on
> >>>>  Skylake+ platform, using SST driver
> >>>>
> >>>> However, only legacy HDA supports it:
> >>>> 00:1f.3 Multimedia audio controller [0401]: Intel Corporation
> >>>> Sunrise  Point-LP HD Audio [8086:9d71] (rev 21)
> >>>> ..
> >>>>      Kernel modules: snd_hda_intel
> >>>>
> >>>> Ubuntu kernel doesn't select SND_SOC_INTEL_SKYLAKE, which builds
> >>>>  snd-soc-skl, because based on the Kconfig description SOF should
> >>>> support  it.
> >>>>
> >>>> I wonder if SND_SOC_INTEL_SKYLAKE should be select again?
> >>>
> >>> SOF does not support Skylake and Kabylake, and only the Up2 board for
> >>> APL. I am not sure what you mean by 'recent' kernels since this
> >>> dynamic selection has been in place for a year now?
> >>
> >> Ubuntu kernel only changed this in 20.10 release.
> >>
> >>>
> >>> At any rate, to make this work again:
> >>>
> >>> 1. You can select SND_SOC_INTEL_SKYLAKE or alternatively to be more
> >>> accurate:
> >>>
> >>> SND_SOC_INTEL_SKL
> >>> SND_SOC_INTEL_APL
> >>> SND_SOC_INTEL_KBL
> >>>
> >>> There are known issues with Conexant codecs, typically on HP devices,
> >>> only Realtek codecs are supported.
> >>
> >> Right, so we can't really enable this for generic distros like Ubuntu.
> >>
> >> Let me think of a more generic solution.
> >
> > Re-thinking about this, I actually don't know how this problem occurred:
> > the tables are conditionally built so you would only select SST if you
> > had the drivers compiled in.
> >
> > see sound/hda/intel-dsp-config.c:
> >
> > /* Kabylake-LP */
> > #if IS_ENABLED(CONFIG_SND_SOC_INTEL_KBL)
> >      {
> >          .flags = FLAG_SST,
> >          .device = 0x9d71,
> >          .dmi_table = (const struct dmi_system_id []) {
> >              {
> >                  .ident = "Google Chromebooks",
> >                  .matches = {
> >                      DMI_MATCH(DMI_SYS_VENDOR, "Google"),
> >                  }
> >              },
> >              {}
> >          }
> >      },
> >      {
> >          .flags = FLAG_SST | FLAG_SST_ONLY_IF_DMIC,
> >          .device = 0x9d71,
> >      },
> > #endif
> >
> > Something's not adding up here.
>
> Seems like you can enable CONFIG_SND_SOC_INTEL_KBL (and all other
> platforms), without enabling CONFIG_SND_SOC_INTEL_SKYLAKE, which enables
> building of snd_soc_skl module... I would say that there is something
> wrong with module dependencies in Kconfig :/

Yes that's exactly what happened here.
So I wonder why we need to separate CONFIG_SND_SOC_INTEL_SKYLAKE from
other configs...

> Will look at it tomorrow. In the meantime any chance we can get the
> config which was used, to confirm my suspicion?

Ubuntu 5.8 kernel has this:
# CONFIG_SND_SOC_INTEL_SKYLAKE is not set
CONFIG_SND_SOC_INTEL_SKL=m
CONFIG_SND_SOC_INTEL_APL=m
CONFIG_SND_SOC_INTEL_KBL=m
CONFIG_SND_SOC_INTEL_GLK=m
# CONFIG_SND_SOC_INTEL_CNL is not set
# CONFIG_SND_SOC_INTEL_CFL is not set
# CONFIG_SND_SOC_INTEL_CML_H is not set
# CONFIG_SND_SOC_INTEL_CML_LP is not set
CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m
CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m
# CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC is not set
CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m

So I guess we can do something like this?
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c
index 1c5114dedda9..c8142520532e 100644
--- a/sound/hda/intel-dsp-config.c
+++ b/sound/hda/intel-dsp-config.c
@@ -417,7 +417,7 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
                        return SND_INTEL_DSP_DRIVER_SOF;
        }

-
+#if IS_REACHABLE(CONFIG_SND_SOC_INTEL_SKYLAKE)
        if (cfg->flags & FLAG_SST) {
                if (cfg->flags & FLAG_SST_ONLY_IF_DMIC) {
                        if (snd_intel_dsp_check_dmic(pci)) {
@@ -428,6 +428,7 @@ int snd_intel_dsp_driver_probe(struct pci_dev *pci)
                        return SND_INTEL_DSP_DRIVER_SST;
                }
        }
+#endif

        return SND_INTEL_DSP_DRIVER_LEGACY;
 }

Kai-Heng

>
> Thanks,
> Amadeusz




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux