Closed PSzczepanski1996 closed 3 years ago
As I found, the fw_sst_0f28.bin
file exists in linux-firmware
arch package, so I'm not sure what is really wrong.
@HoshiYamazaki fw_sst_0f28.bin is a firmware used by the legacy driver in sound/soc/intel/atom. If you want to enable SOF on Baytrail, you need to select it explicitly. Please look at the suggested kernel configurations in https://github.com/thesofproject/kconfig/blob/master/sof-dev-defconfig if you want to disable legacy drivers and enable SOF-based solutions.
Thanks!
@HoshiYamazaki it could also be that your device BIOS doesn't have the right configurations to load a driver. You want to provide a link to the results of 'alsa-info'
@HoshiYamazaki it could also be that your device BIOS doesn't have the right configurations to load a driver. You want to provide a link to the results of 'alsa-info'
Sure, I will put log here soon, I must install Linux again on my tablet for testing purposes. Sorry for pause in response. Also I checked the BIOS version, it's the newest possible version for now (last version is from 2015 :D).
@plbossart here we go
[hoshi@archblet ~]$ alsa-info.sh
ALSA Information Script v 0.4.65
--------------------------------
This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.
dmesg
lspci
aplay
amixer
alsactl
rpm, dpkg
/proc/asound/
/sys/class/sound/
~/.asoundrc (etc.)
See '/usr/bin/alsa-info.sh --help' for command line options.
alsactl: save_state:1595: No soundcards found...
cat: /tmp/alsa-info.XetaGVwZzk/alsactl.tmp: No such file or directory
Your ALSA information is in /tmp/alsa-info.txt.MXRJa6cHwd
This file gist: https://gist.github.com/HoshiYamazaki/bcfb67b0d0d737e5c67ac88945348b3e
I have a concern that this device was released with an old Android version for which drivers were never upstreamed.
/sys/bus/acpi/devices/WM510205:00/status 15
that points to a WM5102 codec. I am aware of some devices which made use of this codec, but they were never officially supported.
Adding @jwrdegoede in case he's seen this device before.
Yes I have seen this device once before, on a Lenovo Yoga Tablet 2 1051F/L.
Looking at the dmesg output: [ 0.000000] DMI: LENOVO 60072/INVALID, BIOS 02WT18WW 08/01/2014
We are indeed dealing with a Lenovo Yoga Tablet 2 series device here too.
There is a codec driver available for the WM5102, but:
IOW there is a ton of work which needs to be done, just to enable sound on a single device. Unless someone with the necessary skills and a ton of free time sits down to actually do this, sound is simply never going to work on this device under Linux, sorry.
It's not necessarily that bad, there is an Android kernel from 2016 https://github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail/blob/cm-12.1/sound/soc/intel/board/byt_bl_wm5102.c
and there was a submitted upstream https://patchwork.kernel.org/project/alsa-devel/patch/593313f5.3636c80a.50e05.47e9@mx.google.com/
Also I am looking internally within Intel to see if I find anything else.
But yes, without a device and time we'll have to rely on someone to do the integration.
I fork-lifted the code to compile with v5.10-rcX, see https://github.com/plbossart/sound/tree/fix/byt-wm5102
I'd need the output of 'sudo dmidecode' to add the quirk for BYT-CR detection that was in the initial patches.
@plbossart oh interesting I actually have a Lenovo Yoga Tablet2 1051L in my hardware collection so I can test this. I spend some time on this yesterday. The arizona-spi mfd driver, which instantiates all the sub-devices for the wm5102 codec needed some work to support ACPI bindings and I had to figure out how the GPIOs are mapped from ACPI to the devicetree bindings the code expected.
I have that working now, the MFD driver loads and manages to read the chips revision and then continues creating the subdevs. That is as far as I got before I ran out of time. To be continued.
Note see the last commits here for the arizona-spi MFD driver ACPI binding fixes: https://github.com/jwrdegoede/linux-sunxi/commits/master
You rock @jwrdegoede !
@jwrdegoede very nice progress! I was not able to provide support in this weekend because I had studies so I was pretty busy, and I'm not really into compiling kernel via make
and make install
on Arch, so I probably would need to build own aur package... Anyway, I'm tracking the issue :) I don't know if running Linux on tablet is great idea, but what someone can achieve out from boredom, ah?
fingers crossed
Ok, so a quick update on this, soon after my last update here I got the speakers to work. But I could not get the headphones output to work at all. I spend like 3 full days on this. Then I switched to another project for a bit and took another shot yesterday. Still nothing. So then I decided to install Windows and see if that would give any clues (or if e.g. things would work after a reboot from Windows directly into Linux which sometimes helps).
But the headphones also did not work under Windows either... So then I did a duckduckgo search and found this. It seems there is a BIOS setting which muxes the headphone L/R pins to some USB debugging port, which is why I could not get them to work GRRRRR.
With the BIOS option enabling this USB debugging disabled, I now also have the headphones working. Next steps is jack-detect (which I already have mostly figured out with all the previous debugging) as well as support for the microphones; and then a whole lot of cleaning up.
TL;DR: I'm getting there I should hopefully have something ready for testing (assuming you know how to build your own kernels) soon.
p.s. Can someone change the title of this issue to something like this:
"RFE: Add BYT + WM5102 codec support to the kernel"
Ok good news, it took a bit of work, but I've everything working nicely now.
I've posted the kernel patches for this upstream, see: https://lore.kernel.org/alsa-devel/20201227211232.117801-1-hdegoede@redhat.com/T/#t And you can also find them here: https://github.com/jwrdegoede/linux-sunxi/commits/v5.10-footrail
A matching patch adding a UCM profile for this new setup can be found here: https://github.com/jwrdegoede/alsa-ucm-conf/commit/316109e7814926ba984322c1d9190575fab9021c
I've tested this on a Lenovo Yoga Tablet2 1051L. @HoshiYamazaki I believe that you have a 8" model, so a 8xx model? It would be good if you can test this there. Note you need to use pulseaudio to test since these tablet devices need UCM profiles to correctly setup the complex mixer setup which they have.
If it is easier for you then I can send you an email with the 14 kernel patches attached as .patch files, if you want that, please drop me an email at Hans de Goede hdegoede@redhat.com, so that I have your email address.
Ok good news, it took a bit of work, but I've everything working nicely now.
I've posted the kernel patches for this upstream, see: https://lore.kernel.org/alsa-devel/20201227211232.117801-1-hdegoede@redhat.com/T/#t And you can also find them here: https://github.com/jwrdegoede/linux-sunxi/commits/v5.10-footrail
A matching patch adding a UCM profile for this new setup can be found here: jwrdegoede/alsa-ucm-conf@316109e
I've tested this on a Lenovo Yoga Tablet2 1051L. @HoshiYamazaki I believe that you have a 8" model, so a 8xx model? It would be good if you can test this there. Note you need to use pulseaudio to test since these tablet devices need UCM profiles to correctly setup the complex mixer setup which they have.
If it is easier for you then I can send you an email with the 14 kernel patches attached as .patch files, if you want that, please drop me an email at Hans de Goede hdegoede@redhat.com, so that I have your email address.
Yeah, for sure - the patch files are much easier to integrate with custom AUR repository - and I need AUR repo, because /I never/ install something to internal system using make / make install
because it's overrides files without pacman tracking causing conflicts. And BTW. I use Arch too.
So yes, I use 8" Lenovo Yoga model. I sent the email to you and gonna test this in the week, I will be little busy learning Django Rest Framework tomorrow so probably I will do that in Tuesday.
So I had free time today to test the @jwrdegoede kernel patches, and provide them in custom AUR repo:
https://github.com/HoshiYamazaki/linux-wm5102
As you see, I have all patch files included, AND the default PKGBUILD
for linux kernel is including .patch
files from the same dir by default. So, I got it compiled (initially I tried to compile it on my tablet, but after 4 hours I just though **** it, and did it on my r5 3600 PC, and it took only 25 mins), but I get tablet freezes, alsamixer also does not show any output devices. As I base I used 5.10.3
linux kernel as it's visible in repository.
Anyway, the most interesing thing, is the DMESG log, that got spammed by messages from WM5102 driver:
[ 54.755331] LDO1: supplied by regulator-dummy
[ 54.755728] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.755892] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.757427] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.757566] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.758050] LDO1: supplied by regulator-dummy
[ 54.758218] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.758861] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.760194] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.760203] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.760532] LDO1: supplied by regulator-dummy
[ 54.760582] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.760649] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.761851] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.761858] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.762193] LDO1: supplied by regulator-dummy
[ 54.762352] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.762520] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.763744] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.763752] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.764277] LDO1: supplied by regulator-dummy
[ 54.764673] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.764849] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.766006] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.766014] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.766328] LDO1: supplied by regulator-dummy
[ 54.766496] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.766669] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.768025] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.768537] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.769308] LDO1: supplied by regulator-dummy
[ 54.769830] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.769990] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.771501] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.772016] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.772784] LDO1: supplied by regulator-dummy
[ 54.773183] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.773349] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.774745] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.775135] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.775914] LDO1: supplied by regulator-dummy
[ 54.775970] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.776041] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.777173] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.777183] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.777517] LDO1: supplied by regulator-dummy
[ 54.777565] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.777647] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.778927] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.778935] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.779257] LDO1: supplied by regulator-dummy
[ 54.779406] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.779576] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.781237] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.781245] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.781907] LDO1: supplied by regulator-dummy
[ 54.782426] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.782723] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.784039] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.784047] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.784381] LDO1: supplied by regulator-dummy
[ 54.784535] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.784699] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.785873] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.785881] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.786221] LDO1: supplied by regulator-dummy
[ 54.786366] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.786527] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.787698] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.787705] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.788035] LDO1: supplied by regulator-dummy
[ 54.788205] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.788368] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.789852] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.789859] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.790463] LDO1: supplied by regulator-dummy
[ 54.791107] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.791749] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.793241] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.793251] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.793598] LDO1: supplied by regulator-dummy
[ 54.793767] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.794411] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.795893] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.795901] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.796343] LDO1: supplied by regulator-dummy
[ 54.796989] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.797187] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.798345] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.798355] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.798686] LDO1: supplied by regulator-dummy
[ 54.798736] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.798803] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.800070] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.800588] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.801356] LDO1: supplied by regulator-dummy
[ 54.801751] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.801916] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.803076] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.803083] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.803397] LDO1: supplied by regulator-dummy
[ 54.803564] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.803935] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
[ 54.805205] arizona spi-WM510205:00: Failed to get mclk1: -2
[ 54.805720] arizona spi-WM510205:00: Failed to get mclk2: -2
[ 54.806488] LDO1: supplied by regulator-dummy
[ 54.806886] arizona spi-WM510205:00: supply AVDD not found, using dummy regulator
[ 54.807074] arizona spi-WM510205:00: supply DBVDD1 not found, using dummy regulator
So probably something is still missing for Lenovo Yoga 2 8" support.
Hi,
This looks like the final binding of the machine/codec driver is being deferred waiting for some other driver to load. You likely have not enabled all the necessary drivers, specifically I guess you are missing the GPIO driver.
Your kernel config needs to have the following options enabled as either m or y:
CONFIG_GPIO_ARIZONA=m CONFIG_MFD_ARIZONA=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_REGULATOR_ARIZONA_LDO1=m CONFIG_REGULATOR_ARIZONA_MICSUPP=m CONFIG_SND_SOC_ARIZONA=m CONFIG_EXTCON_ARIZONA=m CONFIG_MFD_WM5102=y CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH=m CONFIG_SND_SOC_WM5102=m
Regards,
Hans
But the headphones also did not work under Windows either... So then I did a duckduckgo search and found this. It seems there is a BIOS setting which muxes the headphone L/R pins to some USB debugging port, which is why I could not get them to work GRRRRR.
IIRC in some designs the LR headphone pins were muxed with a UART. This caused a lot of confusion even internally at Intel :-(.
closing since @jwrdegoede is pushing all the code upstream already. Thanks Hans!
I've been trying to enable the audio since I found this issue. I'm using Lenovo yoga tablet 2 model 1051F with archlinux. I tried three different kernels (5.11.10, 5.11.12, 5.12-rc6) and all gave the same kernel messages as follows.
[ 2267.016892] arizona spi-WM510204:00: supply AVDD not found, using dummy regulator [ 2267.016958] arizona spi-WM510204:00: supply DBVDD1 not found, using dummy regulator [ 2267.018026] arizona spi-WM510204:00: Failed to get mclk1: -2 [ 2267.018037] arizona spi-WM510204:00: Failed to get mclk2: -2 [ 2267.018401] LDO1: supplied by regulator-dummy [ 2267.018449] arizona spi-WM510204:00: supply AVDD not found, using dummy regulator [ 2267.018591] arizona spi-WM510204:00: supply DBVDD1 not found, using dummy regulator [ 2267.019703] arizona spi-WM510204:00: Failed to get mclk1: -2 [ 2267.019714] arizona spi-WM510204:00: Failed to get mclk2: -2 [ 2267.020058] LDO1: supplied by regulator-dummy
It's same as @HoshiYamazaki 's result. I've checked kernel config options, patch and source files, but I can't come up with any idea to fix it. It looks like a circular dependency problem because it repeats very fast endlessly. It may be a problem of archlinux. Thank you for reading.
@akohta you probably don't have the right kernel-config options set, as I mentioned higher up in this issue, you need to have the following options set:
CONFIG_GPIO_ARIZONA=m CONFIG_MFD_ARIZONA=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_REGULATOR_ARIZONA_LDO1=m CONFIG_REGULATOR_ARIZONA_MICSUPP=m CONFIG_SND_SOC_ARIZONA=m CONFIG_EXTCON_ARIZONA=m CONFIG_MFD_WM5102=y CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH=m CONFIG_SND_SOC_WM5102=m
It is important to actually have things which are specified as module here as modules, because of some probe ordering issues which are worked around by using "MODULE_SOFTDEP("pre: arizona_ldo1");" which will only work when things are build as modules.
@akohta, the "LDO1: supplied by regulator-dummy" dmesg line should go away once you have the Kconfig which I suggest as long as you still have that line something is wrong.
@jwrdegoede, thank you for your quick reply. I checked kernel-config options carefully and I confirm the above mentioned. I think there is no particular problem. I will attach my kernel-config file and alsa-info.sh output. The patch file was obtained from https://github.com/HoshiYamazaki/linux-wm5102
It is important to actually have things which are specified as module here as modules, because of some probe ordering issues which are worked around by using "MODULE_SOFTDEP("pre: arizona_ldo1");" which will only work when things are build as modules.
I didn't even know this existed, it could be quite useful for other areas.
@akohta you probably don't have the right kernel-config options set, as I mentioned higher up in this issue, you need to have the following options set:
CONFIG_GPIO_ARIZONA=m CONFIG_MFD_ARIZONA=m CONFIG_MFD_ARIZONA_SPI=m CONFIG_REGULATOR_ARIZONA_LDO1=m CONFIG_REGULATOR_ARIZONA_MICSUPP=m CONFIG_SND_SOC_ARIZONA=m CONFIG_EXTCON_ARIZONA=m CONFIG_MFD_WM5102=y CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH=m CONFIG_SND_SOC_WM5102=m
It is important to actually have things which are specified as module here as modules, because of some probe ordering issues which are worked around by using "MODULE_SOFTDEP("pre: arizona_ldo1");" which will only work when things are build as modules.
It appears that the issue still persists in official 5.12.1 kernel in Arch Linux repository, I think the WM5102 driver should be enabled by default. Also bunch of dmesg debug logs probably are slowing the whole device.
I installed Linux Mint latest version and upgraded the kernel to 5.12. I confirmed the kernel messages same as Arch Linux. The difference is the following messages appear only once.
kernel: arizona spi-WM510204:00: Failed to get mclk1: -2 kernel: arizona spi-WM510204:00: Failed to get mclk2: -2 kernel: LDO1: supplied by regulator-dummy
After that, additional modules such as gpio-arizona is loaded. However, the sound device is not enabled. The attached file below is dmesg log, which is enabled kernel debug options for gpio. For your reference, alsa-info log is attached too. mint-dmesg.txt mint-alsa-info.txt There is no particular error around gpio, but the regulator is disabled. So, I have no idea what is the regulator disabled by.
[ 2.654144] arizona spi-WM510204:00: Failed to get mclk1: -2 [ 2.654153] arizona spi-WM510204:00: Failed to get mclk2: -2 [ 2.654262] arizona spi-WM510204:00: GPIO lookup for consumer wlf,ldoena [ 2.654268] arizona spi-WM510204:00: using ACPI for GPIO lookup [ 2.654273] acpi WM510204:00: GPIO: looking up wlf,ldoena-gpios [ 2.654279] acpi WM510204:00: GPIO: _DSD returned WM510204:00 2 0 0 [ 2.654397] byt_gpio INT33FC:01: request pin 23 (GP_CAMERASB08) for INT33FC:01:405 [ 2.654460] gpio gpiochip1: Persistence not supported for GPIO 23 [ 2.654498] LDO1: 1200 <--> 1800 mV at 1200 mV, disabled [ 2.654623] LDO1: supplied by regulator-dummy [ 2.654739] arizona spi-WM510204:00: supply AVDD not found, using dummy regulator [ 2.654819] arizona spi-WM510204:00: supply DBVDD1 not found, using dummy regulator [ 2.654887] arizona spi-WM510204:00: GPIO lookup for consumer reset [ 2.654893] arizona spi-WM510204:00: using ACPI for GPIO lookup [ 2.654898] acpi WM510204:00: GPIO: looking up reset-gpios [ 2.654904] acpi WM510204:00: GPIO: _DSD returned WM510204:00 1 0 0 [ 2.655043] gpio gpiochip3: Persistence not supported for GPIO 3 [ 2.664404] arizona spi-WM510204:00: 7142857 Hz actual, DMA
The attached file below is Arch Linux dmesg log, which is enabled kernel debug options for gpio. The case of Arch Linux, stuck trace appeared. arch-dmesg.txt Similar warning appeared in the log of Linux Mint when unload the arizona-spi module. mint-dmesg-warning.txt I think something is wrong with regulator enable disable functions.
I installed Linux Mint latest version and upgraded the kernel to 5.12. I confirmed the kernel messages same as Arch Linux. The difference is the following messages appear only once.
kernel: arizona spi-WM510204:00: Failed to get mclk1: -2 kernel: arizona spi-WM510204:00: Failed to get mclk2: -2
@akohta can you double-check if the Linux Mint kernel configuration has support for all the CONFIG_ listed above https://github.com/thesofproject/linux/issues/2485#issuecomment-818594303.
@plbossart , thank you for your reply. In my Linux Mint kernel configuration file, CONFIG_MFD_ARIZONA is set to built-in module as it is boolean type. The others are same. Arch Linux kernel configuration file is same too. Is built-in setting of CONFIG_MFD_ARIZONA cause this?
For your reference, Linux Mint kernel configulation file is attached below. mint-kernel-config.txt
The sound device was enabled by the installation of Sound Open Firmware v1.8-rc2 downloaded the link below.
https://github.com/thesofproject/sof-bin
I'm using Arch linux, kernel 5.12.9 (official kernel).
After installation, Built-in Audio "Play HiFi quality Music" profile is appeared in configuration tab of pavucontrol.
It works, but keeps freezing (keep the sound like a beep) every few minutes. The following messages appeared in the log.
ALSA woke us up to write new data to the device, but there was actually nothing to write. Most likely this is a bug in the ALSA driver 'snd_soc_sst_bytcr_wm5102'. Please report this issue to the ALSA developers. We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
By enabling pulseaudio debug option, the following messages appeared in the log when freezing.
( 107.547| 75.509) D: [alsa-sink-PCM ()] sink-input.c: Requesting rewind due to corking ( 107.547| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Requested to rewind 19200 bytes. ( 107.547| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Limited to 18944 bytes. ( 107.547| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: before: 4736 ( 107.547| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: after: 4736 ( 107.547| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Rewound 18944 bytes. ( 107.547| 0.000) D: [alsa-sink-PCM ()] sink.c: Processing rewind... ( 107.547| 0.000) D: [alsa-sink-PCM ()] sink-input.c: Have to rewind 18944 bytes on render memblockq. ( 107.547| 0.000) D: [alsa-sink-PCM ()] sink-input.c: Have to rewind 37888 bytes on implementor. ( 107.547| 0.000) D: [alsa-sink-PCM ()] source.c: Processing rewind... ( 107.548| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.556| 0.008) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.556| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.556| 0.000) D: [pulseaudio] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: state: RUNNING -> IDLE ( 107.558| 0.002) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.558| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.559| 0.001) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.560| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.560| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.560| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.560| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.560| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.577| 0.017) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.577| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.619| 0.041) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.619| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.700| 0.081) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.700| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.860| 0.160) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 107.861| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 108.116| 0.255) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 108.117| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 108.117| 0.000) I: [pulseaudio] sink.c: Cannot update sample spec, monitor source is RUNNING ( 108.117| 0.000) D: [alsa-sink-PCM ()] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: Found underrun 18944 bytes ago (256 bytes ahead in playback buffer) ( 108.117| 0.000) D: [alsa-sink-PCM ()] protocol-native.c: Requesting rewind due to end of underrun. ( 108.117| 0.000) D: [alsa-sink-PCM ()] sink-input.c: Requesting rewind due to uncorking ( 108.117| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Requested to rewind 19200 bytes. ( 108.117| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Limited to 18944 bytes. ( 108.117| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: before: 4736 ( 108.117| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: after: 4736 ( 108.117| 0.000) D: [alsa-sink-PCM ()] alsa-sink.c: Rewound 18944 bytes. ( 108.118| 0.000) D: [alsa-sink-PCM ()] sink.c: Processing rewind... ( 108.118| 0.000) D: [alsa-sink-PCM (*)] source.c: Processing rewind... ( 108.137| 0.019) D: [pulseaudio] module-suspend-on-idle.c: Sink alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink becomes busy, resuming. ( 108.138| 0.000) D: [pulseaudio] sink.c: alsa_output.platform-bytcr_wm5102.HiFi_ucm0001.hw_wm5102sink: state: IDLE -> RUNNING
It seems that the device was switched to idle even though it was running. Is there a way to fix it?
@HoshiYamazaki thanks for the information
The sound device was enabled by the installation of Sound Open Firmware v1.8-rc2 downloaded the link below. https://github.com/thesofproject/sof-bin I'm using Arch linux, kernel 5.12.9 (official kernel). After installation, Built-in Audio "Play HiFi quality Music" profile is appeared in configuration tab of pavucontrol. It works, but keeps freezing (keep the sound like a beep) every few minutes.
We have seen similar reports from @jwrdegoede and others that beeps are observed, see https://github.com/thesofproject/sof/issues/3868#issuecomment-850845612
it seems that enabling the firmware trace in the kernel with options snd_sof sof_debug=1 in /etc/modprobe.d/alsa-base.conf
makes the problem less visible.
Alternatively you can disable SOF and use the legacy driver, this should work as well, and I think this is what @jwrdegoede used. We will try to fix the baytrail issues but we are swamped at the moment with other support requests on newer platforms.
@plbossart thanks for your reply.
it seems that enabling the firmware trace in the kernel with options snd_sof sof_debug=1 in /etc/modprobe.d/alsa-base.conf
makes the problem less visible.
The sound device is working fine for 2 hours. This module parameter is highly effective for my device. It seems that this module parameter prevents the sound device from becoming idle while it is running. Thank you so much for your help.
@akohta Good day.
The sound device was enabled by the installation of Sound Open Firmware v1.8-rc2 downloaded the link below. https://github.com/thesofproject/sof-bin I'm using Arch linux, kernel 5.12.9 (official kernel). After installation, Built-in Audio "Play HiFi quality Music" profile is appeared in configuration tab of pavucontrol. It works, but keeps freezing (keep the sound like a beep) every few minutes. The following messages appeared in the log.
Installed according to your description:
however I still get journalctl -xef
kernel: arizona spi-WM510204:00: Failed to get mclk1: -2
kernel: arizona spi-WM510204:00: Failed to get mclk2: -2
also tried Sound Open Firmware v1.8 & linux-5.13.4, the result is the same. How did you achieve a workable wm5102?
@xFiliNx the beeps are a known issue with xruns that we haven't been able to root-cause. The work-around is to enable the trace as suggested above
options snd_sof sof_debug=1
in /etc/modprobe.d/alsa-base.conf
The mclk issues might be a kernel config issue, see the comment https://github.com/thesofproject/linux/issues/2485#issuecomment-818594303 above and please make sure all the options in your kernel config are selected.
@plbossart
The mclk issues might be a kernel config issue, see the comment #2485 (comment) above and please make sure all the options in your kernel config are selected.
Arch's official kernel packages (linux-5.13.4.arch1-1) are already built with these options.
the beeps are a known issue with xruns that we haven't been able to root-cause. The work-around is to enable the trace as suggested above
There are no sound signals yet, it's too early to do it yet
@plbossart
The mclk issues might be a kernel config issue, see the comment #2485 (comment) above and please make sure all the options in your kernel config are selected. Arch's official kernel packages (linux-5.13.4.arch1-1) are already built with these options.
Then I have no idea. This is reported as working by others...
the beeps are a known issue with xruns that we haven't been able to root-cause. The work-around is to enable the trace as suggested above
There are no sound signals yet, it's too early to do it yet
Not sure I get the point, the trace needs to be enabled on startup, regardless of whether audio is playing or not.
Hello, @xFiliNx
The Sound Open Firmware (SOF) v1.8 has been officially released, I recommend to use it. The package name is sof-firmware. In my case, the sound device was enabled by install the SOF only, no needed to setup specially for hardware.
kernel: arizona spi-WM510204:00: Failed to get mclk1: -2 kernel: arizona spi-WM510204:00: Failed to get mclk2: -2
The above messages are related to the legacy driver. It appears in my log even now ( Archlinux kernel 5.13.4 ). You can ignore it, as long as you use SOF. I have no idea about this legacy driver issue.
My dmesg log, modprobing various rt5640/rt5651 drivers does nothing and I can't reload alsa with proper audio support.