# No soundcards found

## Sllyth

I have problem to get my soundcard working. i think the sound card is not detected, so what choices in kernel should be chose in order to detect the sound card.

"dmesg | grep sound" shows:

```

[    1.616758]   No soundcards found.

[    2.505773] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6

[    2.507176] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7

[    2.509879] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8

[    2.512613] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9

[    2.515450] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10

[    2.517430] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input11

```

"dmesg|grep snd" shows:

```

[    2.440791] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops 0xffffffffbd6b43c0)

[    2.460300] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC233: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker

[    2.460303] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)

[    2.460305] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)

[    2.460306] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0

[    2.460307] snd_hda_codec_realtek hdaudioC0D0:    inputs:

[    2.460309] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x12

```

in kernel, i chose:

```

Device Drivers --->

  Sound card support --->

    Advanced Linux Sound Architecture --->

      <*> Sequencer support

      <*>   Sequencer dummy client

      [*] PCI sound devices

          HD-Audio --->

             <*> HD Audio PCI 

             <M> Enable generic HD-audio codec parser

      (2048) Pre-allocated buffer size for HD-audio driver

      <*> ALSA for SoC audio support --->

          [*] Intel ASoC SST drivers

          <*>   SKL/BXT/KBL/GLK/CNL... Platforms

```

"lspci -k" shows:

```

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)

   Subsystem: Xiaomi Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers

   Kernel driver in use: skl_uncore

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 515 (rev 07)

   Subsystem: Xiaomi HD Graphics 515

   Kernel driver in use: i915

00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)

   Subsystem: Xiaomi Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem

   Kernel driver in use: proc_thermal

00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP USB 3.0 xHCI Controller

   Kernel driver in use: xhci_hcd

00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP Serial IO I2C Controller

   Kernel driver in use: intel-lpss

00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP Serial IO I2C Controller

   Kernel driver in use: intel-lpss

00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP CSME HECI

   Kernel driver in use: mei_me

00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP SATA Controller [AHCI mode]

   Kernel driver in use: ahci

00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)

   Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation Device 9d46 (rev 21)

   Subsystem: Xiaomi Device 1501

00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP PMC

00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP HD Audio

   Kernel driver in use: snd_hda_intel

00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)

   Subsystem: Xiaomi Sunrise Point-LP SMBus

   Kernel driver in use: i801_smbus

01:00.0 Network controller: Intel Corporation Wireless 8260 (rev 3a)

   Subsystem: Intel Corporation Wireless 8260

   Kernel driver in use: iwlwifi

   Kernel modules: iwlwifi

```

----------

## mike155

Which mainboard/hardware do you have?

Do I understand corectly that there is an ALC233 on your mainboard? Is the HD Audio Realtek driver enabled?

```
 HD-Audio --->

     <*> HD Audio PCI

     [ ] Build Realtek HD-audio codec support    <--- Enable this

     <M> Enable generic HD-audio codec parser
```

----------

## NeddySeagoon

Sllyth,

What do you have in /proc/asound/devices?

----------

## Sllyth

i have already enabled HD Audio Realtek driver, "cat .config|grep -i snd_hda" shows:

```

CONFIG_SND_HDA=y

CONFIG_SND_HDA_INTEL=y

CONFIG_SND_HDA_HWDEP=y

CONFIG_SND_HDA_RECONFIG=y

# CONFIG_SND_HDA_INPUT_BEEP is not set

# CONFIG_SND_HDA_PATCH_LOADER is not set

CONFIG_SND_HDA_CODEC_REALTEK=y

# CONFIG_SND_HDA_CODEC_ANALOG is not set

# CONFIG_SND_HDA_CODEC_SIGMATEL is not set

CONFIG_SND_HDA_CODEC_VIA=y

CONFIG_SND_HDA_CODEC_HDMI=y

# CONFIG_SND_HDA_CODEC_CIRRUS is not set

# CONFIG_SND_HDA_CODEC_CONEXANT is not set

# CONFIG_SND_HDA_CODEC_CA0110 is not set

# CONFIG_SND_HDA_CODEC_CA0132 is not set

# CONFIG_SND_HDA_CODEC_CMEDIA is not set

# CONFIG_SND_HDA_CODEC_SI3054 is not set

CONFIG_SND_HDA_GENERIC=y

CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

CONFIG_SND_HDA_CORE=y

CONFIG_SND_HDA_DSP_LOADER=y

CONFIG_SND_HDA_COMPONENT=y

CONFIG_SND_HDA_I915=y

CONFIG_SND_HDA_EXT_CORE=y

CONFIG_SND_HDA_PREALLOC_SIZE=2048

```

"cat /proc/asound/devices" shows:

```

  1:        : sequencer

  2: [ 0- 0]: digital audio playback

  3: [ 0- 0]: digital audio capture

  4: [ 0- 3]: digital audio playback

  5: [ 0- 7]: digital audio playback

  6: [ 0- 8]: digital audio playback

  7: [ 0- 9]: digital audio playback

  8: [ 0-10]: digital audio playback

  9: [ 0- 0]: hardware dependent

 10: [ 0- 2]: hardware dependent

 11: [ 0]   : control

 33:        : timer

```

----------

## NeddySeagoon

Sllyth,

That's correct. You have one sound card.

If you look in /dev/snd/ you will see all the sound card inputs and outputs.

Run alsamixer, it will show you the controls. They will all be muted to start with.

```
┌──┐

│MM│  

└──┘
```

Unmute Master, Front and PCM and set the sliders to about 70%. Does it work now?

Names vary but its essential that anything with IEC or SPDI/F in its name remain muted.

If you want sound over HDMI, there is more work to do.

----------

## Sllyth

NeddySeagoon, thank you for reply!

i run alsamixer, turn Master ==> 70%, Headphone ==> 40%, Speaker ==> 85%, PCM ==> 72%, Mic Boost ==> 53%

S/PDIF 1-4 stay 00

Auto-Mute Disabled, Loopback M Disabled

but still no sound

as what you said, is that i do not need to care about "No soundcards found" by "dmesg"?

"ls /dev/snd/" shows:

```

by-path

controlC0

hwC0D0

hwC0D2

pcmC0D0c

pcmC0D0p

pcmC0D10p

pcmC0D3p

pcmC0D7p

pcmC0D8p

pcmC0D9p

seq

timer

```

----------

## NeddySeagoon

Sllyth,

S/PDIF 1-4  must be MM.

Your sound card can operate at a sample rate of 44.1kHz, to match CDDA or 48kHz to match digital audio.

However, it can't do both together.

When both are active, digital wins and you get sound on the digital outputs only.

Take care with the Headphone controls. On some systems, there is a switch that detects headphones being connected.

That mutes the speaker output. On others, unmuting  Headphones mutes the speakers.

Its trial and error.

Your /dev/snd/ is correct for one sound card and I only see one card in lspci.

----------

## Sllyth

Yes! It works!   :Very Happy:  Thank you, NeddySeagoon!  :Smile: 

By the way, what need i do to get sound over HDMI?  It may be useful in the future  :Rolling Eyes: 

----------

## NeddySeagoon

Sllyth,

If you want sound over HDMI as default you need an /etc/asound.conf.

I have 

```
defaults.pcm.card 1

defaults.pcm.device 8

defaults.ctl.card 1
```

because I have several sound cards. As you only have card 0

Setting the default.pcm.device should be enough.

```
defaults.pcm.device 8
```

At present, it defaults to defaults.pcm.device 0 because the file is missing. 

The 8 will want some trial and error. That's what works for me.

If you want to play CDDA, encoded an 44.1kHz, you will need to convert it to 48kHz first. Its supposed to just work, but it didn't for me.

```
pcm_slave.slave_rate48000Hz {

        pcm "hw:1,8"

#       This is the rate the sond card does.

#       Any random input rates are resampled to this. 

        rate 48000

}

pcm.rate44100Hz {

        type plug

        slave slave_rate48000Hz

}
```

added in /etc/asound.conf fixes that.

Lastly, there is a wart on HDMI playback. It takes a second or so to open the stream at the start of every track. Loosing that sound is annoying. 

The opening drum beat from Dizzy is lost.

This is a bit of a hack. You open the stream at boot and play silence, so the stream is never opened and closed.

Create /etc/local.d/play_silence.start containing 

```
#!/bin/bash

# due to a kernel bug, alsa takes a few seconds to open a

# stream to HDMI (all digital?) outputs, so the first

# few seconds of everything are lost.

# the work around is to continuously play silence

# so that the sound stream is never closed.

aplay -c2 -r48000 -fS16_LE < /dev/zero &  
```

To switch application by application, configure each application as you go.

----------

## Sllyth

Thanks for replying in detail, NeddySeagoon! That looks like a little complex, maybe next month i will get to try it. Thanks a lot again!  :Very Happy: 

----------

## NeddySeagoon

Sllyth,

If you only want HDMI or Analogue, its painless once its set up.

----------

## Jaglover

You can use your HDMI sound without making it default, on application level.

----------

## Sllyth

Thank you all! But now i don't have a device on HDMI, maybe in one month or shorter, i will get one, then if there is any problem, i will come back.   :Wink: 

----------

