reset sound after suspend to memory (deep sleep)
#1
After a suspend from memory, sound does not work.

On my machine (Manjaro ARM XFCE 20.06 Kernel 5.7), the sound driver snd_soc_es8316 needs to reset the sound chip. The problem is the kernel is preventing unloading and reloading of the sound driver snd_soc_es8316.


My first attempt was initializing the sound chip from the shell mimicking what the es8316 driver is doing in its probe function:

Code:
# modprobe  i2c-dev
# i2cset -y -f 1 0x11 0x00 0x3f
# i2cset -y -f 1 0x11 0x00 0x80
# i2cset -y -f 1 0x11 0x0c 0xff
# i2cset -y -f 1 0x11 0x03 0x32

I got some static noise making me believe I talked to the right device Big Grin It has not helped.


The es8316 driver can't be un- and reloaded but un- and rebound. Execute this line after returning from suspend:

Code:
$ sudo tee /sys/bus/i2c/drivers/es8316/{un,}bind <<< 1-0011


It's quite easy to crash the kernel. I suspect the sound driver should not be accessed in the split-second between its unbinding and binding. So far, I have only seen kernel crashes when executing the unbind/bind command while playing music. I have not seen any kernel crashes otherwise. You never know what happens on a modern Linux in the background, so YMMV.

I have some vague ideas for a proper solution. Will not happen any time soon. Hope others will step in.
  Reply


Messages In This Thread
reset sound after suspend to memory (deep sleep) - by Der Geist der Maschine - 06-16-2020, 01:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sleep and external display - Are there any options? chris88233 7 1,482 09-04-2023, 09:03 PM
Last Post: wdt
  PineBook Pro seems to go to deep sleep, but doesn't wake up pogo 11 4,924 08-31-2023, 04:20 PM
Last Post: TRS-80
  Rkvdec memory leak? Abhinav 2 755 06-02-2023, 08:55 AM
Last Post: Abhinav
  Sound on Armbian Bram 1 818 04-01-2023, 03:16 PM
Last Post: TRS-80
  Suspend/Resume Broken with Bootloader on SPI Flash xp19375 2 1,086 03-24-2023, 04:25 PM
Last Post: srs5694
  With the help of a friend, I installed a beautiful deep os distribution, but I won't wangyukunshan 0 562 03-03-2023, 10:56 PM
Last Post: wangyukunshan
  Hibernation and Speaker Sound Issues, First Month of PBP kebab 7 2,798 11-02-2022, 02:33 PM
Last Post: kebab
  Resume from suspend not working after flashing Tow-Boot to SPI xp19375 3 1,861 10-31-2022, 10:14 AM
Last Post: wdt
  Loud distorted speaker sound when connecting to power supply myself600 2 1,121 09-21-2022, 12:11 PM
Last Post: myself600
  How to make manjaro sleep or hibernate? KDE? regretfulpineuser 0 935 06-20-2022, 12:56 AM
Last Post: regretfulpineuser

Forum Jump:


Users browsing this thread: 1 Guest(s)