GalliumOS / galliumos-distro

Docs, issues, and artwork sources for GalliumOS
https://galliumos.org/
GNU General Public License v2.0
346 stars 11 forks source link

Skylake Platform Validation #274

Open reynhout opened 7 years ago

reynhout commented 7 years ago

Tracking validation tests and bug reports for GalliumOS support for Skylake models.

Please add observations for any Skylake model in comments!

Current Skylake status

jclulow commented 7 years ago

Oh, and the tool is here: https://github.com/jclulow/skylake-audio-topology

polarimetric commented 7 years ago

Awesome work @jclulow! Is your script SENTRY-specific or would we be able to use it for other models by replacing the dfw_sst.bin with the appropriate file from the ChromeOS repos? I can't wait to have audio on my CAVE.

jclulow commented 7 years ago

@polarimetric I really have no idea! It would be interesting to see if there's a different dfw_sst.bin for each model. So far, it's feeling like a pretty unfortunate architectural decision to require this topology file which may well be different for every computer.

polarimetric commented 7 years ago

@jclulow I'd be happy to test things here on my CAVE. It has the same hardware as your SENTRY (the nau8825 and max98357), so it's quite possible the topology file is the same.

jclulow commented 7 years ago

@polarimetric Sure, if you want to try the one I'm using at the moment, the binary is here: https://us-east.manta.joyent.com/jmc/public/tmp/0000_SENTRY_dfw_sst.bin

If you place that at /lib/firmware/dfw_sst.bin, and have the 4.9.4 kernel package installed, and create a blacklist file for snd-hda-intel, it might work for you!

I updated /etc/modprobe.d/snd-hda-intel.conf:

#options snd-hda-intel model=,alc283-dac-wcaps
blacklist snd-hda-intel
reynhout commented 7 years ago

@jclulow Awesome work!

I'm unable to test on Skylake, but if you can also take a look at the 4.10.5 kernel in the testing repo, that will be the way forward.

There are two builds, including a special one for Braswell. Both builds include the modules for (all?) Skylake models:

CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH=m

I can build test kernels or whatever else, if that's useful.

davidandru commented 7 years ago

@jclulow I tested on my CAVE after updating to the 4.9.4 kernel package and following your instructions placing the .bin in /lib/firmware/dfw_sst.bin and blacklisting the snd-hda-intel.conf. I cannot confirm audio output at this time but I do now have a "Dummy Output" listed in my output devices.

divx118 commented 7 years ago

@jclulow Great work :). I will try the tool. I probably will get a different tplg conf output as I think they are indeed device specific.

polarimetric commented 7 years ago

@jclulow I tried the tool on my CAVE with my own dfw_sst.bin; however, it appears that the file "custr.c" depends on a file "sys/debug.h" which is not included in the repository. I believe this file defines the "VERIFY" function used in custr.c, since the compiler is complaining that VERIFY is implicitly defined.

divx118 commented 7 years ago

@polarimetric You probably didn't get the header files from the chromeos kernel git. see the quote from @jclulow

I borrowed the relevant header files from the ChromeOS kernel.git repository, using the chromeos-3.18 branch

polarimetric commented 7 years ago

@divx118 Are those not the header files in the "from_3.18" folder of the tool repository?

jclulow commented 7 years ago

@polarimetric Sorry, that was totally my fault. I wrote the program on illumos (where I do most of my work). I've just pushed some fixes to make it run on my Linux desktop.

polarimetric commented 7 years ago

@jclulow No worries, thanks! I will try the updated version.

jclulow commented 7 years ago

I should note, also, that there's at least one piece of data (in the SENTRY dfw_sst.bin file) that I've not yet figured out how to encode. These are kcontrols where the ops.info value is SND_SOC_TPLG_CTL_BYTES. I think that they might have to become SectionControlBytes sections in the configuration file, to be referenced in widgets using bytes [] (akin to the mixers [] list that's there now).

This is kind of a mess, and it'd be great if there was somebody from the Intel skylake audio driver team who could weigh in.

polarimetric commented 7 years ago

@jclulow I successfully used the new version of your tool to generate an intermediate file and then used the latest version of alsatplg to build a dfw_sst.bin. Unfortunately, I was unable to get any further than the "Dummy output" @davidandru mentioned--at boot, I see several errors from snd_soc_skl saying Control load not supported 64:64:64. I've included the cave.conf file the tool generated if you would like to compare it to your sentry.conf file. cave.zip

Thanks again for your work on this!

divx118 commented 7 years ago

@jclulow @polarimetric

Ok, had some time today, but didn't get very far. I can create the .conf file fine with the tool but keep getting an error when compiling it to the binary blob. Same as I had before. https://pastebin.com/pfCvYiNr I use alsatplg version 1.1.3 freshly build from the alsa git. I probably am missing something stupid. I also tried compiling the other conf files, but they keep failing with the same message. BTW the cave.conf is the same as the sentry.conf. My lars.conf has some very minor changes to those two. diff from my conf file and sentry.conf is https://pastebin.com/x594MbxV

Things I did to install alsa-lib and alsa-utils:

$ git clone git://git.alsa-project.org/alsa-lib.git alsa-lib
$ cd alsa-lib
$ ./gitcompile
$ sudo make install
$ cd ../
$ git clone git://git.alsa-project.org/alsa-utils.git alsa-utils
$ cd alsa-utils
$ ./gitcompile
$ sudo make install

Maybe I am missing some tweaks or config stuff I need to do on the alsa source?

I get the same error messages with the dfw_sst.bin from the git as @polarimetric gets. The Control load not supported 64:64:64 can probably ignored since I also get that on chromeos. However the dmesg floading of Skl Audio Port: ASoC: no backend DAIs enabled for Skl Audio Port doesn't seem to do us any good.

ojab commented 7 years ago

I have no idea what GalliumOS is, but I've filled a kernel bug about missing sound in linux on HP Chromebook 13 G1: https://bugzilla.kernel.org/show_bug.cgi?id=195593 I assume it's the same issue.

divx118 commented 7 years ago

@ojab galliumos is just an ubuntu based release optimized for chromebooks. Yes, it is indeed the same issue. Thanks for posting the link to the bug report.

ForceConstant commented 7 years ago

I don't have a skylake computer yet, but am trying to help. Not sure if this works, but looking through kernel archives it seems one person keeps popping up @vinodkoul who is a developer at intel. So not sure if this mention will work. But worth a try to see if they can pop in here and help us. But I see that his email is listed on his github profile, so maybe someone could email him.

jclulow commented 7 years ago

@ForceConstant I have sent an e-mail with some questions. Hopefully we'll get some answers!

ForceConstant commented 7 years ago

@jclulow good, let me know if you get any good info from him. He is just replied to @ojab on the bugzilla issue, so maybe that info will be helpful also.

aBabyPenguin commented 7 years ago

It seems as though ojab has some form of audio working on his bugzilla post. Maybe investigation by greater minds than mine could apply it to GalliumOS? I'll keep my fingers crossed. Keep up the great work, guys!

kiko commented 7 years ago

Anyone get the audio working? The bugzilla became silent after @ojab reported so.

volfyd commented 7 years ago

I got Caroline working on Arch. Here's what I did (it should probably work on GalliumOS). I added the following files to my system:

/etc/modprobe/alsa.conf (not sure if necessary) /etc/modprobe/alsa-skl.conf /lib/firmware/dfw_sst.bin /usr/share/alsa/ucm/sklnau8825adi/HiFi.conf /usr/share/alsa/ucm/sklnau8825adi/sklnau8825adi.conf

and then I rebooted and ran

sudo alsaucm -c sklnau8825adi set _verb HiFi

Not sure if every single step is necessary or if there are better versions of these files to use. I wonder if the dfw_sst.bin and HiFi.conf I got from the bugzilla could be better versions based on the ones in chromeos. caroline-audio.zip

LufyCZ commented 7 years ago

You got audio running ?

volfyd commented 7 years ago

Correct.

LufyCZ commented 7 years ago

I guess its Caroline only ?

volfyd commented 7 years ago

You could try it on another Skylake system. It might work.

LufyCZ commented 7 years ago

kk, will try on LARS

LufyCZ commented 7 years ago

The output of the last command is:

alsaucm: unknown command 'set_verb'

reynhout commented 7 years ago

@volfyd Awesome, we'll check it out! What kernel version are you running? And can you share your kernel config (probably in /boot/config-$(uname -r)). Thanks!

volfyd commented 7 years ago

@Lukyczk , try set _verb with a space between set and _verb

volfyd commented 7 years ago

@reynhout Here's my kernel version and config. It's bog standard arch except for some tweaks to the touchscreen module.

$ uname -a
Linux cbpro 4.11.6-3-ARCH #1 SMP PREEMPT Thu Jun 22 12:21:46 CEST 2017 x86_64 GNU/Linux

/proc/config.gz config.gz

volfyd commented 7 years ago

If you make a (livecd?) build, I'd be happy to test for you. I run Arch mainly but I can throw something on a USB stick if you need to verify any changes.

LufyCZ commented 7 years ago

volfyd: lufy@lufy-chrome:~/Downloads/caroline-audio$ sudo alsaucm -c sklnau8825adi set _verb HiFi ALSA lib main.c:344:(execute_sequence) unable to open ctl device 'hw:sklnau8825adi' ALSA lib main.c:1546:(set_verb_user) error: failed to initialize new use case: HiFi

PennRobotics commented 7 years ago

First, to anyone working on the audio: Your excellent progress is much appreciated. I don't know enough about configuring an OS to be much help.

I have sentry/kunimitsu (Thinkpad 13) and get the same error as Lukyczk.

Is there a log that would show where the files volfyd uploaded are not being properly loaded? Should I instead try finding my board's variant of those 5 files on Google Git? Would any of these changes require rebuilding the kernel from source?

PennRobotics commented 7 years ago

Some other sites make reference to sklnau8825max instead of sklnau8825adi in ChromeOS for the sentry boards. Could this be relevant?

reynhout commented 7 years ago

@volfyd Thanks. The configs can vary greatly between different distros, but should be easy to narrow down in a diff.

The CAROLINE driver is for a new (previously-unseen, by me at least) hardware config. So there are (at least) three audio driver modules of interest in Skylake Chromebooks now:

Remaining TBD: ASUKA, SENTRY

The NAU88L25 chip seems to be used for headphones on all models.

With any luck, @volfyd's work on the ADI codec will be useful on other models, hopefully with just a bit more tweaking.

volfyd commented 7 years ago

My instructions make the speakers work but when I try to use Google Hangouts, it can't find the microphone so that will need to be fixed also. Probably a problem with the file from ojab's bugzilla post.

izk8 commented 6 years ago

attempt to read write outside of disk (hd0) Press any key to continue

Was fixed with @divx118 's suggestion:

Commenting the line if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi in /boot/grub/grub.cfg is a quick and dirty fix for now.

My machine is a ASUS C302C GalliumOS 4.8.17 using the m3 skyhook processor and some of MrChromebox's firmware.

Nothing beyond a 'quick and dirty' fix still? At least it seems to work...

llogiq commented 6 years ago

I have a CHELL and am willing to test (I'd also like to get audio running :smile:). Can we please get the steps to repro in one location? This is a bit hard to follow.

simonheb commented 6 years ago

@llogiq , did you get it together? I'm on an ASUS C302 (CAVE) and want to start playing around with this issue myself.

A different issue I believe wasn't raised before: when plugging into a low power USB c charger (phone), ChromeOS says "low power charger connected, your chromebook may not charge while it is turned on". Contrary GalliumOS doesn't seem to understand what's going on and alternates constantly between notifying me that a charger was connected and that it was disconnected again.

cahlenlee commented 6 years ago

Confirming that the audio fix @volfyd provided worked on latest GalliumOS running on Caroline. His reference to the 'modprobe' folder was actually 'modprobe.d' for me. I have the Testing repo turned on in case that effects anything.

llogiq commented 6 years ago

@simonheb I'm going pretty slowly here. I've just enabled testing and am now on a 4.12 kernel. Next up, try the caroline blobs.

To document my steps, all I did so far was run galliumos-repodist --enable testing & two reboots (the system was wonky after the first, but seems fine now).

llogiq commented 6 years ago

Update: I copied the files from this comment: https://github.com/GalliumOS/galliumos-distro/issues/274#issuecomment-311751198 , rebooted and ran the sudo alsaucm -c sklnau8825adi set _verb HiFi command – now sound output is working (both headphones and speakers). I'll check the microphone (internal and via headset) next. And alsa.conf wasn't necessary for me.

llogiq commented 6 years ago

Audio input still fails, the system finds neither the built-in microphone nor my headset's one if I jack it in. Anyone knows how to activate that?

aBabyPenguin commented 6 years ago

I can confirm after following llogiq's steps that I now have working audio output on my Chell with GalliumOS. No audio input, but I can definitely live with that for now.

demonveggie commented 6 years ago

I can also confirm audio output working on my Chell on arch, by putting alsa.conf and alsa-skl.conf in /etc/modprobe.d/, everything else in the same places

Rebooted and had working audio immediately I'm on kernel 4.12.4-2

simonheb commented 6 years ago

Can anyone with CAVE or LARS report the same and maybe post their logs on https://github.com/GalliumOS/galliumos-distro/issues/379

LufyCZ commented 6 years ago

@simonheb already posted a comment with confirming, that I have the the same log as the person before me. I have to reinstall GalliumOS, coz I got "error: attempt to read or write outside of disk 'hd0'. "Press any key to continue". "Failed to boot both default and fallback entries." ... Idk if it is because it is an .iso installed on a SD card or what, but it is gonna take a loong time before I get it reinstalled and updated to 4.12.

Edit: And forgot to mention, (again maybe it was coz of the .iso on a SD card) when I tried to power down GOS, it was just "shutdownlooping", and I always had to shut it down manually. Resume from sleep was also a bit of a problem. Sometimes it worked, but quite often did not. It was pretty annoying because I had to reboot.