# error opening a sound device

## Adel Ahmed

If i try to use alsa in any application I usually get the following error:

ALSA Error: snd_pcm_hw_params(alsa_pcm, hw_params) Invalid argument

Error opening a sound device.

this error specifically is from mednafen, but i always get the snd_pcmhw_params from other programs, pulseaudio works fine. 

kerenl config:

https://pastebin.com/hzwjJNFz

my sound device does not show up in lspci but I have the following modules auto loaded:

```
adel@cherry ~ $ lsmod

Module                  Size  Used by

battery                20480  0

snd_soc_sst_bytcr_rt5651    28672  0

joydev                 24576  0

intel_spi_platform     16384  0

intel_spi              16384  1 intel_spi_platform

spi_nor                36864  1 intel_spi

mtd                    53248  2 intel_spi

mei_txe                24576  0

mei                    73728  1 mei_txe

intel_xhci_usb_role_switch    16384  0

roles                  16384  1 intel_xhci_usb_role_switch

snd_intel_sst_acpi     16384  1

snd_intel_sst_core     36864  1 snd_intel_sst_acpi

snd_soc_sst_atom_hifi2_platform    81920  2 snd_intel_sst_core

snd_soc_acpi_intel_match    24576  1 snd_intel_sst_acpi

snd_soc_acpi           16384  3 snd_soc_acpi_intel_match,snd_soc_sst_bytcr_rt5651,snd_intel_sst_acpi

snd_soc_rt5651         81920  1

snd_soc_rl6231         16384  1 snd_soc_rt5651

axp20x_i2c             16384  0

axp20x                 28672  1 axp20x_i2c

snd_soc_core          184320  3 snd_soc_rt5651,snd_soc_sst_bytcr_rt5651,snd_soc_sst_atom_hifi2_platform

r8723bs               671744  0

snd_compress           20480  1 snd_soc_core

ac97_bus               16384  1 snd_soc_core

efivarfs               16384  1
```

----------

## Banana

Have a look here for some more steps to check: https://forums.gentoo.org/viewtopic-t-1028150-highlight-sndpcmdmixopen.html

----------

## Adel Ahmed

I just went through that thread, the checks are all fine.

changing devices on my soud card produces static sounds like output

----------

## NeddySeagoon

Adel Ahmed,

Please post the content of /proc/asound/devices 

What sound output are you trying to use HDMI, analogue ... 

All these 

```
snd_soc_
```

modules look a bit scary.

Please post your 

```
lspci -nnk
```

 too.

----------

## Adel Ahmed

```
adel@cherry ~ $ cat /proc/asound/devices 

  0: [ 0]   : control

 16: [ 0- 0]: digital audio playback

 17: [ 0- 1]: digital audio playback

 24: [ 0- 0]: digital audio capture

 33:        : timer

```

I'm using my built in sound card to play music on the latpopt speaker, I don't know if that answers your question

```
adel@cherry ~ $ lspci -nnk

00:00.0 Host bridge [0600]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register [8086:2280] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register [8086:7270]

   Kernel driver in use: iosf_mbi_pci

00:02.0 VGA compatible controller [0300]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller [8086:22b0] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller [8086:7270]

   Kernel driver in use: i915

00:03.0 Multimedia controller [0480]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit [8086:22b8] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit [8086:7270]

00:0b.0 Signal processing controller [1180]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller [8086:22dc] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller [8086:7270]

00:14.0 USB controller [0c03]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller [8086:22b5] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller [8086:7270]

   Kernel driver in use: xhci_hcd

00:1a.0 Encryption controller [1080]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine [8086:2298] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine [8086:7270]

   Kernel driver in use: mei_txe

   Kernel modules: mei_txe

00:1f.0 ISA bridge [0601]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU [8086:229c] (rev 36)

   Subsystem: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU [8086:7270]

   Kernel driver in use: lpc_ich

```

----------

## Banana

I dont't see anything with "audio" in your lspci -nnk output. So do you know which hardware is build in? If you have dualboot with windows, maybe you can find the infor on the soundcard there.

----------

## Adel Ahmed

it's one of those baytrail laptops

audio is not connected via PCI, it's connected via acpi

----------

## Banana

uhm well, don't now anything about this.

Maybe this post can help: https://forums.gentoo.org/viewtopic-p-8264394.html

----------

## Adel Ahmed

tahnsk for sharing the link, it's extreemly useful

it did not solve the problem however

```
I found the following in dmesg:

[   51.594901] intel_sst_acpi 808622A8:00: FW Version 01.0b.02.02

[   53.358551]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[  292.091209]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[  487.506839] tar (4072) used greatest stack depth: 10120 bytes left

[  713.697619]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[  713.699024]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[  728.167223]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[  728.168721]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[ 1141.309296]  Audio Port: ASoC: no backend DAIs enabled for Audio Port

[ 1141.310795]  Audio Port: ASoC: no backend DAIs enabled for Audio Port
```

----------

## Adel Ahmed

I played a bit with thr kernel config

Alsa works a few minutes after the os boots, but thr sound is too fast and squeaky

----------

