Re: [alsa-devel] Intel Baytrail Linux Audio
On Tue, Jun 23, 2015 at 05:31:17PM -0400, Tyler Yeomans wrote:
Hello Vinod,
Pls cc relevant mailing list, in this case alsa. I have cced Liam and Jarrko as well
I am writing to you because unfortunately I have exhausted my search and I am unable to get ALSA sound working on my Baytrail minipc. My dmesg only reports that: byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered aplay -l rightfully says there are no sound cards as the driver is not registered.
Can you give more details of your, does this enable HDA audio or I2S audio?
I have acquired the firmware file from the chromium repo here (https://kernel.googlesource.com/pub/scm/linux/kernel/git/firmware/linux-firm...) as was directed by the OP in this forum post: http://ubuntuforums.org/showthread.php?t=2254631
But unfortunately it seems the driver is still not loading correctly, even on Ubuntu 15.04 with ALSA 1.0.28
Do you have dmesg for us to look at so that we can see what might be going wrong
I see on gmane you are working on Skylake driver, could your work there possibly be backported to the Baytrail/RT5640 chipset?
No they are entirely different hw, so it will not work. We have uostream BYT driver and they should work
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can give your direct access to the device through service like Teamviewer if need be.
Again, thank you for looking into this.
Tyler
On 06/24/2015 06:11 AM, Vinod Koul wrote:
On Tue, Jun 23, 2015 at 05:31:17PM -0400, Tyler Yeomans wrote:
Hello Vinod,
Pls cc relevant mailing list, in this case alsa. I have cced Liam and Jarrko as well
I am writing to you because unfortunately I have exhausted my search and I am unable to get ALSA sound working on my Baytrail minipc. My dmesg only reports that: byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered aplay -l rightfully says there are no sound cards as the driver is not registered.
Can you give more details of your, does this enable HDA audio or I2S audio?
I have acquired the firmware file from the chromium repo here (https://kernel.googlesource.com/pub/scm/linux/kernel/git/firmware/linux-firm...) as was directed by the OP in this forum post: http://ubuntuforums.org/showthread.php?t=2254631
But unfortunately it seems the driver is still not loading correctly, even on Ubuntu 15.04 with ALSA 1.0.28
Do you have dmesg for us to look at so that we can see what might be going wrong
I see on gmane you are working on Skylake driver, could your work there possibly be backported to the Baytrail/RT5640 chipset?
No they are entirely different hw, so it will not work. We have uostream BYT driver and they should work
On Wed, Jun 24, 2015 at 10:24:54AM -0400, Tyler Yeomans wrote:
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can see these errors: [ 6.012196] (NULL device *): ipc: error DSP boot timeout [ 6.012386] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Jarrko, can you see why DSP boot fails, perhpas some resources are missing/wrong
Vinod, Jarrko,
If there is any information which you need me to provide, I can do so. Please let me know.
Thanks-
Tyler
On 06/24/2015 12:03 PM, Vinod Koul wrote:
On Wed, Jun 24, 2015 at 10:24:54AM -0400, Tyler Yeomans wrote:
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can see these errors: [ 6.012196] (NULL device *): ipc: error DSP boot timeout [ 6.012386] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Jarrko, can you see why DSP boot fails, perhpas some resources are missing/wrong
On 06/24/2015 07:03 PM, Vinod Koul wrote:
On Wed, Jun 24, 2015 at 10:24:54AM -0400, Tyler Yeomans wrote:
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can see these errors: [ 6.012196] (NULL device *): ipc: error DSP boot timeout [ 6.012386] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Jarrko, can you see why DSP boot fails, perhpas some resources are missing/wrong
Very likely BIOS defines the DSP-host interrupt in another index what code is using currently. Could you try does changing irqindex_host_ipc from 5 to 0 help? Like how it is done here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/093129.html
Vinod,
Sorry for the delay, took me a while to locate a config that would work for my machine when compiling the kernel. I have changed the irqindex_host_ipc from 5 to 0 as described in http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/093129.html However, now I am not getting any mention of the audio components in the dmesg output (attached)
lsmod shows the sound modules are loaded:
$ lsmod | grep sst snd_intel_sst_acpi 4120 1 snd_intel_sst_core 44762 1 snd_intel_sst_acpi snd_soc_sst_mfld_platform 55617 1 snd_intel_sst_core
Aplay still says no:
$ aplay -l aplay: device_list:268: no soundcards found...
Any thoughts?
-Tyler
On 06/25/2015 02:38 AM, Jarkko Nikula wrote:
On 06/24/2015 07:03 PM, Vinod Koul wrote:
On Wed, Jun 24, 2015 at 10:24:54AM -0400, Tyler Yeomans wrote:
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can see these errors: [ 6.012196] (NULL device *): ipc: error DSP boot timeout [ 6.012386] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Jarrko, can you see why DSP boot fails, perhpas some resources are missing/wrong
Very likely BIOS defines the DSP-host interrupt in another index what code is using currently. Could you try does changing irqindex_host_ipc from 5 to 0 help? Like how it is done here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/093129.html
Jarkko-
Quick update. I was able to recompile the distribution kernel after a long wait, and with the changes that were made I was able to get some semblance of an audio device registered.
I've attached the dmesg.
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
I've also attached a screenshot of what I am seeing. No HDMI audio though, and when I attach a headphone to the speaker jack... I get nothing but very faint buzzing when I put my ear to it and hit 'test sound'
Thanks-
Tyler
On 06/25/2015 02:38 AM, Jarkko Nikula wrote:
On 06/24/2015 07:03 PM, Vinod Koul wrote:
On Wed, Jun 24, 2015 at 10:24:54AM -0400, Tyler Yeomans wrote:
Vinod,
Thank you for looking into this. I have attached the dmesg for this device. Please note I have tried kernels 3.16/19 4.0 and 4.1, all with same result. The attached dmesg file is from booting kernel 4.1/amd64: Linux mykro 4.1.0-040100-generic #201506220235 SMP Mon Jun 22 06:36:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux On Ubuntu 15.04
I can see these errors: [ 6.012196] (NULL device *): ipc: error DSP boot timeout [ 6.012386] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
Jarrko, can you see why DSP boot fails, perhpas some resources are missing/wrong
Very likely BIOS defines the DSP-host interrupt in another index what code is using currently. Could you try does changing irqindex_host_ipc from 5 to 0 help? Like how it is done here:
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/093129.html
Hi.
Tyler Yeomans:
I was able to recompile the distribution kernel after a long wait, and with the changes that were made I was able to get some semblance of an audio device registered.
I've attached the dmesg.
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
I've also attached a screenshot of what I am seeing. No HDMI audio though, and when I attach a headphone to the speaker jack... I get nothing but very faint buzzing when I put my ear to it and hit 'test sound'
I am trying to get a similar device working in a Lenovi Miix 3-1030 PC/tablet, with no more success.
There are three firmware files with which I try the device:
[FIRMWARE_1] fw_sst_0f28.bin-48kHz_i2s_master from this Git repository HEAD (3161bfa): git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git sha1 = 2ddd16db3f587584d185ab7c0e2094dfb54b3828, size = 265684
[FIRMWARE_2] fw_sst_0f28.bin-i2s_master from this Git repository HEAD (2f11e90): https://chromium.googlesource.com/chromiumos/third_party/linux-firmware sha1 = 46385c87d5e4d8267007d4353f7627db9715ca3a, size = 265892
[FIRMWARE_3] The previous revision of fw_sst_0f28.bin-i2s_master from the same Git repository (24b6a27): sha1 = 505561c6bba939ff8129ec26dbf82dd7cd4b9d72, size = 265556
I believe Tyler is using FIRMWARE_3.
For me, FIRMWARE_1 and FIRMWARE_2 give similar results, FIRMWARE_3 is different.
With unpatched 4.1.1 and FIRMWARE_1 and FIRMWARE_2:
When loading snd-soc-sst-baytrail-pcm, the kernel says:
[ 558.593576] (NULL device *): ipc: error DSP boot timeout
several times. "NULL device" seems worrying in the first place.
Then when loading snd-soc-sst-byt-rt5640-mach, the kernel says:
[ 627.325055] byt-rt5640 byt-rt5640: ASoC: CPU DAI baytrail-pcm-audio not registered
With FIRMWARE_3, loading snd-soc-sst-baytrail-pcm causes a kernel Oops with the following messages (amongst a lot of lines, of course):
[ 1974.297580] (NULL device *): FW version: 04.05.12.02 [ 1974.297589] (NULL device *): Build type: 2 [ 1974.297594] (NULL device *): Build date: Jul 24 2013 13:17:39 [ 1975.344179] irq 7: nobody cared (try booting with the "irqpoll" option)
After that, an entry sometimes appears in /proc/asound/cards but does not produce any sound, and quickly starts producing errors.
The oops message led me to try changing sound/soc/intel/common/sst-acpi.c and set sst_acpi_baytrail_desc.irqindex_host_ipc = 7.
With FIRMWARE_1 and FIRMWARE_2, the "DSP boot timeout" message disappears, but "CPU DAI baytrail-pcm-audio not registered" is still there. And FIRMWARE_3 starts behaving exactly the same.
I include the kernel messages for the Oops, in case some extra information is useful. I can perform more tests as needed with various configurations and patches.
Regards,
On Thu, 2015-07-02 at 20:40 +0200, Nicolas George wrote:
Hi.
Tyler Yeomans:
I was able to recompile the distribution kernel after a long wait, and with the changes that were made I was able to get some semblance of an audio device registered.
I've attached the dmesg.
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
Can you try the bytcr_rt5640 machine driver as the byt-rt5640 machine driver will be getting deprecated (since it only works with a small number of FWs). The bytcr_rt5640 driver works with a wider range of FW.
Thanks
Liam
--------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
On Fri, 03 Jul 2015 09:51:02 +0100 Liam Girdwood liam.r.girdwood@intel.com wrote:
On Thu, 2015-07-02 at 20:40 +0200, Nicolas George wrote:
Hi.
Tyler Yeomans:
I was able to recompile the distribution kernel after a long wait, and with the changes that were made I was able to get some semblance of an audio device registered.
I've attached the dmesg.
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
Can you try the bytcr_rt5640 machine driver as the byt-rt5640 machine driver will be getting deprecated (since it only works with a small number of FWs). The bytcr_rt5640 driver works with a wider range of FW.
When testing the bytcr_rt5640 machine driver give also a try to the latest firmwares:
https://git.kernel.org/cgit/linux/kernel/git/vkoul/firmware.git/tree/intel?h...
I had some success with fw_sst_0f28_ssp0.bin
Ciao, Antonio
Liam Girdwood liam.r.girdwood@intel.com wrote:
Can you try the bytcr_rt5640 machine driver as the byt-rt5640 machine driver will be getting deprecated (since it only works with a small number of FWs). The bytcr_rt5640 driver works with a wider range of FW.
If that means just "modprobe snd-soc-sst-bytcr-rt5640" instead of "modprobe snd-soc-sst-byt-rt5640-mach" then it has no effect at all: the module is loaded but does not create any card and does not print anything.
If that requires changing the source or using sources from a different repository, please be a little more specific.
Antonio Ospite:
When testing the bytcr_rt5640 machine driver give also a try to the latest firmwares:
https://git.kernel.org/cgit/linux/kernel/git/vkoul/firmware.git/tree/intel?h...
I had some success with fw_sst_0f28_ssp0.bin
I tried overwriting the fw_sst_0f28.bin-48kHz_i2s_master file with that file, but it just gives me this message:
[ 390.704580] baytrail-pcm-audio baytrail-pcm-audio: wrong ram type 0x7 in block0x0 [ 390.704591] baytrail-pcm-audio baytrail-pcm-audio: invalid module 0 [ 390.704596] baytrail-pcm-audio baytrail-pcm-audio: error: parse fw failed -22 [ 390.704610] baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
It happens when loading snd-soc-sst-baytrail-pcm, i.e. before loading snd-soc-sst-bytcr-rt5640(-mach).
I guess I am not following the instructions correctly.
Regards,
On Fri, 3 Jul 2015 11:46:06 +0200 Nicolas George george@nsup.org wrote:
Liam Girdwood liam.r.girdwood@intel.com wrote:
Can you try the bytcr_rt5640 machine driver as the byt-rt5640 machine driver will be getting deprecated (since it only works with a small number of FWs). The bytcr_rt5640 driver works with a wider range of FW.
If that means just "modprobe snd-soc-sst-bytcr-rt5640" instead of "modprobe snd-soc-sst-byt-rt5640-mach" then it has no effect at all: the module is loaded but does not create any card and does not print anything.
snd-soc-sst-bytcr-rt5640 will be loaded automatically if you use snd-intel-sst-acpi instead of snd-soc-sst-acpi, you can blacklist the latter using a file in /etc/modprobe.d (look up the details), or just remove snd-soc-sst-acpi.ko from the installation dir as a dirty hack.
If that requires changing the source or using sources from a different repository, please be a little more specific.
In my tests I used the code from mainline linux.
Antonio Ospite:
When testing the bytcr_rt5640 machine driver give also a try to the latest firmwares:
https://git.kernel.org/cgit/linux/kernel/git/vkoul/firmware.git/tree/intel?h...
I had some success with fw_sst_0f28_ssp0.bin
I tried overwriting the fw_sst_0f28.bin-48kHz_i2s_master file with that file, but it just gives me this message:
[ 390.704580] baytrail-pcm-audio baytrail-pcm-audio: wrong ram type 0x7 in block0x0 [ 390.704591] baytrail-pcm-audio baytrail-pcm-audio: invalid module 0 [ 390.704596] baytrail-pcm-audio baytrail-pcm-audio: error: parse fw failed -22 [ 390.704610] baytrail-pcm-audio baytrail-pcm-audio: error: failed to load firmware
It happens when loading snd-soc-sst-baytrail-pcm, i.e. before loading snd-soc-sst-bytcr-rt5640(-mach).
I guess I am not following the instructions correctly.
Note that different drivers expect different firmwares, you cannot mix them:
snd-soc-sst-acpi -> fw_sst_0f28.bin-48kHz_i2s_master snd-intel-sst-acpi -> fw_sst_0f28.bin snd-intel-sst-acpi -> fw_sst_0f28_ssp0.bin (renamed to fw_sst_0f28.bin)
Ciao, Antonio
Le quintidi 15 messidor, an CCXXIII, Antonio Ospite a écrit :
snd-soc-sst-bytcr-rt5640 will be loaded automatically if you use snd-intel-sst-acpi instead of snd-soc-sst-acpi, you can blacklist the latter using a file in /etc/modprobe.d (look up the details), or just remove snd-soc-sst-acpi.ko from the installation dir as a dirty hack.
Indeed. I always loaded snd-soc-sst-acpi before snd-intel-sst-acpi, so I could not observe it gives a different result.
In my tests I used the code from mainline linux.
Ok. That is what I am doing too.
Note that different drivers expect different firmwares, you cannot mix them:
snd-soc-sst-acpi -> fw_sst_0f28.bin-48kHz_i2s_master snd-intel-sst-acpi -> fw_sst_0f28.bin snd-intel-sst-acpi -> fw_sst_0f28_ssp0.bin (renamed to fw_sst_0f28.bin)
Ok. I re-ran the tests like that.
After loading snd-intel-sst-acpi, the kernel says:
[ 35.160330] intel_sst_acpi 80860F28:00: LPE base: 0x90a00000 size:0x200000 [ 35.160339] intel_sst_acpi 80860F28:00: IRAM base: 0x90ac0000 [ 35.160372] intel_sst_acpi 80860F28:00: DRAM base: 0x90b00000 [ 35.160384] intel_sst_acpi 80860F28:00: SHIM base: 0x90b40000 [ 35.160395] intel_sst_acpi 80860F28:00: Mailbox base: 0x90b44000 [ 35.160405] intel_sst_acpi 80860F28:00: DDR base: 0x20000000 [ 35.161373] intel_sst_acpi 80860F28:00: Got drv data max stream 25
After loading snd-soc-sst-bytcr-rt5640 it says:
[ 69.130424] bytt100_rt5640 bytt100_rt5640: snd-soc-dummy-dai <-> media-cpu-dai mapping ok [ 69.130482] compress asoc: snd-soc-dummy-dai <-> compress-cpu-dai mapping ok [ 69.130536] bytt100_rt5640 bytt100_rt5640: rt5640-aif1 <-> ssp2-port mapping ok [ 69.130650] bytt100_rt5640 bytt100_rt5640: Connecting non-supply widget to supply widget is not supported (Int Mic -> LDO2) [ 69.130657] bytt100_rt5640 bytt100_rt5640: ASoC: no dapm match for Int Mic --> (null) --> LDO2 [ 69.130663] bytt100_rt5640 bytt100_rt5640: ASoC: Failed to add route Int Mic -> direct -> LDO2 [ 69.165392] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 0 doesn't have DAPM widget!!! [ 69.165427] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 1 doesn't have DAPM widget!!! [ 69.165460] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 2 doesn't have DAPM widget!!! [ 69.165494] sst-mfld-platform sst-mfld-platform: Slot control: codec_out tx interleaver slot 3 doesn't have DAPM widget!!! [ 69.165521] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in0_0 doesn't have DAPM widget!!! [ 69.165551] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in0_1 doesn't have DAPM widget!!! [ 69.165583] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in1_0 doesn't have DAPM widget!!! [ 69.165618] sst-mfld-platform sst-mfld-platform: Slot control: codec_in rx deinterleaver codec_in1_1 doesn't have DAPM widget!!!
The sound card appears, but then if I try to play something:
aplay -D hw:0 -c 2 -r 48000 -f S16_LE /dev/urandom aplay: set_params:1297: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 48000 PERIOD_TIME: 125000 PERIOD_SIZE: 6000 PERIOD_BYTES: 24000 PERIODS: 4 BUFFER_TIME: 500000 BUFFER_SIZE: 24000 BUFFER_BYTES: 96000 TICK_TIME: 0
[ 95.164749] Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port
The messages are exactly the same with both firmwares (fw_sst_0f28.bin and fw_sst_0f28_ssp0.bin).
Maybe I forgot to load another module?
Side note: snd-intel-sst-acpi and snd-soc-rt5640 both have usage count 1 without dependent modules, that requires a reboot between each test.
Thanks for your help, it helped me make progress even if it still is not success.
Regards,
participants (6)
-
Antonio Ospite
-
Jarkko Nikula
-
Liam Girdwood
-
Nicolas George
-
Tyler Yeomans
-
Vinod Koul