Update: I got audio working and I was able to map the function keys. In both cases this was done using the WeirdTreeThing scripts but in both cases I had to modify the process to get it to work. Here are the specifics:
Audio
I ran the WeirdTreeThing/chromebook-linux-audio script. The 1st time it through an error - see the output below:
apkeaton@chromebook:\~/Downloads/chromebook-linux-audio$ ./setup-audio
\[sudo\] password for apkeaton:
Detecting platform
Detected Intel Alderlake-N
zstd: /lib/firmware/intel/sof-tplg/sof-adl-rt1019-rt5682.tplg.zst already exists; overwrite (y/n) ? n
Not overwritten
failed to run command: zstd blobs/adl/sof-adl-rt1019-rt5682.tplg -o /lib/firmware/intel/sof-tplg/sof-adl-rt1019-rt5682.tplg.zst
Installing UCM configuration
Cloning into ‘/tmp/alsa-ucm-conf-cros’…
remote: Enumerating objects: 117, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 117 (delta 35), reused 96 (delta 30), pack-reused 0 (from 0)
Receiving objects: 100% (117/117), 20.81 KiB | 5.20 MiB/s, done.
Resolving deltas: 100% (35/35), done.
Checking kernel config for 6.14.0-37-generic
Detecting codecs
Found rt5650
Kernel config check passed
Increasing alsa headroom (fixes instability)
Initializing sound card
alsa-lib parser.c:270:(parse_syntax_field) Incompatible syntax 7 in sof-rt5650.conf
alsa-lib main.c:1554:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -22
Found hardware: “sof-rt5650” “Intel Alderlake-P HDMI” “HDA:8086281c,80860101,00100000” “” “”
Hardware is initialized using a generic method
Audio setup finished! Reboot to complete setup.
Warning: Your distro is not officially supported. Expect Issues.
Please try a supported distro first before opening an issue. See the README for a list of supported distros.
Note the error: “alsa-lib parser.c:270:(parse_syntax_field) Incompatible syntax 7 in sof-rt5650.conf”. I Googled this error and found that a possible solution was to change the “Syntax” value in the file from 7 to 6 to be allow it to run in older Linux versions. Note, I am running Linux Mint 22.3.
After the script was run the 1st time, I ran the following commands:
find /usr/share/alsa -type f -iname “sof-rt5650.conf”
sudo nano /usr/share/alsa/ucm2/conf.d/sof-rt5650/sof-rt5650.conf
sudo alsactl init; true
- The find command finds the path to the “sof-rt5650.conf” file.
- The “sof-rt5650.conf” file is edited to change “Syntax 7” to “Syntax 6” on the 1st line.
- The alsactl registers the new conf file.
After a reboot audio was working.
Mapping Function Keys
I used the WeirdTreeThing/cros-keyboard-map script to map the function keys. This script also through an error because it was unable to may the key code for the F8 key (key code “A7”). I modified the Python script to map this key code to the mute key. (I didn’t know the appropriate mapping so I used one already defined.)
- Edit cros-keyboard-map.py
- At line 37 add the line: ’ “A7”: “mute”,’
After the edit run the script and things should work. I suspect the F8 key is not mapped correctly but so far so good.