ALSA/Audio problems on generic x86_64 running from live usb

Hello! I have been having issues getting Lakka’s audio to work on my device. Any/all advice is appreciated, I have gone through many older forum posts that people have made, and none of the solutions tried have worked. The main issue appears to be that Lakka is not seeing anything except my HDMI audio devices. The device is an intel celeron-based chromebook which I successfully run galliumOS on and have had no problems with sound (although that’s using pulse specifically). I had tested my lakka install with a usb soundcard and I was able to get that to work just fine, I just can’t seem to get the internal speaker or even the headphone jack working. I am unable to test the HDMI audio at this moment, although I did test it about a week back and it did not seem to work either.

Retroarch log:

[INFO] RetroArch 1.7.5 (Git fcf75fd)
[INFO] === Build =======================================
[INFO] Version: 1.7.5
[INFO] Git: fcf75fd
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Redirecting save file to "/storage/savefiles/.srm".
[INFO] Redirecting savestate to "/storage/savestates/.state".
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [DRM]: Found 3 connectors.
[INFO] [DRM]: Connector 0 connected: yes
[INFO] [DRM]: Connector 0 has 1 modes.
[INFO] [DRM]: Connector 0 assigned to monitor index: #1.
[INFO] [DRM]: Connector 1 connected: no
[INFO] [DRM]: Connector 1 has 0 modes.
[INFO] [DRM]: Connector 2 connected: no
[INFO] [DRM]: Connector 2 has 0 modes.
[INFO] [DRM]: Mode 0: (1366x768) 1366 x 768, 60 Hz
[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 1366x768.
[INFO] [EGL] Found EGL_EXT_platform_base, trying eglGetPlatformDisplayEXT
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Current context: 0x22c6620.
[INFO] [KMS]: New FB: 1366x768 (stride: 5632).
[INFO] [GL]: Vendor: Intel Open Source Technology Center, Renderer: Mesa DRI Intel(R) Bay Trail .
[INFO] [GL]: Version: 3.0 Mesa 17.1.3.
[INFO] [GL]: Using resolution 1366x768
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ... 
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [udev]: Keyboard #0 (/dev/input/event6).
[INFO] [udev]: Keyboard #1 (/dev/input/event5).
[INFO] [udev]: Mouse #0 (/dev/input/event7).
[INFO] [udev]: Mouse #1 (/dev/input/mouse0).
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: null
[INFO] Found shader "/tmp/shaders/bilinear.glslp"
[INFO] Found shader "/tmp/shaders/nearest.glslp"
[INFO] Found shader "/tmp/shaders/slang-conversion-template.glsl"
[INFO] Found shader "/tmp/shaders/stock.glsl"
[ERROR] [ALSA]: Failed to initialize...
[ERROR] Failed to initialize audio driver. Will continue without audio.
[INFO] [Menu]: Found menu display driver: "gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [LED]: LED driver = 'null' 0x7ea9a0
[INFO] [MIDI]: Initializing ...
[INFO] [MIDI]: Input disabled.
[INFO] [MIDI]: Output disabled.
[INFO] [MIDI]: Initialized "null" driver.
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/storage/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_favorites.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_video_history.lpl].
[INFO] Loading history file: [/storage/.config/retroarch/content_image_history.lpl].
[INFO] [GL]: VSync => on
[ERROR] failed_to_start_audio_driver
[INFO] [GL]: VSync => on
[INFO] [KMS]: New FB: 1366x768 (stride: 5632).
[INFO] [KMS]: New FB: 1366x768 (stride: 5632).
[ERROR] failed_to_start_audio_driver
[ERROR] failed_to_start_audio_driver
[INFO] [Config]: Saved new config to "/storage/.config/retroarch/retroarch.cfg".
[INFO] Unloading game..
[INFO] Unloading core..
[INFO] Unloading core symbols..
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

lsmod | grep snd:

snd_hda_codec_hdmi     45056  1
snd_hda_intel          28672  0
snd_hda_codec          90112  2 snd_hda_intel,snd_hda_codec_hdmi
snd_hwdep              16384  1 snd_hda_codec
snd_hda_core           49152  3 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi
snd_soc_max98090       86016  0
snd_intel_sst_acpi     16384  0
snd_soc_sst_match      16384  1 snd_intel_sst_acpi
snd_intel_sst_core     53248  1 snd_intel_sst_acpi
snd_soc_sst_atom_hifi2_platform    73728  1 snd_intel_sst_core

aplay -L:

null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output

Thank for the information.

Is it possible to provide also the output of lspci -nnk | grep Audio

Also did you try to make a test with nightly builds ?

Thank you.

lspci -nnk | grep Audio:

00:1b.0 Audio device [0403]: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller [8086:0f04] (rev 0e)
	Subsystem: Intel Corporation Atom Processor Z36xxx/Z37xxx Series High Definition Audio Controller [8086:0f04]

I have not yet tried the nightly builds. Also, under my current galliumOS install that is working on the same hardware, under the pulse audio system tray I can see that the default sink is a byt-max 98080, which I have confirmed by checking /proc/asound on the working system. cat /proc/asound/card0/id prints PCH while cat /proc/asound/card1/id prints bytmax98080

dmesg | grep byt-max:

[    6.271093] byt-max98090 byt-max98090: ASoC: CPU DAI baytrail-pcm-audio not registered
[    6.271203] byt-max98090 byt-max98090: snd_soc_register_card failed -517
[    6.579429] byt-max98090 byt-max98090: HiFi <-> baytrail-pcm-audio mapping ok
[    6.589235] input: byt-max98090 Headset as /devices/platform/80860F28:00/byt-max98090/sound/card1/input10

Hope any of this helps. Thank you for your time!

I just tried the march 10th nightly, sound was not working and appeared to throw the same errors/have the same problems.

It has been nearly a month and after doing tons of research I have still been unable to figure out a solution. Any other recommendations or advice besides waiting or trying the nightly builds over and over would be greatly appreciated.

May you try this testing build based on LE 9.

Thank you.

Hello gouchi I have the same problem to deal with.But I use Nvidia’s GTX740 graphics card as the output.With the Aplay-L command, I can see three options, but none of them are optional. Like this:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2019.04.08 22:46:02 =~=~=~=~=~=~=~=~=~=~=~=
login as: root
[email protected]'s password: 
###########################################
# Lakka - The DIY retro emulation console #
# ...... visit http://www.lakka.tv ...... #
###########################################

Lakka (official): devel-20190402002057-r28265-g9b82c91 (Generic.x86_64)
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# systemctl stop retroarch
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# audio_device = "hdmi锛?e[Je[J:CARD=NVidia,DEV=0"
-sh: audio_device: not found
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# 
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# audio_device = "hdmi?CARD=NVidia,DEV=0"e[J"e[J1":CARD=NVidia,DEV=1"e[Je[19D:CARD=NVidia,DEV=1"
-sh: audio_device: not found
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# 
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# audio_device = "hdmi:CARD=NVidia,DEV=1"e[J"e[J2""
-sh: audio_device: not found
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# 
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# audio_device = "hdmi:CARD=NVidia,DEV=2"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[J"e[Jn"u"l"l""
-sh: audio_device: not found
e[1;32mLakkae[1;32m:e[1;34m~ e[0m# exit

But now I have to output voice from DVI (HDMI). Do you have a solution?

@BDJoe360 Hi, did you make a test with the testing build based on LE 9 ?

Thank you.

Thank you very much, but I’m sorry. I am a Chinese living in China. I can’t download it from “drive. google. com”. Can you give me other links that can be used?

@BDJoe360 Can you try this link ? Thank you.

I tried this build and had the same problems. I tried every audio driver option (alsa, tinyalsa, alsathread, oss, null) including restarting after switching the driver and none of them can see any audio devices. When I click on the audio devices option the retroarch on-screen keyboard pops up. Left and right button presses don’t do anything. Any other ideas or builds I can try? Thanks for your help.

OK,I got it. But after the update (I installed it on the hard disk), it was stuck in the flower icon of the boot and completely useless.

@alan8r Can you try to provide some log ?

@BDJoe360 Try to use live boot as it is still early testing image. If it still doesn’t work, try to boot with live ssh textmode then try to launch RA manually. Also please try to provide some log at least Lakka system, graphics and dmesg logs.

Okay, I've tried live boot, but it still doesn't work.
I can boot with live ssh textmode butI don't know how to launch RA manually. 
Do you have a tutorial?
And the Log:
    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2019.04.13 22:46:45 =~=~=~=~=~=~=~=~=~=~=~=
    login as: root
    [email protected]'s password: 
    ###########################################
    # Lakka - The DIY retro emulation console #
    # ...... visit http://www.lakka.tv ...... #
    ###########################################

Lakka (official): devel-20190402002057-r28265-g9b82c91 (Generic.x86_64)
Lakka:~ # lsmod
Module                  Size  Used by
8021q                  24576  0
gamecon                20480  0
snd_hda_codec_hdmi     45056  1
snd_hda_intel          28672  0
rng_core               16384  0
snd_hda_codec          90112  2 snd_hda_intel,snd_hda_codec_hdmi
snd_hda_core           49152  3 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi
snd_hwdep              16384  1 snd_hda_codec
asus_atk0110           20480  0
parport_pc             40960  1
parport                36864  2 gamecon,parport_pc
overlay                49152  5
applespi               28672  0
Lakka:~ # lsmod | grep snd
snd_hda_codec_hdmi     45056  1
snd_hda_intel          28672  0
snd_hda_codec          90112  2 snd_hda_intel,snd_hda_codec_hdmi
snd_hda_core           49152  3 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi
snd_hwdep              16384  1 snd_hda_codec
Lakka:~ # aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
Lakka:~ # lspci -nnk | grep Audio
01:00.1 Audio device [0403]: NVIDIA Corporation GK208 HDMI/DP Audio Controller [10de:0e0f] (rev a1)
Subsystem: ZOTAC International (MCO) Ltd. GK208 HDMI/DP Audio Controller [19da:5327]
Lakka:~ # exit`

@BDJoe360 Try this documentation.