-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No sound card detected on custom EHL board with ALC5660I codec on I2S0 #2990
Comments
@gbuloz can you add this file Can you also provide the results of "ls /sys/bus/pci/devices/0000:00:1f.3/", just to check if you have an elh_rt5660 device added by the SOF driver. Thanks! |
@gbuloz The ACPI table seems OK now. Besides dmesg, please also attach the lspci -vvvv |
@plbossart : I've added the .conf file and power-cycled
shutdown+power-cycle
@libinyang :
|
@gbuloz the results show that there is no machine device created, so no machine driver probed. Without dynamic debug it's going to be hard to figure things out. Not sure if this is a configuration issue, maybe try using our setup in https://github.com/thesofproject/kconfig and run https://github.com/thesofproject/kconfig/blob/master/kconfig-sof-default.sh to generate a .config. This may or may not work on your platform due to other dependencies. This config is just a minimal one for our own tests and a reference to see what options we enable. |
@plbossart : I've been able to get some debug and got "sof-audio-pci 0000:00:1f.3: error: cl_copy_fw: timeout HDA_DSP_SRAM_REG_ROM_STATUS read" I still don't know why dynamic debug did not wotk for snd/sof modules but was working for other drivers. I'm wondering if the modules where running enough to produce at least some debug messages. To be sure I've rebuilt all modules under sound/ (318 modules) with dev_dbg changed to dev_info and pr_debug to pr_info and installed them under updates/, then ran depmod -a and ran dracut -f (because 3 snd modules where in initramfs; now I have many). This gave me an error while still under initramfs about intel/sof/sof-ehl.ri missing, so I added this file to initramfs. And this leads to the full dmesg above. |
@gbuloz this error typically indicates that the firmware you used was not signed with the key that is known to the CSME (ME) engine. Can you please clarify which SOF firmware you used? I am also not sure if the results make sense, the errors you see are logged with dev_err, so they would be seen by default. dynamic debug is only useful when we have dev_dbg() in the code. Weird. |
@plbrossart : I use only the standard packages from Fedora repos. Currently alsa-sof-firmware-1.6.1-4.fc33.noarch providing the firmware like this :
And I also don't understand why I did not get these dev_err message before I rebuild all modules under sound/ and install them under updates. I've built them with the same .config than the Fedora distribution, but out-of-tree. |
@gbuloz could you try /usr/lib/firmware/intel/sof/sof-ehl.ri -> community/sof-ehl.ri I don't know if this was released but that would be the alternate key that's typically used. |
@plbrossart : unfortunately I have no community subdir, but only a public-signed/ and there's no file for EHL in it : sof-apl.ri sof-cnl.ri sof-icl.ri sof-jsl.ri sof-tgl-h.ri sof-tgl.ri Edit : I've tried with https://github.com/thesofproject/sof-bin/blob/main/v1.8.x/sof-v1.8-rc2/intel-signed/sof-ehl.ri but same result. |
@libinyang : your debug firmware works much better than the prod one
I have currently no access to desktop to check if I have new input/output channels, but only have access to text console. Which command do recommand to check ? I've tried with "systemctl --user start pulseaudio" then "arecord -l" but I get "arecord: device_list:274: no soundcards found.." Please also note my platform is equipped with a CPU sample and that I've been heard from my HW team that the production processors will require some software updates. Could this explain the signature problem with the SOF firmware ? |
@gbuloz yes, when you receive production devices the firmware is required to use production keys for authentication. It looks like you are in a gray area here. I can see that the device '/sys/bus/pci/devices/0000:00:1f.3/ehl_rt5660' is created, which is good and expected. Somehow the card is not created though. if you can't figure out how to enable dynamic debug, you can try a manual probe: add 'blacklist snd_soc_ehl_rt5660' in /etc/modprobe.d/alsa-base.conf |
I've rebuilt all sound modules with pr_debug changed to pr_info and dev_dbg to dev_info and now I get this at boot time "ehl_rt5660 ehl_rt5660: ASoC: codec component i2c-10EC5660:00 not found for link SSP0-Codec" |
@gbuloz can you check if the device exists cat /sys/bus/acpi/devices/i2c-10EC5660:*/status |
No it does not exist. |
try
|
|
ls -l /sys/bus/acpi/devices/10EC5660: then? |
|
ok, let's try to see if the components were registered: cat /sys/kernel/debug/asoc/components cat /sys/kernel/debug/asoc/dais |
|
ok, so something happens in the probe of the snd_soc_rt5660 driver, the required components were not registered with ASoC. you'll have to instrument rt5660_i2c_probe() to see what happens. |
I've added several dev_info() into this function (including at first line where I also have a printk) but I get not output as if the probe was not run. |
@gbuloz it's clearly a problem that's not due to SOF then... Either the ACPI subsystem is unable to probe this device, or there is a conflict, or the BIOS is wrong. You may also need to use i2cdetect to make sure that there's really an I2c device that matches the address listed in the BIOS. |
@gbuloz
The codec is located on i2c-1. However on my CRB, the codec is located on i2c-5, addr: 0x1c Could you run:
to check whether i2c-5 has device, and if i2c-5 0x1c shows a device, please run
and attach the output |
Yes, it is really on i2c-1 and its device ID is correct (0x6338). |
Are you sure the DSDT is correct? I see this:
Scope (_SB.PC00.I2C2) <<< is this the right controller? |
Yes, I also suspected the DSDT. |
I don't have any direct contacts with the EHL BIOS folks or technical information on this @gbuloz. Big companies, different organizations, etc. Maybe @libinyang can help, if not you may have to talk to your official Intel support. |
@plbossart : after one year of pain, I now have the required BIOS with the pinctrl fix based on BIOS codebase "5.19_1AWHS_RC1.5.0_016", and I use latest Fedora 36 updates (kernel 5.18.9. I'm also unable to attach any document (bug ?), so I paste my text file below : [root@fedora ~]# ls -l /sys/bus/acpi/devices/10EC5660:* [root@fedora ~]# cat /sys/kernel/debug/asoc/components [root@fedora ~]# dmesg | grep sof guest@fedora ~]$ aplay -l |
@gbuloz if you want the card and endpoints to be detected in Fedora/Ubuntu, you have to create a UCM file. see https://github.com/alsa-project/alsa-ucm-conf alternatively you can use mixer settings, this is what we use in our CI tests. this will only work for command-line tests, Fedora/Ubuntu would not expose the card/endpoints. For this you need the UCM file.
|
@plbossart : Thanks ! |
@gbuloz after more coffee I realized there is already support for this board in UCM, see ucm2/Intel/sof-ehl-rt5660/. I am not sure why your profile is not detected, maybe there's still a bug. You could try to test manually with this (commands off the top of my head, some corrections might be needed)
|
@plbossart : these commands are running without error, but no sound. Our custom design based on CRB is working OK under windows so the hardware should be OK. Compared to the CRB we have no speaker, only line-out. Also due to that the ALC5660 GPIO2 used for speaker/line-out commutation (jack contact) is expected to be reused for mic-in/line-in commutation. |
@gbuloz if the board is different, the alsamixer and UCM settings will have to be different, and it's possible that the GPIO handling needs to be modified in the driver. @bardliao @oder-chiou do you have settings for rt5660 that can be shared? |
@gbuloz Please use the following command to enable the path of the LOUT
|
@oder-chiou, @plbossart : thanks for the commands to enable the path to LOUT, but I still have nothing out. I only get a positive glitch ~100mS on LOUT (right and left) when I run "speaker-test -Dhw:0,0 -c2 -r48000 -t sine", and nothing when I run "aplay /usr/share/sounds/alsa/Noise.wav" |
@gbuloz : You can refer the following UCM config for the full commands. |
@gbuloz Can you run the |
@bardliao : here is the command output :
@oder-chiou : I've used some "amixer -c sofehlrt5660 cset ...' commands to set the volume for "'DAC1 Playback Volume" and "'OUT Playback Volume" and have also tried some commands as described in the file ucm2/Intel/kblrt5660/HiFi.conf but I have still nothing out from line out. I use Fedora 36 with latest updates and found I already have some config files under : /usr/share/alsa/ucm2/Intel/sof-ehl-rt5660/ but something seems missing/wrong so under Xfce desktop the card is not listed in the audio mixer (pavucontrol). I've attached a zip archive of the /usr/share/alsa files : |
@gbuloz Could you share the output of 'amixer -c sofehlrt5660 contents' command? |
@bardliao : Thanks. See attachment : |
@oder-chiou Is 'OUT Playback Switch' needed? @gbuloz Could you try |
@bardliao Yes, it is needed. |
@ALL : thanks ! I've be able to get something out of Lineout. I've compiled all your commands above into a single script amixer_cmds.sh (see Could you tell me what setup commands are needed to record from Linein L+R (on IN1P/IN3P pins on ALC5660 codec) then from an analog MIC (on IN2P pin on ALC5660 codec with BIAS from pin MICBIA1) ? |
Hi, Add the following dapm routing to the machine driver for using the MICBIAS1.
Following commands are the recording mixer controls.
|
@oder-chiou : Thanks for the commands, but I still have only blank recorded from linein or mic (without bias), but I'm not sure if I use the right arecord arguments. I use -c4 because the command reports an error if I'm using 1 or 2. A dump of the recorded .wav data show it is constant (repeats every 16 bytes = 4 channels x S32_LE) |
@oder-chiou : oops sorry. Your amixer commands work perfectly for line-in and mic-in, but I was not using the right arecord parameters. The right ones are : arecord -Dhw:0,0 -c2 -r48000 -fS32_LE -d 10 test.wav @ALL : to have the sound device displayed by the Audio mixer (pavucontrol) under Fedora 36 I had to patch some config files according to audiomixerconf.patch (see audiook.zip archive) [Edit 2022-08-05] : The following line must be added to setlinein.sh and setmicin.sh (missing) : |
@oder-chiou : I'm still unable to have the right channel working in line-in mode (left on IN1, right on IN3). The wiring seems OK on IN3 because if I redirect it to the left channel with "RECMIXL BST3 Switch" I get something. Any idea of what is missing/wrong ? I've attached tthe output of "amixer contents" @ALL : I've found why my audio device was not displayed under audio mixer (pavucontrol) and the only profile available was "off". This is because my custom board has no DMIC and with the standard UCM2 file /usr/share/alsa/ucm2/Intel/sof-ehl-rt5660/HiFi.conf, this fails because of device "hw:${CardId},1" used for "Mic", and then all the use case "Hifi" is ignored. |
@gbuloz Please try these controls to verify the path in the codec side 'IF1 ADC Swap Mux' 'RECMIXR BST1 Switch'. |
@oder-chiou : thanks, but could you explain me a little bit more the procedure ? |
@gbuloz |
@oder-chiou : the controls work as expected, except that for having something to the right channel from lineinR (IN3 with 'RECMIXR BST3 Switch' on) I need to also enable lineinL (IN1 with 'RECMIXR BST1 Switch' on) or analogmic (IN2 with 'RECMIXR BST2 Switch' on) |
@oder-chiou : and also to have something to the left channel from lineinR (IN3 with 'RECMIXL BST3 Switch' on) I need to also enable lineinL (IN1 with 'RECMIXL BST1 Switch' on) or analogmic (IN2 with 'RECMIXL BST2 Switch' on) |
@gbuloz this issue seems to be about alsa mixer values now, no longer the initial problem of detecting a card. Can we close and reopen a new issue as needed? |
@plbossart : Yes I agree, you can close this issue. I'll open a new one for LineIn-Right IN3 not working. |
For information, the UCM2 files I use on Fedora 36 for a Kontron TRACe-B104 computer that is a custom design based on Intel CRB |
The sound is working under Windows 10, but no sound card detected under Linux (kernel 5.11.11 Fedora 33)
The ACPI of this board has been changed to use codec ID 10EC5660 instead of the original value INTC1027 (that works under Windows but is not supported under Linux). See attached dsdt.dsl file generated under Linux.
dsdt.dsl.gz
At the end of boot I get snd_soc_rt5660 automatically loaded (thanks to ACPI match by snd_soc_acpi_intel_match).
But snd_soc_ehl_rt5660 is not. It can be loaded manually but this does not create any available sound card
Any other verification I can do through /sys or other things for debug ?
The text was updated successfully, but these errors were encountered: