Linux on Intel Atom with Everest ES8316 SoC = no speaker sound [Workaround by MrEen]

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
olo

Re: no speaker sound but when headphones are plugged in

Post by olo »

well we were there and back again
MrEen wrote: Tue Oct 13, 2020 8:58 pm LOL. You never wasted any of my time. I learn by helping others, so it's all good. :D

Yes, you have the right spot for the edit, but we need to change the command a little bit, as the interpreter is too basic to handle it properly. I'll also include a short timer, just to be safe. You can play with it if you like and find what works best. This is the command for that location:

Code: Select all

bash -c "sleep 5 && amixer -c1 set Headphone toggle && amixer -c1 set Speaker toggle"
I like to thank you very much for your engagement and big help. I get the start jingle and the sound of silence from S&G sounds real well in stereo.
Have a good weekend.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: no speaker sound but when headphones are plugged in

Post by MrEen »

You're most welcome. I wish I could help more, but those SoC sound cards are just too foreign to me.
olo

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by olo »

behold, the mighty Cherry Trail Intel Atom® x5-Z8350 Processor 4 processors 4 threads 2M Cache, 1.44 up to 1.92 GHz

it is designed to be in tiny tablets, so it has ample space in a 15" Ultrabook

Image

Image
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by MrEen »

LOL!

I only use desktops. That looks more like it should be inside a calculator. :lol:
olo

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by olo »

It is amazing isnt it?
It is smaller than the SOC from my new Android TV boxes, It comes with USB3 and 2, SD card reader, mini HDMI stereo headphone plug, good sound and a good full HD anti glare screen. Just for fun good 3 years ago I was looking what is the cheapest Windows 10 PC with a 15" screen. For 150 Euro I found it in China. it is a TBAO brand what came with 1700 gram weight. They mounted a 250 gram metal plate under the battery to give it a more solid feeling and keep it from tipping over when the screen is tilted backwards. The first thing was to open up the PC and remove the metal plate. Now it is a bit over 1400 gram around 3 pounds what is good for something what sits on your lap. And it does not tip over since they "mounted" a smaller battery further down.
by the way, this is how it looked in the test review I got some info from, can you spot the differences to mine?
oh this amazing craftsmanship. But the whole case is sturdy and in a dark blue all over.

Image
Last edited by olo on Sat Oct 17, 2020 2:14 pm, edited 1 time in total.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by MrEen »

olo wrote: Sat Oct 17, 2020 2:05 pmcan you spot the differences to mine?
Yeah, the thicker wire takes the long route on yours. :mrgreen:
olo

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by olo »

it still is a beautiful machine
https://www.gearbest.com/laptops/pp_633614.html
this link just for fun since it is no longer for sale
olo

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by olo »

sorry I nosed around the internet after I resiscovered the name and model of the PC and found that there were a lot of people with the same problem on Atom SOC with this sound chip.
One post was kind of interesting , please have a look if you understand if this make sense
from the ubuntu forum

Hey Guys Problem is solved. So i made a script that you guys can try if you have the es8316 on linux.
https://drive.google.com/file/d/1bIJ...ew?usp=sharing
and just execute it and there audio is working.

this is the code

Code: Select all

clear
if [ ! "`whoami`" = "root" ]
then
    echo "Please run script as root."
    exit 1
else echo "( ͡° ͜ʖ ͡°) Script Made By Shuncey Balba ( ͡° ͜ʖ ͡°)"
fi
touch install.log
chmod 777 install.log
echo Downloading Files
p_url="https://raw.githubusercontent.com/dsd/linux/es8316"
files="
sound/soc/codecs/es8316.c
sound/soc/codecs/es8316.h
sound/soc/codecs/Makefile
sound/soc/codecs/Kconfig
sound/soc/intel/Kconfig
sound/soc/intel/boards/Makefile
sound/soc/intel/boards/cht_bsw_es8316.c
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/sst/atom/sst_acpi.c
sound/soc/intel/atom/sst/sst_acpi.c
sound/soc/intel/atom/sst-atom-controls.h
sound/soc/intel/common/sst-acpi.h
sound/soc/intel/common/sst-dsp.h
sound/soc/intel/atom/sst-mfld-platform.h
sound/soc/intel/atom/sst/sst.h
sound/soc/intel/atom/sst-mfld-dsp.h
"
for f in $files
do
    echo $f > install.log 2>&1
    mkdir -p `dirname $f` > install.log 2>&1
    wget $p_url/$f > install.log 2>&1 
    mv `basename $f` $f > install.log 2>&1
done
rm sound/soc/codecs/Makefile
    rm sound/soc/intel/boards/Makefile
    echo "snd-soc-es8316-objs := es8316.o
obj-m    += snd-soc-es8316.o" >> sound/soc/codecs/Makefile
chmod +x sound/soc/codecs/Makefile

echo "snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
obj-m += snd-soc-sst-byt-cht-es8316.o" >> sound/soc/intel/boards/Makefile
chmod +x sound/soc/intel/boards/Makefile

echo "snd-intel-sst-acpi-objs += sst_acpi.o
obj-m += snd-intel-sst-acpi.o" >> sound/soc/intel/atom/sst/Makefile
chmod +x sound/soc/intel/atom/sst/Makefile

echo Compiling

# ubuntu
C_FLAGS="-C /usr/src/linux-headers-`uname -r`"
# opensuse
# C_FLAGS="-C /usr/src/linux-`uname -r`"
c_dir=`pwd`
for mf in `find $c_dir -type f -name "Makefile"`
do
    echo $mf > install.log 2>&1
    cd `dirname $mf` > install.log 2>&1
    make $C_FLAGS M=`pwd` modules > install.log 2>&1
    mv *.ko $c_dir > install.log 2>&1
    cd $c_dir > install.log 2>&1
done

echo Inserting snd-intel-sst-acpi.ko to Kernel
if insmod snd-intel-sst-acpi.ko > install.log 2>&1 ; then
    printf 'Modules inserted To Kernel Succesfully
'
else
    printf 'snd-intel-sst-acpi.ko Already Exists
'
fi
echo Inserting snd-soc-sst-byt-cht-es8316.ko to Kernel
if insmod snd-soc-sst-byt-cht-es8316.ko > install.log 2>&1 ; then
    printf 'snd-soc-sst-byt-cht-es8316.ko inserted To Kernel Succesfully
'
else
    printf 'snd-soc-sst-byt-cht-es8316.ko Already Exists
'
fi
echo Inserting snd-soc-es8316.ko to Kernel
if insmod snd-soc-es8316.ko > install.log 2>&1 ; then
    printf 'snd-soc-es8316.ko inserted To Kernel Succesfully
'
else
    printf 'snd-soc-es8316.ko Already Exists
'
fi

echo "Downloading And Extracting UCM files..."
PURGE_UNZIP=false && [ ! $(sudo bash -c "command -v unzip") ] && sudo apt -y install unzip > /dev/null 2>&1 && PURGE_UNZIP=true
sudo rm -rf UCM
sudo mkdir UCM
cd UCM
sudo wget --timeout=10 "https://github.com/plbossart/UCM/archive/master.zip" > /dev/null 2>&1
sudo unzip master.zip > /dev/null 2>&1
sudo rm -f master.zip
echo "Installing UCM Files..."
sudo mkdir -p /usr/share/alsa/ucm
sudo cp -rf UCM-master/* /usr/share/alsa/ucm
sudo cp -rf /usr/share/alsa/ucm/bytcr-rt5651/asound.state /var/lib/alsa
sudo rm -rf UCM-master
sudo mkdir /usr/share/alsa/ucm/bytcht-es8316 > install.log 2>&1
sudo wget --timeout=10 "https://github.com/kernins/linux-chwhi12/raw/master/configs/audio/ucm/bytcht-es8316/HiFi" -O /usr/share/alsa/ucm/bytcht-es8316/HiFi > /dev/null 2>&1
sudo wget --timeout=10 "https://github.com/kernins/linux-chwhi12/raw/master/configs/audio/ucm/bytcht-es8316/bytcht-es8316.conf" -O /usr/share/alsa/ucm/bytcht-es8316/bytcht-es8316.conf > /dev/null 2>&1
# add HdmiLpeAudio.conf
sed '1,/^exit$/d' < ../$0 | base64 -d > install.log 2>&1 | sudo tee $0.zip > /dev/null 2>&1
sudo unzip $0.zip > /dev/null 2>&1
sudo rm -f $0.zip
sudo mkdir -p /usr/share/alsa/cards > install.log 2>&1
sudo cp HdmiLpeAudio.conf /usr/share/alsa/cards > install.log 2>&1
cd ..
sudo rm -rf UCM
[ ${PURGE_UNZIP} ] && sudo apt -y purge unzip > /dev/null 2>&1
echo "Finished Installing UCM Files"


echo "blacklist snd_hdmi_lpe_audio" > /etc/modprobe.d/blacklist_hdmi.conf
echo Cleaming Up
sudo rm -rf sound
sudo rm -rf install.log
sudo rm -rf snd-intel-sst-acpi.ko 
sudo rm -rf snd-soc-es8316.ko
sudo rm -rf snd-soc-sst-byt-cht-es8316.ko 
echo "Donate -> https://www.paypal.me/shunceybalbacid"
echo "Does Sound Work? If not plug in your Headphones Wait for 10 Seconds To Continue"
timeout 10s speaker-test -t wav -c 6 > install.log 2>&1
while true; do
   
    read -p "Do you want to reboot now? Y/N: " yn
    case $yn in
        [Yy]* ) reboot;;
        [Nn]* ) exit;;
        * ) echo ;;
    esac
done

es8316.sh
Displaying es8316.sh.
I would give it a try but how do I run a script as root ?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by MrEen »

Okay, I perused what you posted above, and it's quite difficult to understand everything that's happening with it grabbing sources from multiple places. It's possible this is older info that may not apply any longer, but it's also possible this still works.

To execute the script as root simply run sudo bash /path/to/script. For example if the file is named fix8813.sh and is in a subdirectory of your Downloads folder called 8813, then sudo bash ~/Downloads/8813/fix8813.sh would be the command.

I hope I got that right.

I'd caution to either have good backups ready, or be prepared to reinstall the OS.

Good luck! :D
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by MrEen »

I should add, I have read many of Shuncey's posts on the Ubuntu forum when searching for help for other users. I suspect this may have been the thread you found: https://ubuntuforums.org/showthread.php?t=2391606

I can say that I trust there's nothing malicious in the script. But, that was made for kernels previous to 5.3 when most of the UCM stuff was properly added to the kernel to negate the need for these workarounds.
olo

Re: [SOLVED] Workaround if no speaker sound for Everest ES8316 SoC and maybe others

Post by olo »

yes, that is the correct post, sorry I normally mention the origins via link.
There is just the admin account in my installation, I tried to add the 2 root entries, but just one stuck checked after reboot.
I think for this script I have to be root, so I try to su in the terminal but my password don't work.
Searching for a solution went to null.
Then I pasted parts of the script where the files are gathered in the terminal to see if I get a response if they are still there but that did not work.
So a script is not pasted into the console but run with a link to it.
Oh man, how do people with knowledge always assume somebody who just installed Lunix and tries to get things running knows these things???
We do not, so this is why so many of us newbies fail and why so many go back to Windows.
With you taking me by the hand step by step and we were trying things out and then post the results so that others can understand easy, this it how it is proper and helpful. Then in the end, link to a simple step by step solution. Or better put it in short form into the "how to fix things" forum spot.
P.s. our conversation is already in the search results from google on page 2
I will try now and my timeshift is up to date regarding the home folder I checked everything so a simple re installation and timeshift back should work. But then I still try to find out what has to be checked and what not in timeshift.
OK here it goes nothing....

Well the script went through after some minor adjustments and an error in line 109
sed '1,/^exit$/d' < ../$0 | base64 -d > install.log 2>&1 | sudo tee $0.zip > /dev/null 2>&1

Code: Select all

( ͡° ͜ʖ ͡°) Script Made By Shuncey Balba ( ͡° ͜ʖ ͡°)
Downloading Files
Compiling
Inserting snd-intel-sst-acpi.ko to Kernel
snd-intel-sst-acpi.ko Already Exists
Inserting snd-soc-sst-byt-cht-es8316.ko to Kernel
snd-soc-sst-byt-cht-es8316.ko Already Exists
Inserting snd-soc-es8316.ko to Kernel
snd-soc-es8316.ko Already Exists
Downloading And Extracting UCM files...
Installing UCM Files...
/home/p/Downloads/es8316.sh: line 109: ..//home/p/Downloads/es8316.sh: No such file or directory
Finished Installing UCM Files
Cleaming Up
Donate -> https://www.paypal.me/shunceybalbacid
Does Sound Work? If not plug in your Headphones Wait for 10 Seconds To Continue
Do you want to reboot now? Y/N: 
ok lets try for Y and I disabled the startup from your card switcher command...
olo

Re: Linux on Intel Atom with Everest ES8316 SoC = no speaker sound [Workaround by MrEen]

Post by olo »

long story short, it behaved as if hdmi was disabled
no speaker sound but sound with headphones out of all 4 speakers in mono (we had that b4)
so I tried your command for that setting and sound out of the speakers.
tried several other things, but ended up timeshifting back and we have your original "it works out of the speakers" situation.
So I guess you are the only one who really solved it with a simple switch workaround.

bash -c "sleep 5 && amixer -c1 set Headphone toggle && amixer -c1 set Speaker toggle"


edited title again for better search engine results
I will pack this pc now back into it's original box with the knowledge that everything works as good as possible for the day it will be needed.
... and try for fun ubuntu 20 on test pc number 4 to compare it with all the minty expressions I got over the last few weeks.

» end of line
» end of file
» back to the master controller
Locked

Return to “Hardware Support”