# [SOLVED] kernel config for sof (sound open firmware)?

## smartding

I just got a tiger lake based laptop, and when I was installing arch Linux on it, it requires installing the sof firmware.

After installing `sys-firmware/sof-firmware-1.9`, the sound works on gentoo too.

But I noticed "lspci -k" output from arch Linux and gentoo are different.

"lspci -k" output from gentoo:

```

00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)

   Subsystem: Device 1e83:3e35

   Kernel driver in use: snd_hda_intel

```

"lspci -k" output from arch Linux:

```

00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)

   Subsystem: Device 1e83:3e35

   Kernel driver in use: sof-audio-pci-intel-tgl

   Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl

```

Did I miss something when configuring gentoo kernel? I can't find a gentoo wiki page for sof.

Here's my complete kernel config: https://pastebin.com/raw/6YD7TVZaLast edited by smartding on Sat Oct 30, 2021 4:02 pm; edited 1 time in total

----------

## NeddySeagoon

smartding,

Maybe you did.

In the 

```
ALSA for SoC audio support --->
```

menu. Thats CONFIG_SND_SOC in search, which you set 

```
# CONFIG_SND_SOC is not set
```

are lots of Soc drivers but Tiger Lake-LP is not listed as its own entry.

The 

```
[*]   Sound Open Firmware Support
```

sub menu looks interesting.

You need

```
 - -       SOF support for Tigerlake 
```

but in my kernel its forced off.

The help reads

```
CONFIG_SND_SOC_SOF_TIGERLAKE:                                           │  

  │                                                                         │  

  │ This adds support for Sound Open Firmware for Intel(R) platforms        │  

  │ using the Tigerlake processors.                                         │  

  │ Say Y if you have such a device.                                        │  

  │ If unsure select "N".                                                   │  

  │                                                                         │  

  │ Symbol: SND_SOC_SOF_TIGERLAKE [=n]                                      │  

  │ Type  : tristate                                                        │  

  │ Defined at sound/soc/sof/intel/Kconfig:182                              │  

  │   Prompt: SOF support for Tigerlake                                     │  

  │   Depends on: SOUND [=y] && !UML && SND [=m] && SND_SOC [=m] && \       │  

  │ SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && \       │  

  │ SND_SOC_SOF_PCI [=n]                                                    │  

  │   Location:                                                             │  

  │     -> Device Drivers                                                   │  

  │       -> Sound card support (SOUND [=y])                                │  

  │         -> Advanced Linux Sound Architecture (SND [=m])                 │  

  │           -> ALSA for SoC audio support (SND_SOC [=m])                  │  

  │             -> Sound Open Firmware Support (SND_SOC_SOF_TOPLEVEL [=y])  │  

  │               -> SOF support for Intel audio DSPs (SND_SOC_SOF_INTEL_TO │  

  │ Selects: SND_SOC_SOF_INTEL_TGL [=n] 
```

But it will only appear in menuconfig if the boolean equation 

```
    Depends on: SOUND [=y] && !UML && SND [=m] && SND_SOC [=m] && \       │  

  │ SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_TOPLEVEL [=y] && \       │  

  │ SND_SOC_SOF_PCI [=n] 
```

 evaluate to true. Here it a string of things logically ANDed together. 

It's forced off because I have SND_SOC_SOF_PCI [=n].

A few hints an working with menuconfig.

1. Things that cannot be selected are usually hidden.

2. There is a search function. Press / and enter a search term. It only shows selectable items.

That's sub optimal if the thing you want is hidden, so,

3. Press the 'z' key on any menu where 'z' is not a shortcut.

This toggles the display of hidden items. There are lots.

4. Search will now find hidden items. They cannot be selected until the  Depends on: is true but now you can read it. :)

A side effect of this is that you find the kernel symbol you want and read its Depends on:

You got the the thing(s) you need to select and find its hidden too. Trace the  Depends on: and fix it recursively.

----------

## smartding

I finally got the sound working.

It turned out that enabling those config related to "ALSA for SoC audio support" and "Sound Open Firmware Support" wasn't enough.

I had to enable configs related to following stuff:

1.  Intel soundwire

1. machine driver for skylake (although I'm using tiger lake)

1. intel lpss

----------

## AstroFloyd

@Smartding,

Are you using initramfs (and/or genkernel)?

----------

## smartding

 *AstroFloyd wrote:*   

> @Smartding,
> 
> Are you using initramfs (and/or genkernel)?

 

I build kernel manually with the gentoo-sources pkg, I'm not using initramfs

----------

## AstroFloyd

@Smartding I apologise for the slow response, I was occupied elsewhere.  Thanks for your response, it 'sounds' (haha) promising for my situation.  Would you be willing to paste your kernel config again?  I'm running into the same/a similar problem and seem to be missing something...

Edit: I seem to have found the solution (with external help).  Your info helped me exclude the necessity for genkernel and/or initramfs - thanks for that!

----------

